w3c / aria

Accessible Rich Internet Applications (WAI-ARIA)
https://w3c.github.io/aria/
Other
645 stars 124 forks source link

ARIA 1.2 Specification role Tab Tabpanel - does not match the info on new APG #1756

Open LaurenceRLewis opened 2 years ago

LaurenceRLewis commented 2 years ago

The Specification for the TAB Role it states "For a multi-selectable tablist, authors SHOULD ensure each visible tabpanel has its aria-expanded attribute set to true, and that the remaining hidden tabpanel elements have their aria-expanded attributes set to false.". AND "In either case, authors SHOULD ensure that a selected tab has its aria-selected attribute set to true, that inactive tab elements have their aria-selected attribute set to false".

For the tab role and aria-selected, would this be better as a MUST not a SHOULD, as without it there is no indication that the tab panel is selected or expanded. What is the purpose of adding aria-expanded to the tabpanel?

I know of no other widgets, for example the Accordion where aria-expanded is placed on the expanding element and not the triggering button.

References

ARIA Authoring Practices Guide (APG) - Tabs WAI-ARIA Roles, States, and Properties

Accessible Rich Internet Applications (WAI-ARIA) 1.2 - W3C Candidate Recommendation Draft 08 December 2021 tab role

mcking65 commented 2 years ago

It seems the primary question is whether the spec should mention the need for expanded? If so, we will transfer this to the ARIA spec repo.

BTW, we do not recommend use of tab pattern for accordion.

css-meeting-bot commented 2 years ago

The ARIA Authoring Practices (APG) Task Force just discussed Issue 2363 - ARIA 1.2 Specification role Tab Tabpanel - does not match the info on new APG.

The full IRC log of that discussion <Matt_King> TOPIC: Issue 2363 - ARIA 1.2 Specification role Tab Tabpanel - does not match the info on new APG
<Matt_King> github: https://github.com/w3c/aria/issues/1756
<siri> Matt: Seems like aria-specification issue
<siri> Don't how multi-select tab panel be used for tab pattern
<siri> Siri- Saw tab widget in the middle and tabpanel with image above the panel and tabpanel with content below the tabpanel
<siri> Mark: Wonder how it works
<siri> Matt: why tab needs aria-expanded instead aria-selected
<siri> Jon: Selected 2 tabs and have visually opening two tabpanels. Seems like accordion pattern
<siri> Matt: Tab itself is not directly touching the panel
<siri> +1 for accordion
<siri> Mark +1
<siri> Matt: In native iOS there are tab elements at the bottom
<siri> There is no visual thing to connect label of tab to tabpanel
<siri> Mark: Visual connect between tab and tabpanel is needed
<siri> Matt: Added comment in the bug
jnurthen commented 2 years ago

related https://github.com/w3c/aria/issues/1355