Skip to content
Draft
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 62 additions & 19 deletions understanding/20/labels-or-instructions.html
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Despite their moniker, form fields and controls are not limited to use within a form. They
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
for a control or group of controls, then authors would need to provide one or both for users.
Copy link
Contributor

Choose a reason for hiding this comment

The 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.

Copy link
Member Author

Choose a reason for hiding this comment

The 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
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, or may provide a
mechanism to dynamically render or navigate a user to the instructions, especially for when
instructions are long and verbose.
</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.
Copy link
Contributor

Choose a reason for hiding this comment

The 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.

Copy link
Member Author

Choose a reason for hiding this comment

The 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
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,
Expand All @@ -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.
</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
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>
Expand All @@ -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
more efficiently by voice commands.
</li>

</ul>

</section>
Expand Down Expand Up @@ -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
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
necessary information for a user to determine their purpose, without the need for persistent visible labels
for the individual comboboxes.
</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
Expand Down
Loading