-
Notifications
You must be signed in to change notification settings - Fork 381
Clarifications to labels or instructions SC #4995
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
base: main
Are you sure you want to change the base?
Changes from 2 commits
6a0b730
6b1130d
bccd4cc
765e19e
b4e874b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,27 +22,55 @@ <h2>In brief</h2> | |
| <h2>Intent of Labels or Instructions</h2> | ||
|
|
||
| <p>The intent of this success criterion is to have content authors present instructions | ||
| or labels that identify the controls in a form so that users know what input data | ||
| is expected. In the case of radio buttons, checkboxes, comboboxes, or similar controls | ||
| that provide users with options, each option must have an appropriate label so that | ||
| users know what they are actually selecting. | ||
| Instructions or labels may also specify data formats for data entry fields, especially | ||
| if they are out of the customary formats or if there are specific rules for correct | ||
| input. Content authors may also choose to make such instructions available to users | ||
| only when the individual control has focus especially when instructions are long and | ||
| verbose. | ||
| or labels to identify the purpose of fields and controls that expect user input, so that | ||
| users will know what sort of values to enter, or adjust. Commonly, labels or instructions | ||
| will be necessary to help users understand how to fill out the input fields of a form. | ||
| </p> | ||
| <p> | ||
| Despite their moniker, form fields and controls are not limited to use within a form. They | ||
| are often used in web pages to allow a user to create or manipulate content. Labels, | ||
| instructions, or both will commonly be needed for these controls to help ensure users | ||
| understand their purpose and the expected values they will need to enter or adjust to | ||
| use the controls efficiently while mitigating errors. | ||
| </p> | ||
| <p> | ||
| In the case of radio buttons, checkboxes, comboboxes, or similar controls that provide | ||
| users with choices, each choice will need a label so that users know what they are actually | ||
| selecting. In some cases, these labels may be enough to indicate the purpose of the parent | ||
| control (such as a select-only combobox), or grouping of controls (like groupings of radios | ||
| or checkboxes), and thus further visible labels may not be necessary. However, in cases | ||
| where the labels for the choices would be ambiguous without an overarching label or instructions | ||
scottaohara marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| for a control or group of controls, then authors would need to provide one or both for users. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It may not be clear enough for some readers what "one or both" refers back to - possibly better spell out? Above I have replaced "moniker" and "overarching" since I expect these terms may be unfamiliar.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i tried using those words, and imo it felt very clunky to have to repeat "labels, instructions or both". i'll think more if this can be reworded further. |
||
| </p> | ||
|
|
||
| <p> | ||
| Beyond identifying the purpose of a field or control, instructions or labels may specify the | ||
| necessary format(s) for data entry, especially when if they are out of the customary formats | ||
scottaohara marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| or if there are specific rules for correct input. Content authors may also choose to make such | ||
scottaohara marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| instructions available to users only when the individual control has focus, or may provide a | ||
| mechanism to dynamically render or navigate a user to the instructions, especially for when | ||
scottaohara marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| instructions are long and verbose. | ||
scottaohara marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| </p> | ||
|
|
||
| <p>The intent of this success criterion is not to clutter the page with unnecessary information | ||
| but to provide important cues and instructions that will benefit people with disabilities. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it feels a bit odd to focus on people with disabilities here since not having things like date format etc. spelled out really affects all users. One could explain that people with some disabilites may be less able to infer such information from the context (due to cognitive ( memory / retention issues or due to reduced size of viewport of LV users) so having it in place is more important to them.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is the existing text and from what i can tell, has been this text since wcag 2.0. |
||
| Too much information or instruction can be just as harmful as too little. | ||
| The goal is to make certain that enough information is provided for the user to accomplish | ||
| the task without undue confusion or navigation. | ||
| Too much information or instruction can be just as harmful as too little. Rather, the goal is to | ||
scottaohara marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ensure enough information is provided for the user to accomplish the task without undue confusion | ||
| or navigation. | ||
| </p> | ||
|
|
||
| <p>When form fields or controls would necessitate labels, instructions or both, they will need to be | ||
| persistently available to users. In many cases, the best way to do this is to make them visually | ||
| persistent as part of the UI. However, there can be times where labels or instructions would be | ||
| better suited to the interface if they were made available on demand or only as necessary. For instance, | ||
| within the context of a toolbar, a select-only combobox's label may only be available on hover or focus | ||
| of the control. Or, a form field with verbose instructions may provide those instructions by using a | ||
| button to invoke them as necessary. | ||
| </p> | ||
|
|
||
| <p>Note that the majority of form control labels are text-based. | ||
| Using images as labels meets the requirements of the criterion, but care should be taken to ensure that the images are widely understood | ||
| by the intended target audience. Authors may consider providing additional hints, | ||
| Using images as labels meets the requirements of the criterion, but care should be taken to ensure that the | ||
| images are widely understood by the intended target audience. Authors may consider providing additional hints, | ||
| such as text-based tooltips or supplementary text, to support clarity when using image-based labels.</p> | ||
|
|
||
| <p>This success criterion does not require that labels or instructions be correctly marked up, | ||
|
|
@@ -54,14 +82,16 @@ <h2>Intent of Labels or Instructions</h2> | |
| <p>Further, this success criterion does not take into consideration whether or not alternative methods of | ||
| providing an accessible name or description for form controls and inputs has been used — that aspect is | ||
| covered separately by <a href="name-role-value">4.1.2 Name, Role, Value</a>. It is possible | ||
| for controls and inputs to have an appropriate accessible name or description (e.g. using <code>aria-label="..."</code>) | ||
| and therefore pass Success Criterion 4.1.2, but to still fail this success criterion (if the labels or instructions | ||
| aren't presented to all users, not just those using assistive technologies). | ||
| for controls and inputs to have an appropriate accessible name or description (e.g., using <code>aria-label="..."</code>) | ||
| and therefore pass Success Criterion 4.1.2 Name, Role, Value, but to still fail this success criterion | ||
| (if the labels or instructions ren't presented to all users, not just those using assistive technologies). | ||
| Additionally, it can be possible to pass this success criterion by providing a visible label, but fail Success Criterion | ||
| 2.5.3 Label in Name, if the perceivable visible text label is not included in the accessible name of the control. | ||
scottaohara marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| </p> | ||
| <p>This success criterion does not apply to links or other controls (such as an expand/collapse widget, or similar | ||
| interactive components) that are not associated with data entry. | ||
| </p> | ||
| <p>While this success criterion requires that controls and inputs have labels or instructions, whether or | ||
| <p>While this success criterion requires that form fields and controls labels or instructions, whether or | ||
scottaohara marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| not labels (if used) are accurate, sufficiently clear, or descriptive is covered separately by | ||
| <a href="headings-and-labels">2.4.6 Headings and Labels</a>. | ||
| </p> | ||
|
|
@@ -86,7 +116,11 @@ <h2>Benefits of Labels or Instructions</h2> | |
| fields) can prevent users from making incomplete or incorrect form submissions, which prevents | ||
| users from having to navigate once more through a page/form in order to fix submission errors. | ||
| </li> | ||
|
|
||
|
|
||
| <li>Providing labels can help users identify the expected name of a control, so that it may be accessed | ||
scottaohara marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| more efficiently by voice commands. | ||
| </li> | ||
|
|
||
| </ul> | ||
|
|
||
| </section> | ||
|
|
@@ -120,6 +154,15 @@ <h2>Examples of Labels or Instructions</h2> | |
| having a single label "Name" (which would appear to leave the second text field unlabelled), | ||
| each field is given an explicit label — "Given Name" and "Family Name". | ||
| </li> | ||
|
|
||
| <li> | ||
| A rich text editor presents two select-only comboboxes to allow a user to choose the font family and | ||
| font size of the text they are editing. Each option of the comboboxes are accurately labeled. The | ||
scottaohara marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| comboboxes are given accessible names ("font family" and "font size", respectively). | ||
| The context of being part of the rich text editor's toolbar, as well as the clear labels of each option provide the | ||
scottaohara marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| necessary information for a user to determine their purpose, without the need for persistent visible labels | ||
scottaohara marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| for the individual comboboxes. | ||
scottaohara marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| </li> | ||
|
|
||
| <li>A U.S. phone number separates the area code, exchange, and number into three fields. | ||
| Parentheses surround the area code field, and a dash separates the exchange and number | ||
|
|
||
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.