Date: Mon, 24 Jun 2019 21:58:28 +0200
Subject: [PATCH 094/131] Address feedback: around title and placeholder
---
aria-practices.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/aria-practices.html b/aria-practices.html
index fb4242aeb5..7a5aab03a2 100644
--- a/aria-practices.html
+++ b/aria-practices.html
@@ -3800,7 +3800,7 @@ Rule 3: Prefer Native Techniques
Rule 4: Avoid Browser Fallback
When authors do not specify an accessible name using an element or attribute that is intended for naming, browsers attempt to help assistive technology users by resorting to fallback methods for generating a name.
- For example, the HTML title and placeholder attributes are used as last resort sources of content for accessible names.
+ For example, the HTML title
and placeholder
attributes are used as last resort sources of content for accessible names.
Because the purpose of these attributes is not naming, their content typically yields low quality accessible names that are not effective.
From 774b26c868ed5da6bc3111383db98a2e75c25298 Mon Sep 17 00:00:00 2001
From: Simon Pieters
Date: Mon, 24 Jun 2019 22:03:15 +0200
Subject: [PATCH 095/131] Address feedback: aria-label is not rendered
visually; mention hidden attribute in accname algo
---
aria-practices.html | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/aria-practices.html b/aria-practices.html
index 7a5aab03a2..05d541631c 100644
--- a/aria-practices.html
+++ b/aria-practices.html
@@ -3863,7 +3863,7 @@ Naming with Child Content
Naming with a String Attribute Via aria-label
- The aria-label property enables authors to specify a string that will name an element.
+ The aria-label property enables authors to specify a string that will name an element without being rendered visually.
For example, the name of the following button is "Close".
<button type="button" aria-label="Close">X</button>
@@ -3919,7 +3919,7 @@ Naming with Referenced Content Via aria-labelledby
It has the highest precedence when browsers calculate accessible names, i.e., it overrides names from child content and all other naming attributes, including aria-label
.
It can concatenate content from multiple elements into a single name string.
- It incorporates content from elements regardless of their visibility, i.e., it even includes content from elements with display:none
or visibility:hidden
in the calculated name string.
+ It incorporates content from elements regardless of their visibility, i.e., it even includes content from elements with the HTML hidden
attribute, or CSS display: none
or visibility: hidden
in the calculated name string.
<span id="night-mode-label" hidden>Night mode</span>
<input type="checkbox" role="switch" aria-labelledby="night-mode-label">
From 8a832bd7a4e68177cca5f59294cc7655d2252d0a Mon Sep 17 00:00:00 2001
From: Simon Pieters
Date: Mon, 24 Jun 2019 22:08:55 +0200
Subject: [PATCH 096/131] =?UTF-8?q?Address=20feedback:=20alert=20=E2=86=92?=
=?UTF-8?q?=20button?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
aria-practices.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/aria-practices.html b/aria-practices.html
index 05d541631c..7cf65972e8 100644
--- a/aria-practices.html
+++ b/aria-practices.html
@@ -3942,7 +3942,7 @@ Naming with Referenced Content Via aria-labelledby
<button id="download-button" aria-labelledby="download-button download-details">Download</button>
<span id="download-details">PDF, 2.4 MB</span>
- In the above example, the accessible name of the alert will be "Download PDF, 2.4 MB", with a space between "Download" and "PDF", and not "DownloadPDF, 2.4 MB".
+ In the above example, the accessible name of the button will be "Download PDF, 2.4 MB", with a space between "Download" and "PDF", and not "DownloadPDF, 2.4 MB".
- The
aria-labelledby
property cannot be chained, i.e., if an element with aria-labelledby
references another element that also has aria-labelledby
, the aria-labelledby
attribute on the referenced element will be ignored.
- If an element is referenced by
aria-labelledby
more than one time during a name calculation, the second and any subsequent references will be ignored.
From 7f17265f629f6e6b7a9c46bd5aa4f5f42aaab2f8 Mon Sep 17 00:00:00 2001
From: Simon Pieters
Date: Mon, 24 Jun 2019 22:10:09 +0200
Subject: [PATCH 097/131] =?UTF-8?q?Address=20feedback:=20Browsers=20?=
=?UTF-8?q?=E2=86=92=20browsers?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
aria-practices.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/aria-practices.html b/aria-practices.html
index 7cf65972e8..0d6261753e 100644
--- a/aria-practices.html
+++ b/aria-practices.html
@@ -3959,7 +3959,7 @@ Naming with Referenced Content Via aria-labelledby
Naming Form Controls with the Label Element
The HTML label
element enables authors to identify content that serves as a label and associate it with a form control.
- When a label
element is associated with a form control, Browsers calculate an accessible name for the form control from the label
content.
+ When a label
element is associated with a form control, browsers calculate an accessible name for the form control from the label
content.
For example, text displayed adjacent to a checkbox may be visually associated with the checkbox, so it is understood as the checkbox label by users who can perceive that visual association.
From 8fb9dbe39329612afe4d03b63c09ff8db78f6b28 Mon Sep 17 00:00:00 2001
From: Simon Pieters
Date: Mon, 24 Jun 2019 22:12:36 +0200
Subject: [PATCH 098/131] =?UTF-8?q?Address=20feedback:=20labeling=20?=
=?UTF-8?q?=E2=86=92=20labelling,=20labeled=20=E2=86=92=20labelled?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
aria-practices.html | 34 +++++++++++++++++-----------------
1 file changed, 17 insertions(+), 17 deletions(-)
diff --git a/aria-practices.html b/aria-practices.html
index 0d6261753e..375bac20d9 100644
--- a/aria-practices.html
+++ b/aria-practices.html
@@ -377,7 +377,7 @@ Keyboard Interaction
WAI-ARIA Roles, States, and Properties
- Breadcrumb trail is contained within a navigation landmark region.
- - The landmark region is labeled via aria-label or aria-labelledby.
+ - The landmark region is labelled via aria-label or aria-labelledby.
-
The link to the current page has aria-current set to
page
.
If the element representing the current page is not a link, aria-current is optional.
@@ -397,7 +397,7 @@ Button
-
Toggle button: A two-state button that can be either off (not pressed) or on (pressed).
To tell assistive technologies that a button is a toggle button, specify a value for the attribute aria-pressed.
- For example, a button labeled mute in an audio player could indicate that sound is muted by setting the pressed state true.
+ For example, a button labelled mute in an audio player could indicate that sound is muted by setting the pressed state true.
Important: it is critical the label on a toggle does not change when its state changes.
In this example, when the pressed state is true, the label remains "Mute" so a screen reader would say something like "Mute toggle button pressed".
Alternatively, if the design were to call for the button label to change from "Mute" to "Unmute," the aria-pressed attribute would not be needed.
@@ -1045,7 +1045,7 @@
WAI-ARIA Roles, States, and Properties
- When a descendant of a listbox, grid, or tree popup is focused, DOM focus remains on the textbox and the textbox has aria-activedescendant set to a value that refers to the focused element within the popup.
- In a combobox with a listbox, grid, or tree popup, when a suggested value is visually indicated as the currently selected value, the
option
, gridcell
, row
, or treeitem
containing that value has aria-selected set to true
.
-
- If the combobox has a visible label, the element with role combobox has aria-labelledby set to a value that refers to the labeling element.
+ If the combobox has a visible label, the element with role combobox has aria-labelledby set to a value that refers to the labelling element.
Otherwise, the combobox element has a label provided by aria-label.
- The textbox element has aria-autocomplete set to a value that corresponds to its autocomplete behavior:
@@ -1496,7 +1496,7 @@
Layout Grids for Grouping Widgets
- Unlike grids used to present data, A grid
used for layout does not necessarily have header cells for labeling rows or columns and might contain only a single row or a single column.
+ Unlike grids used to present data, A grid
used for layout does not necessarily have header cells for labelling rows or columns and might contain only a single row or a single column.
Even if it has multiple rows and columns, it may present a single, logically homogenous set of elements.
For example, a list of recipients for a message may be a grid where each cell contains a link that represents a recipient.
The grid may initially have a single row but then wrap into multiple rows as recipients are added.
@@ -1689,7 +1689,7 @@
WAI-ARIA Roles, States, and Properties
-
- If there is an element in the user interface that serves as a label for the grid, aria-labelledby is set on the grid element with a value that refers to the labeling element.
+ If there is an element in the user interface that serves as a label for the grid, aria-labelledby is set on the grid element with a value that refers to the labelling element.
Otherwise, a label is specified for the grid element using aria-label.
- If the grid has a caption or description, aria-describedby is set on the grid element with a value referring to the element containing the description.
@@ -2072,7 +2072,7 @@ WAI-ARIA Roles, States, and Properties
- Items in a menu may be divided into groups by placing an element with a role of separator between groups. For example, this technique should be used when a menu contains a set of menuitemradio items.
- All separators should have aria-orientation consistent with the separator's orientation.
-
- If a menubar has a visible label, the element with role
menubar
has aria-labelledby set to a value that refers to the labeling element.
+ If a menubar has a visible label, the element with role menubar
has aria-labelledby set to a value that refers to the labelling element.
Otherwise, the menubar element has a label provided by aria-label.
-
@@ -2266,7 +2266,7 @@
WAI-ARIA Roles, States, and Properties
set to false
.
-
- Each
radio
element is labeled by its content, has a visible label
+ Each radio
element is labelled by its content, has a visible label
referenced by
aria-labelledby,
or has a label specified with
@@ -2529,7 +2529,7 @@ WAI-ARIA Roles, States, and Properties
-
- If there is an element in the user interface that serves as a label for the table, aria-labelledby is set on the table element with a value that refers to the labeling element.
+ If there is an element in the user interface that serves as a label for the table, aria-labelledby is set on the table element with a value that refers to the labelling element.
Otherwise, a label is specified for the table element using aria-label.
- If the table has a caption or description, aria-describedby is set on the table element with a value referring to the element containing the description.
@@ -2645,7 +2645,7 @@ WAI-ARIA Roles, States, and Properties
- Each element that serves as a tab has role tab and is contained within the element with role
tablist
.
- Each element that contains the content panel for a
tab
has role tabpanel.
-
- If the tab list has a visible label, the element with role
tablist
has aria-labelledby set to a value that refers to the labeling element.
+ If the tab list has a visible label, the element with role tablist
has aria-labelledby set to a value that refers to the labelling element.
Otherwise, the tablist
element has a label provided by aria-label.
- Each element with role
tab
has the property aria-controls referring to its associated tabpanel
element.
@@ -3178,7 +3178,7 @@ WAI-ARIA Roles, States, and Properties
-
- If there is an element in the user interface that serves as a label for the treegrid, aria-labelledby is set on the grid element with a value that refers to the labeling element.
+ If there is an element in the user interface that serves as a label for the treegrid, aria-labelledby is set on the grid element with a value that refers to the labelling element.
Otherwise, a label is specified for the grid element using aria-label.
- If the treegrid has a caption or description, aria-describedby is set on the grid element with a value referring to the element containing the description.
@@ -3229,7 +3229,7 @@ Window Splitter
For example, consider a book reading application with a primary pane for the table of contents and a secondary pane that displays content from a section of the book.
- The two panes are divided by a vertical splitter labeled "Table of Contents".
+ The two panes are divided by a vertical splitter labelled "Table of Contents".
When the table of contents pane has its maximum size, the splitter has a value of 100
,
and when the table of contents is completely collapsed, the splitter has a value of 0
.
@@ -3280,7 +3280,7 @@ WAI-ARIA Roles, States, and Properties
Landmark Regions
ARIA landmark roles provide a powerful way to identify the organization and structure of a web page.
- By classifying and labeling sections of a page, they enable structural information that is conveyed visually through layout to be represented programmatically.
+ By classifying and labelling sections of a page, they enable structural information that is conveyed visually through layout to be represented programmatically.
Screen readers exploit landmark roles to provide keyboard navigation to important sections of a page.
Landmark regions can also be used as targets for "skip links" and by browser extensions to enhanced keyboard navigation.
@@ -3378,7 +3378,7 @@ General Principles of Landmark Design
-
If a specific landmark role is used more than once on a page, provide each instance of that landmark with a unique label.
There is one rare circumstance where providing the same label to multiple instances of a landmark can be beneficial: the content and purpose of each instance is identical.
- For example, a large search results table has two sets of identical pagination controls -- one above and one below the table, so each set is in a navigation region labeled
Search Results
.
+ For example, a large search results table has two sets of identical pagination controls -- one above and one below the table, so each set is in a navigation region labelled Search Results
.
In this case, adding extra information to the label that distinguishes the two instances may be more distracting than helpful.
@@ -3964,7 +3964,7 @@ Naming Form Controls with the Label Element
For example, text displayed adjacent to a checkbox may be visually associated with the checkbox, so it is understood as the checkbox label by users who can perceive that visual association.
However, unless the text is programmatically associated with the checkbox, assistive technology users will experience a checkbox without a label.
- Wrapping the checkbox and the labeling text in a label
element as follows gives the checkbox an accessible name.
+ Wrapping the checkbox and the labelling text in a label
element as follows gives the checkbox an accessible name.
<label>
@@ -3984,7 +3984,7 @@ Naming Form Controls with the Label Element
Using the label
element is an effective technique for satisfying Rule 2: Prefer Visible Text.
It also satisfies Rule 3: Prefer Native Techniques.
- Native HTML labels offer an important usability and accessibility advantage over ARIA labeling techniques: browsers automatically make clicking the label equivalent to clicking the form control.
+ Native HTML labels offer an important usability and accessibility advantage over ARIA labelling techniques: browsers automatically make clicking the label equivalent to clicking the form control.
This increases the hit area of the form control.
@@ -4067,7 +4067,7 @@ Naming Tables and Figures with Captions
Fallback Names Derived from Titles and Placeholders
- When an accessible name is not provided using one of the primary techniques (e.g., the aria-label
or aria-labelledby
attributes), or native markup techniques (e.g., the HTML label
element, or the alt
attribute of the HTML img
element), an accessible name can be derived from some other attributes as a fallback mechanism. In general, prefer the explicit labeling techniques described above over fallback techniques described in this section.
+ When an accessible name is not provided using one of the primary techniques (e.g., the aria-label
or aria-labelledby
attributes), or native markup techniques (e.g., the HTML label
element, or the alt
attribute of the HTML img
element), an accessible name can be derived from some other attributes as a fallback mechanism. In general, prefer the explicit labelling techniques described above over fallback techniques described in this section.
Any HTML element can have a title
attribute specified. The title
attribute is used as the element's fallback accessible name. The title
attribute is commonly presented visually as a tooltip when the user hovers over the element with a pointing device, which is not particularly discoverable, and is also not accessible to visual users without a pointing device.
@@ -4079,7 +4079,7 @@ Fallback Names Derived from Titles and Placeholders
<label><input name="starter-class" value="blue"> Blue</label>
</fieldset>
- For the HTML input
and textarea
elements, the placeholder
attribute is used as a fallback labeling mechanism if nothing else (including the title
attribute) results in a label. It is better to use a label
element, since it does not disappear visually when the user focuses the form control.
+ For the HTML input
and textarea
elements, the placeholder
attribute is used as a fallback labelling mechanism if nothing else (including the title
attribute) results in a label. It is better to use a label
element, since it does not disappear visually when the user focuses the form control.
<!-- Using a <label> is recommended -->
<label>Search <input type=search name=q></label>
From a16cf6b75eb7cf9e9fd5edf5c6408dd4545a86eb Mon Sep 17 00:00:00 2001
From: Simon Pieters
Date: Mon, 24 Jun 2019 22:16:56 +0200
Subject: [PATCH 099/131] Address feedback: move a paragraph in fieldset
section
---
aria-practices.html | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/aria-practices.html b/aria-practices.html
index 375bac20d9..afb6f7eacb 100644
--- a/aria-practices.html
+++ b/aria-practices.html
@@ -3995,11 +3995,6 @@ Naming Fieldsets with the Legend Element
The HTML fieldset
element can be used to group form controls, which can make forms easier to navigate.
The legend
element can be used to give the group a name.
-
- This grouping technique is particularly useful for presenting multiple choice questions.
- It enables authors to associate a question with a group of answers.
- If a question is not programmatically associated with its answer options, assistive technology users could access the answers without being aware of the question.
-
For example, a group of radio buttons can be grouped together in a fieldset
, where the legend
element labels the group for the radio buttons.
<fieldset>
@@ -4009,6 +4004,11 @@ Naming Fieldsets with the Legend Element
<label><input name="starter-class" value="blue"> Blue</label>
</fieldset>
+
+ This grouping technique is particularly useful for presenting multiple choice questions.
+ It enables authors to associate a question with a group of answers.
+ If a question is not programmatically associated with its answer options, assistive technology users could access the answers without being aware of the question.
+
Other types of related form fields can also be grouped using fieldset
and legend
.
This helps users navigate the form group-by-group.
From 972fe21d4e0edecf6adc8dc911f2a97879b54af7 Mon Sep 17 00:00:00 2001
From: Simon Pieters
Date: Mon, 24 Jun 2019 22:42:10 +0200
Subject: [PATCH 100/131] Address feedback: remove duplicate area alt
---
aria-practices.html | 3 ---
1 file changed, 3 deletions(-)
diff --git a/aria-practices.html b/aria-practices.html
index afb6f7eacb..7c799f7f56 100644
--- a/aria-practices.html
+++ b/aria-practices.html
@@ -4762,9 +4762,6 @@ Accessible name calculation
table
The first child caption
element.
-
- area
- The alt
attribute.
If the name is still empty, then for elements with a role that supports naming from child content, the content of the element is used.
From 47887c00e66f917a1a4be98fc07fe31d0136bc03 Mon Sep 17 00:00:00 2001
From: Simon Pieters
Date: Mon, 24 Jun 2019 22:42:47 +0200
Subject: [PATCH 101/131] Address feedback: fix typo falback
---
aria-practices.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/aria-practices.html b/aria-practices.html
index 7c799f7f56..8ceb4d8fac 100644
--- a/aria-practices.html
+++ b/aria-practices.html
@@ -4803,7 +4803,7 @@ Accessible name calculation
Examples of non-recursive accessible name calculation
Consider an input
element that has no associated label
element and only a name
attribute and so does not have an accessible name (do not do this):
<input name="code">
- If there is a placeholder
attribute, then it serves as a naming falback mechanism (avoid doing this):
+ If there is a placeholder
attribute, then it serves as a naming fallback mechanism (avoid doing this):
<input name="code"
placeholder="One-time code">
From 8de8e443d886827da4c5f39ecdfcb17709ba6657 Mon Sep 17 00:00:00 2001
From: Simon Pieters
Date: Mon, 24 Jun 2019 22:44:27 +0200
Subject: [PATCH 102/131] Address feedback: clarify aria-labelledby recursion
is not chaining
---
aria-practices.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/aria-practices.html b/aria-practices.html
index 8ceb4d8fac..a0049bc232 100644
--- a/aria-practices.html
+++ b/aria-practices.html
@@ -4794,7 +4794,7 @@ Accessible name calculation
When calculating a name from content, the user agent walks through all descendant nodes.
- And, when following aria-labelledby
references, it similarly walks the tree of each referenced element.
+ And, when following references in an aria-labelledby
attribute, it similarly walks the tree of each referenced element.
Thus, the naming algorithm is recursive.
The following two sections provide non-recursive and recursive examples of how the algorithm works.
From 1d38d3bb3a4a818c66714bd1a115693437965f22 Mon Sep 17 00:00:00 2001
From: Simon Pieters
Date: Mon, 24 Jun 2019 22:47:37 +0200
Subject: [PATCH 103/131] Address feedback: fix typo an label; fix consistency
in aria-label example
---
aria-practices.html | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/aria-practices.html b/aria-practices.html
index a0049bc232..850c1a0b8f 100644
--- a/aria-practices.html
+++ b/aria-practices.html
@@ -4814,7 +4814,7 @@ Examples of non-recursive accessible name calculation
placeholder="123456"
title="One-time code">
- If there is also an label
element (recommended), then that is used as the accessible name, and the title
attribute is instead used as the accessible description:
+ If there is also a label
element (recommended), then that is used as the accessible name, and the title
attribute is instead used as the accessible description:
<label>One-time code
<input name="code"
@@ -4822,7 +4822,7 @@ Examples of non-recursive accessible name calculation
title="Get your code from the app.">
</label>
- If there is also an aria-label
attribute, then that overrides the label
element:
+ If there is also an aria-label
attribute (not recommended unless it adds clarity for assistive technology users), then that becomes the accessible name, overriding the label
element:
<label>Code
<input name="code"
From debb672134203f8360f760924c2c6a075230cebf Mon Sep 17 00:00:00 2001
From: Matt King
Date: Mon, 24 Jun 2019 23:35:34 -0700
Subject: [PATCH 104/131] Revise description of aria-label to clarify that the
string is not visually rendered as opposed to the element being named.
---
aria-practices.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/aria-practices.html b/aria-practices.html
index 850c1a0b8f..83fc48b9cd 100644
--- a/aria-practices.html
+++ b/aria-practices.html
@@ -3863,7 +3863,7 @@ Naming with Child Content
Naming with a String Attribute Via aria-label
- The aria-label property enables authors to specify a string that will name an element without being rendered visually.
+ The aria-label property enables authors to name an element with a string that is not visually rendered.
For example, the name of the following button is "Close".
<button type="button" aria-label="Close">X</button>
From 82f3b2fb0378a50431abd360676501e64130db58 Mon Sep 17 00:00:00 2001
From: Matt King
Date: Mon, 24 Jun 2019 23:44:01 -0700
Subject: [PATCH 105/131] Minor editorial revision to aria-labelledby feature
list
---
aria-practices.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/aria-practices.html b/aria-practices.html
index 83fc48b9cd..61c07dd792 100644
--- a/aria-practices.html
+++ b/aria-practices.html
@@ -3919,7 +3919,7 @@ Naming with Referenced Content Via aria-labelledby
It has the highest precedence when browsers calculate accessible names, i.e., it overrides names from child content and all other naming attributes, including aria-label
.
It can concatenate content from multiple elements into a single name string.
- It incorporates content from elements regardless of their visibility, i.e., it even includes content from elements with the HTML hidden
attribute, or CSS display: none
or visibility: hidden
in the calculated name string.
+ It incorporates content from elements regardless of their visibility, i.e., it even includes content from elements with the HTML hidden
attribute, CSS display: none
, or CSS visibility: hidden
in the calculated name string.
<span id="night-mode-label" hidden>Night mode</span>
<input type="checkbox" role="switch" aria-labelledby="night-mode-label">
From 1ee6b0985e25566b4e54d827ae29e274cb745898 Mon Sep 17 00:00:00 2001
From: Matt King
Date: Tue, 25 Jun 2019 00:05:26 -0700
Subject: [PATCH 106/131] Change labelled and labelling to labeled and labeling
except in aria-labelledby
---
aria-practices.html | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/aria-practices.html b/aria-practices.html
index 61c07dd792..efd0ca7c6e 100644
--- a/aria-practices.html
+++ b/aria-practices.html
@@ -3906,7 +3906,7 @@ Naming with Referenced Content Via aria-labelledby
<span role="switch" aria-checked="false" tabindex="0" aria-labelledby="night-mode-label"></span>
- Note that while using aria-labelledby
is similar in this situation to using an HTML label
element with the for
attribute, one significant difference is that browsers do not automatically make clicking on the labelling element activate the labelled element; that is an author responsibility.
+ Note that while using aria-labelledby
is similar in this situation to using an HTML label
element with the for
attribute, one significant difference is that browsers do not automatically make clicking on the labeling element activate the labeled element; that is an author responsibility.
However, HTML label
cannot be used to label a span
element.
Fortunately, an HTML input
with type="checkbox"
allows the ARIA switch
role, so when feasible, using the following approach creates a more robust solution.
@@ -3964,7 +3964,7 @@ Naming Form Controls with the Label Element
For example, text displayed adjacent to a checkbox may be visually associated with the checkbox, so it is understood as the checkbox label by users who can perceive that visual association.
However, unless the text is programmatically associated with the checkbox, assistive technology users will experience a checkbox without a label.
- Wrapping the checkbox and the labelling text in a label
element as follows gives the checkbox an accessible name.
+ Wrapping the checkbox and the labeling text in a label
element as follows gives the checkbox an accessible name.
<label>
@@ -3984,7 +3984,7 @@ Naming Form Controls with the Label Element
Using the label
element is an effective technique for satisfying Rule 2: Prefer Visible Text.
It also satisfies Rule 3: Prefer Native Techniques.
- Native HTML labels offer an important usability and accessibility advantage over ARIA labelling techniques: browsers automatically make clicking the label equivalent to clicking the form control.
+ Native HTML labels offer an important usability and accessibility advantage over ARIA labeling techniques: browsers automatically make clicking the label equivalent to clicking the form control.
This increases the hit area of the form control.
@@ -4067,7 +4067,7 @@ Naming Tables and Figures with Captions
Fallback Names Derived from Titles and Placeholders
- When an accessible name is not provided using one of the primary techniques (e.g., the aria-label
or aria-labelledby
attributes), or native markup techniques (e.g., the HTML label
element, or the alt
attribute of the HTML img
element), an accessible name can be derived from some other attributes as a fallback mechanism. In general, prefer the explicit labelling techniques described above over fallback techniques described in this section.
+ When an accessible name is not provided using one of the primary techniques (e.g., the aria-label
or aria-labelledby
attributes), or native markup techniques (e.g., the HTML label
element, or the alt
attribute of the HTML img
element), an accessible name can be derived from some other attributes as a fallback mechanism. In general, prefer the explicit labeling techniques described above over fallback techniques described in this section.
Any HTML element can have a title
attribute specified. The title
attribute is used as the element's fallback accessible name. The title
attribute is commonly presented visually as a tooltip when the user hovers over the element with a pointing device, which is not particularly discoverable, and is also not accessible to visual users without a pointing device.
@@ -4079,7 +4079,7 @@ Fallback Names Derived from Titles and Placeholders
<label><input name="starter-class" value="blue"> Blue</label>
</fieldset>
- For the HTML input
and textarea
elements, the placeholder
attribute is used as a fallback labelling mechanism if nothing else (including the title
attribute) results in a label. It is better to use a label
element, since it does not disappear visually when the user focuses the form control.
+ For the HTML input
and textarea
elements, the placeholder
attribute is used as a fallback labeling mechanism if nothing else (including the title
attribute) results in a label. It is better to use a label
element, since it does not disappear visually when the user focuses the form control.
<!-- Using a <label> is recommended -->
<label>Search <input type=search name=q></label>
@@ -4790,7 +4790,7 @@ Accessible name calculation
- The final step is a fallback mechanism. Generally when labelling an element, use one of the non-fallback mechanisms.
+ The final step is a fallback mechanism. Generally when labeling an element, use one of the non-fallback mechanisms.
When calculating a name from content, the user agent walks through all descendant nodes.
@@ -4847,7 +4847,7 @@
Examples of non-recursive accessible name calculation
Examples of recursive accessible name calculation
- The accessible name calculation algorithm will be invoked recursively when necessary. An `aria-labelledby` reference causes the algorithm to be invoked recursively, and when computing an accessible name from content the algorithm is invoked recursively for each child node.
+ The accessible name calculation algorithm will be invoked recursively when necessary. An aria-labelledby
reference causes the algorithm to be invoked recursively, and when computing an accessible name from content the algorithm is invoked recursively for each child node.
In this example, the label for the button is computed by recursing into each child node, resulting in Move to trash
.
From 0797c1e4e39e5f5d449b1568d3baa35ae7da0c85 Mon Sep 17 00:00:00 2001
From: Matt King
Date: Tue, 25 Jun 2019 00:23:27 -0700
Subject: [PATCH 107/131] Change 'necessity' tto 'necessary' in table column
description
---
aria-practices.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/aria-practices.html b/aria-practices.html
index efd0ca7c6e..4361f8bf0b 100644
--- a/aria-practices.html
+++ b/aria-practices.html
@@ -4140,7 +4140,7 @@ Accessible Name Guidance by Role
Necessity of Naming
- Indicates how necessity it is for authors to add a naming attribute or element to supplement or override the content of an element with the specified role.
+ Indicates how necessary it is for authors to add a naming attribute or element to supplement or override the content of an element with the specified role.
This column may include one of the following values:
-
From 03f1ee209e4483a875ab7123befa4e9bf55d3e24 Mon Sep 17 00:00:00 2001
From: Matt King
Date: Tue, 25 Jun 2019 01:25:19 -0700
Subject: [PATCH 108/131] Revise naming guidance for document role
---
aria-practices.html | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/aria-practices.html b/aria-practices.html
index 4361f8bf0b..a937655926 100644
--- a/aria-practices.html
+++ b/aria-practices.html
@@ -4301,8 +4301,12 @@
Accessible Name Guidance by Role
document |
- Do Not Name |
- The document role is used to hint to the assistive technology to switch back to "reading mode" within an application or widget. That element should have a name. |
+ Discretionary |
+
+ Elements with the document role are contained within an element with the application element, which is required to have a name.
+ Typically, the name of the application element will provide sufficient context and identity for the document element.
+ Because the application element is used only to create unusual, custom widgets, careful assessment is necessary to determine whether or not adding an accessible name is beneficial.
+ |
feed |
From be8ed01e725f0dc23e4d23dde0ec208887570e5a Mon Sep 17 00:00:00 2001
From: Simon Pieters
Date: Tue, 25 Jun 2019 18:18:43 +0200
Subject: [PATCH 109/131] Address feedback: typo
---
aria-practices.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/aria-practices.html b/aria-practices.html
index a937655926..b69b53bc8b 100644
--- a/aria-practices.html
+++ b/aria-practices.html
@@ -4303,7 +4303,7 @@ Accessible Name Guidance by Roledocument
Discretionary |
- Elements with the document role are contained within an element with the application element, which is required to have a name.
+ Elements with the document role are contained within an element with the application role, which is required to have a name.
Typically, the name of the application element will provide sufficient context and identity for the document element.
Because the application element is used only to create unusual, custom widgets, careful assessment is necessary to determine whether or not adding an accessible name is beneficial.
|
From bed7986ccacb439314cddba8cec78ff7a5e9041f Mon Sep 17 00:00:00 2001
From: Simon Pieters
Date: Tue, 25 Jun 2019 20:18:05 +0200
Subject: [PATCH 110/131] Recommendation for note
---
aria-practices.html | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/aria-practices.html b/aria-practices.html
index b69b53bc8b..185ec000df 100644
--- a/aria-practices.html
+++ b/aria-practices.html
@@ -4530,8 +4530,13 @@ Accessible Name Guidance by Role
note |
- namerequired |
- guidance |
+ Discretionary |
+
+
+ - Naming is optional, but can help screen reader users understand the context and purpose of the note.
+ - Named using
aria-labelledby if a visible title is present, otherwise with aria-label .
+
+ |
option |
From ae5938cb62e7eacf4a5f8826a4e8e69e99bd012a Mon Sep 17 00:00:00 2001
From: Simon Pieters
Date: Tue, 25 Jun 2019 20:24:10 +0200
Subject: [PATCH 111/131] Recommendation for option
---
aria-practices.html | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/aria-practices.html b/aria-practices.html
index 185ec000df..f3e47074cc 100644
--- a/aria-practices.html
+++ b/aria-practices.html
@@ -4541,7 +4541,13 @@ Accessible Name Guidance by Role
option |
Required Only If Content Insufficient |
- guidance |
+
+
+ - Warning! Using
aria-label or aria-labelledby will hide any descendant content from assistive technologies.
+ - Ideally named by visible, descendant content.
+ - See the Combo Box Design Pattern.
+
+ |
presentation |
From f1b5a9376ed8b7f36ddf9904cfb264fcd0278f36 Mon Sep 17 00:00:00 2001
From: Simon Pieters
Date: Tue, 25 Jun 2019 20:29:10 +0200
Subject: [PATCH 112/131] Recommendation for progressbar
---
aria-practices.html | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/aria-practices.html b/aria-practices.html
index f3e47074cc..1e2946f1a1 100644
--- a/aria-practices.html
+++ b/aria-practices.html
@@ -4557,7 +4557,13 @@ Accessible Name Guidance by Role
progressbar |
Required |
- guidance |
+
+
+ - If the
progressbar role is applied to an HTML progress element, can be named with an HTML label element.
+ - Otherwise use
aria-labelledby if a visible label is present.
+ - Use
aria-label if a visible label is not present.
+
+ |
radio |
From 0e10d3788ee1a923f42aefccbe108b633e41cd08 Mon Sep 17 00:00:00 2001
From: Simon Pieters
Date: Wed, 26 Jun 2019 14:51:46 +0200
Subject: [PATCH 113/131] Recommendation for radiogroup
---
aria-practices.html | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/aria-practices.html b/aria-practices.html
index 1e2946f1a1..3fd6ce73cc 100644
--- a/aria-practices.html
+++ b/aria-practices.html
@@ -4579,7 +4579,15 @@ Accessible Name Guidance by Role
radiogroup |
Required |
- guidance |
+
+
+ - Recommended to label a group of
radio buttons.
+ - Use
aria-labelledby if a visible title is present, otherwise use aria-label .
+ - See the Radio Group Design Pattern.
+
+
+ To-do: What's the relationship between fieldset and radiogroup?
+ |
region |
From 50fc11dba99e0a891de5d9aaa8cad3ca5f7a702f Mon Sep 17 00:00:00 2001
From: Simon Pieters
Date: Wed, 26 Jun 2019 15:01:09 +0200
Subject: [PATCH 114/131] Recommendation for region, search
---
aria-practices.html | 25 ++++++++++++++++++++-----
1 file changed, 20 insertions(+), 5 deletions(-)
diff --git a/aria-practices.html b/aria-practices.html
index 3fd6ce73cc..d7c0ed6edc 100644
--- a/aria-practices.html
+++ b/aria-practices.html
@@ -4201,6 +4201,7 @@ Accessible Name Guidance by Role
- Necessary in the uncommon circumstance where two banner landmark regions are present on the same page. It is otherwise optional.
- Named using
aria-labelledby
if a visible title is present, otherwise with aria-label
.
+ - See the Banner Landmark Role.
@@ -4266,6 +4267,7 @@ Accessible Name Guidance by RoleNaming is necessary when two complementary landmark regions are present on the same page.
- Naming is recommended even when one complementary region is present to help users understand the purpose of the region's content when navigating among landmark regions.
- Use
aria-labelledby
if a visible title is present, otherwise use aria-label
.
+ - See the Complementary Landmark Role.
@@ -4337,7 +4339,7 @@ Accessible Name Guidance by Role
- Helps screen reader users understand the context and purpose of the form landmark.
- Use
aria-labelledby
if a visible title is present, otherwise use aria-label
.
- - See the Form Design Pattern.
+ - See the Form Landmark Role.