Skip to content
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

Better documentation for labelling inputs #37665

Open
wbamberg opened this issue Jan 15, 2025 · 1 comment
Open

Better documentation for labelling inputs #37665

wbamberg opened this issue Jan 15, 2025 · 1 comment
Labels
Content:HTML Hypertext Markup Language docs

Comments

@wbamberg
Copy link
Collaborator

wbamberg commented Jan 15, 2025

The discussion at https://github.com/orgs/mdn/discussions/763 proposed changing example code on MDN from "explicit labels" (in which input elements are associated with labels using for and id attributes) to "implicit labels" (in which the association is defined by nesting the input inside the label).

Discussion suggests that we don't want to do this, mainly because (according to https://css-tricks.com/html-inputs-and-labels-a-love-story/): "an implicit label is not handled correctly by all assistive technologies".

However we don't document this in the reference page for <label>: we do describe both forms but don't give any guidance about which to use. We ought to do this.

I'd love to know more concrete details about the implications of this choice for assistive technologies and wonder if @scottaohara or @ericwbailey might be able to help with this <3.

@github-actions github-actions bot added Content:HTML Hypertext Markup Language docs needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. labels Jan 15, 2025
@Josh-Cena Josh-Cena removed the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label Jan 16, 2025
@ericwbailey
Copy link
Member

ericwbailey commented Jan 17, 2025

Hiya! I believe the advice of needing an explicit for/id association still holds true for Dragon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:HTML Hypertext Markup Language docs
Projects
None yet
Development

No branches or pull requests

3 participants