RFR: JDK-8311893: Interactive component with ARIA role 'tabpanel' does not have a programmatically associated name [v2]
Hannes Wallnöfer
hannesw at openjdk.org
Wed Jan 17 10:09:58 UTC 2024
On Fri, 8 Dec 2023 05:59:49 GMT, psoujany <duke at openjdk.org> wrote:
>> Interactive component with ARIA role 'tabpanel' does not have a programmatically associated name in javadoc which is failing Accessibility checks.
>> https://bugs.openjdk.org/browse/JDK-8311893
>> https://bugs.openjdk.org/browse/JDK-8311894
>
> psoujany has updated the pull request incrementally with one additional commit since the last revision:
>
> Add accessible name to role=tabpanel
I don't think the proposed solution is correct:
- The `aria-labelledby` attribute of the tab panel is set to its own id, which does not add any useful information as the tab panel does not contain a human-readable label.
- The `aria-labelledby` attribute of the table is set to the default tab which is correct in the default view, but it should be updated to the current tab when one other than the default tab is selected.
Looking at [this example](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/tab_role#example) as a blueprint, I think the solution should be the following:
- Add an `aria-label` attribute to the tab panel explaining its purpose, e.g. "Tabs for selecting table contents".
- Keep the `aria-labelledby` attribute in the table with the id of the default tab as in the current PR.
- Add code in `script.js` to update the table `aria-labelledby` attribute when a different tab is selected.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/16148#issuecomment-1895485677
More information about the javadoc-dev
mailing list