[jdk17u-dev] RFR: 8311893: Interactive component with ARIA role 'tabpanel' does not have a programmatically associated name

Hannes Wallnöfer hannesw at openjdk.org
Wed Feb 7 16:57:54 UTC 2024


On Tue, 6 Feb 2024 11:40:36 GMT, psoujany <duke at openjdk.org> wrote:

> This PR is a backport of https://github.com/openjdk/jdk/pull/16148

src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/Table.java line 418:

> 416:                     .setId(HtmlIds.forTabPanel(id))
> 417:                     .put(HtmlAttr.ROLE, "tabpanel")
> 418:                     .put(HtmlAttr.ARIA_LABELLEDBY, HtmlIds.forTab(id, tabIndex).name());

This is not the correct default value for the `aria-labelledby` attribute. In line 405 where it was previously assigned, `tabIndex` has value `0`. However in the `for-in` loop that follows, `tabIndex` is increased and so the generated id refers to the last tab instead of the first. The correct value for the attribute is `HtmlIds.forTab(id, 0).name()`.

-------------

PR Review Comment: https://git.openjdk.org/jdk17u-dev/pull/2196#discussion_r1481798369


More information about the jdk-updates-dev mailing list