-
Notifications
You must be signed in to change notification settings - Fork 22.6k
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
Fix aria-label documentation, removing statement that says it should be used only for interactive items #35465
Conversation
Might make sense to explicitly mention aria-label can be used to name an element, so long as the elements implicit or explicit aria role doesn’t prohibit naming. Listitem, for example being a role that is incorrectly not in the name prohibited category, but will be once the spec updates to correct this. But the other example, role=list or main, article, etc are all nameable roles/elements. |
@@ -7,13 +7,13 @@ spec-urls: https://w3c.github.io/aria/#aria-label | |||
|
|||
{{AccessibilitySidebar}} | |||
|
|||
The `aria-label` attribute defines a string value that labels an interactive element. | |||
The `aria-label` attribute defines a string value that can be used to name an element, as long as the element's role does not [prohibit naming](/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-label#associated_roles). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might it make sense to explicitly mention that aria-label can be used to name an element, so long as the element's implicit or explicit aria role doesn’t prohibit naming.
Pushed a change 83297c7 making it clearer that label should only be used with roles that don't prohibit author naming.
Listitem, for example being a role that is incorrectly not in the name prohibited category, but will be once the spec updates to correct this. But the other example, role=list or main, article, etc are all nameable roles/elements.
Thanks for the context, @scottaohara! I found this nice PR of you on the subject: w3c/aria#2292. Let me know if I could help with anything there, too 🙂
I changed the PR description, including Img and Meter in place of ListItem.
Preview URLs (comment last updated: 2024-08-27 04:32:12) |
@scottaohara I’ve addressed the feedback provided in the initial review of PR. Could you please take some time to re-review? Thanks in advance 🙂 |
files/en-us/web/accessibility/aria/attributes/aria-label/index.md
Outdated
Show resolved
Hide resolved
… naming Co-authored-by: Scott O'Hara <[email protected]>
files/en-us/web/accessibility/aria/attributes/aria-label/index.md
Outdated
Show resolved
Hide resolved
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Hi @scottaohara, thanks for your previous review. I applied the change you suggested 0ead6ef Would you mind taking another look when you have a moment? I really appreciate your time and effort in helping get this PR merged |
Hi @scottaohara, just following up on this PR as it’s been a few weeks since my last re-review request. I’ve addressed the feedback, and would really appreciate it if you could take another look when you have time. Thanks again! |
Perhaps @estelle could also review this, if @scottaohara could not |
Description
This change closes #28397, by changing the first paragraph of aria-label page, based on aria-label spec https://w3c.github.io/aria/#aria-label.
Motivation
There are noninteractive elements, such as List, Img, and Meter, that allow aria-label, and it's useful to have this context announced when using assistive technologies.
Additional details
The confusion might have appeared because there are multiple non interactive aria roles, which aria-label is forbidden:
Related issues and pull requests
#28397