Page MenuHomePhabricator

Tabs: `aria-activedescendant` is of no value on `role="tablist"`
Closed, InvalidPublic

Description

As of current main, we feature aria-activedescendant on the role="tablist" carrying ul. Although that might be a logical expectation for something focusable, the attribute is only allowed on

  • application
  • combobox
  • composite
  • group
  • textbox

ARIA roles and hence of no value to screenreaders.

Criteria for done

  • Remove aria-activedescendant on the role="tablist"

Event Timeline

Change 790454 had a related patch set uploaded (by VolkerE; author: VolkerE):

[design/codex@main] Tabs: Remove unsupported `aria-activedescendant`

https://gerrit.wikimedia.org/r/790454

While I fully admit I have little experience with ARIA attributes, I *think* that tablist does allow this attribute?

https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-activedescendant

The aria-activedescendant attribute identifies the currently active element when focus is on a composite widget, combobox, textbox, group, or application.

composite links to:
https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/composite_role

Composite is an abstract role used for the ontology. Don't use this role in content. Instead, use the composite subclasses of grid, select, spinbutton, and tablist

Where tablist links to https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/tablist_role

Does this not allow our usage?

The article we based our tabs implementation on doesn't use aria-activedescendant either, and it seems to be redundant with setting aria-selected="true" on the active tab. So even if aria-activedescendant is allowed, it's redundant. If removing it doesn't harm accessibility, it would be great if we could, because then we could remove generated HTML IDs from tabs altogether.

...never mind, we won't be able to remove generated IDs, because we still need to point to tabs' IDs using the href attribute. But we would be able to remove IDs from the tab labels (the <li> elements).

@DannyS712 I've been mislead by my testing with VoiceOver/macOS and the MDN description/aXe error message.

The attribute doesn't make any difference in VoiceOver, actually the tab navigation is currently completely broken there. But the attribute is not at fault nor wrong there. :/

Change 790454 abandoned by VolkerE:

[design/codex@main] Tabs: Remove unsupported `aria-activedescendant`

Reason:

Through `composite` group allowed on `tablist`. Nonetheless ignored in VoiceOver.

https://gerrit.wikimedia.org/r/790454