Some editorial updates to Understanding SC 2.5.3#4335
Merged
Conversation
Contributor
momdo
commented
Apr 11, 2025
- Update HTML Standard link and quotation
- Update and add Understanding success criterion links
- Remove mismatching parenthesis
- Update HTML Standard link and quotation - Update and add Understanding success criterion links - Remove mismatching parenthesis
✅ Deploy Preview for wcag2 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
kfranqueiro
reviewed
Apr 14, 2025
| <p>The rationale for some of these conventions is explained in <a href="../../Techniques/general/G162">G162: Positioning labels to maximize predictability of relationships</a>.</p> | ||
| <p>It is important to bias towards treating only the adjacent text as a label because liberal interpretations of what constitutes a text label can jeopardize the value of this success criterion (SC) by lessening predictability. Isolating the label to the single string in close proximity to the component makes it easier for developers, testers, and end users to identify the label targeted for evaluation in this SC. Predictable interpretation of labeling allows users of speech recognition technologies to interact with the element via its conventionally positioned label, and allows users of screen reading technologies to enjoy consistency between the nearby visible label and the announced name of the component.</p> | ||
| <p>Note that placeholder text within an input field is not considered an appropriate means of providing a label. The <a href="https://www.w3.org/TR/html52/sec-forms.html#the-placeholder-attribute">HTML5 specification</a> states <q>The placeholder attribute should not be used as an alternative to a <code><label></code>.</q> However, it is worth noting that "label" in that HTML5 statement is in code brackets and links to the <code>label</code> element. For the purposes of this Label in Name Success Criterion, "label" is not used in such a programmatic sense but is simply referring to a text string in close visual proximity to a component. As such, in the absence of any other nearby text string (as described in the preceding list), if an input contains placeholder text, such text may be a candidate for Label in Name. This is supported both through the accessible name calculation (discussed later) and from the practical sense that where a visible label is not otherwise provided, it is likely that a speech-input user may attempt to use the placeholder text value as a means of interacting with the input.</p> | ||
| <p>Note that placeholder text within an input field is not considered an appropriate means of providing a label. The <a href="https://html.spec.whatwg.org/multipage/input.html#the-placeholder-attribute">HTML Standard</a> states <q>The placeholder attribute should not be used as an alternative to a <code>label</code>.</q> However, it is worth noting that "label" in that HTML5 statement is in code brackets and links to the <code>label</code> element. For the purposes of this Label in Name Success Criterion, "label" is not used in such a programmatic sense but is simply referring to a text string in close visual proximity to a component. As such, in the absence of any other nearby text string (as described in the preceding list), if an input contains placeholder text, such text may be a candidate for Label in Name. This is supported both through the accessible name calculation (discussed later) and from the practical sense that where a visible label is not otherwise provided, it is likely that a speech-input user may attempt to use the placeholder text value as a means of interacting with the input.</p> |
Contributor
There was a problem hiding this comment.
Maybe also re-word "in that HTML5 statement" since the link no longer contains "HTML5". Maybe "in the previous statement"?
|
kfranqueiro marked as non substantive for IPR from ash-nazg. |
mbgower
reviewed
Apr 18, 2025
Co-authored-by: Mike Gower <gowerm@ca.ibm.com>
patrickhlauke
approved these changes
May 3, 2025
Member
|
Preview here https://deploy-preview-4335--wcag2.netlify.app/understanding/label-in-name All looks good to me, thanks @momdo |
scottaohara
approved these changes
May 4, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.