-
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
label accessibility advice is misleading #33283
Comments
Here's one way to phrase what you're trying to say:
However, your coworkers' misconceptions may be more valid than you realize. Check out this paragraph from further down the page.
|
I don't think that second quote contradicts what I'm saying, but I'm prepared to be corrected. Labelling a button that already provides its own label does seem like it might be a bad idea, and it's not something I would personally do. (To be honest labelling a button with My assumption is that labelling a button with no text ( However assistive technology can behave in surprising ways, and I haven't had an opportunity to test it directly in many years, so I could be completely mistaken. Suffice to say, clearly there is room for misunderstanding the current text, so I think it should be considered for revision even if (or perhaps especially if) my understanding is not exactly correct. |
Is this fixed by #33916? |
@estelle No; this issue is about the "Accessibility concerns" section of the (I also don't think #33916 made it clear whether buttons, without a value, can be labeled.) |
MDN URL
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/label
What specific section or headline is this issue about?
Accessibility concerns > Interactive content
What information was incorrect, unhelpful, or incomplete?
This text is misleading because
button
is itself a labellable element.For example:
In this example, the button is the element being labelled. The text is not intended to discourage this, but I have encountered experienced developers telling me that this pattern is inaccessible citing the above text in MDN.
What did you expect to see?
The text should make it clear that:
button
or some other labellable element.I'm not sure how to word this in a way that isn't overly complicated or confusing, so I'm reporting an issue here instead of trying to fix this myself.
Do you have any supporting links, references, or citations?
No response
Do you have anything more you want to share?
No response
MDN metadata
Page report details
en-us/web/html/element/label
The text was updated successfully, but these errors were encountered: