-
Notifications
You must be signed in to change notification settings - Fork 360
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why does the guidance state that an unlabelled tablist needs an aria label? #3211
Comments
According to the ARIA specification (https://w3c.github.io/aria/#tablist), a tablist does not have to be labelled. Therefore, the sentence you quoted should be changed to indicate that the tablist can be labelled with aria-label, but does not have to be |
Duplicate of #2319 |
Related: #620 |
My suggested wording approach, based on w3c#3211
How are you deriving that from the spec you cite? I specifically looked there before opening this and did not see anything stating it does not have to be labelled. In fact, when I saw "Name From: author" I thought it was stating the opposite. I am in full support of your conclusion and recommendation, but I wanted to point out to the caretakers of the spec (and supporting documents) that my scan of the document did not lead me to that conclusion, nor did I find the documents @mcking65 is referring to in one of the issues your referenced, #2319 My take as someone who uses the APG fairly frequently is that the language there should reinforce the intent, so I would definitely advocate that the phrase (and its siblings in other be changed to something like:
Note that I have linked to that naming guidance table, to improve its discoverability. The other change I would advocate is that the rating of tablist in that table be changed from "Recommended". Shouldn't it be required when there is a visible label, and discretionary when not? I created a draft PR with one suggested approach, to give you something to iterate on, or reject entirely #3212 |
Quite simple: Elements that need to be labelled have a table row with the content: "Accessible Name Required: True" You can also look at: https://w3c.github.io/aria/#namefromauthor - Elements that need to be labelled have "(name required)" |
Then I believe that each role should have that row in its table and it should read "False" for the ones where it is not required. Otherwise those of us without a high degree of familiarity with the spec who look at a role's characteristics table in isolation are left with the impression via the "Name from" row that name is required (especially given the language in the APG). |
Related #3212 Thank you for raising the issue and submitting a PR. The naming should certainly be optional, and the text of the pattern does not accurately convey that. A tablist is frequently similar in function to a list of links that benefit from having a named nav wrapper. However, I don't think we would want to suggest adding anav wrapper around a tablist as that could encourage adding landmark regions in situations where doing so could degrade the overall landmark experience. Sometimes the context of a tablist is narrow and easily determined by a screen reader user, e.g., a set of tabs contained inside of a named dialog. In those cases, it is less likely that providing a tablist name would improve the screen reader experience. It seems to me that this is a situation where it is not clear whether naming should be recommended or discretionary. In my experience, most tablists that should be named also have a visual title that provides excellent context. Often they are not juxtaposed, so aria-labelledby is extremely valuable. This is a point in favor of naming being recommended. In the cases where there is no visible text that could serve as a name, my experience is pretty mixed. It often depends on how the tabs themselves are named. One resolution path could be to specify the necessity as recommended and then include guidance that naming is unnecessary when both 1) there is no visible text that can serve as a useful name , and 2) individual tab names are sufficiently meaningful. To resolve this issue, we would need a single PR that updates both the naming guidance table and the pattern. It does not appear there is any need to update the examples. |
Yes, but this must be reported here: https://github.com/w3c/aria/issues |
I've added the pattern change to the PR I made. |
Thanks, I've opened w3c/aria#2411 |
On https://www.w3.org/WAI/ARIA/apg/patterns/tabs/ it states:
Teams are interpreting the second sentence to mean every tablist must be named. What is the rationale?
Most tablists are not visually labelled, and they should not need to be programmatically named either. A tab/tablist is a composite element, made up of a tablist, set of tabs, and associated tabpanels. The tablist role provides the context for the interaction, and the active tab element provides a name (and context) for the composite component.
The above quote seems overly prescriptive, and is leading to teams making up arbitrary names for unlabelled tabs, which go undetected during testing and can add as much confusion as benefit.
The text was updated successfully, but these errors were encountered: