From 9cfb3aaec153209dfc0a1894498d93d64a94a264 Mon Sep 17 00:00:00 2001
From: Scott O'Hara
- If the `img` lacks an `alt` attribute and lacks any other
- `img` naming methods:
- Otherwise, if the `img` has an author defined accessible name,
- see `img` with an accessible name.
-
+ If the `img` has no `alt` attribute or no accessible name:
+ No `role` other than the
+
- If the `img` has no `alt` attribute or accessible name:
- No `role` other than the
-
If the `img` has an empty `alt=""` attribute and no `aria-label` or `aria-labelledby` attributes to provide it an accessible name:
No `role` other than the
- If the `img` has an empty `alt=""` attribute and no `aria-label` or `aria-labelledby` attributes to provide it an accessible name:
No `role` other than the
- Since this specification become a W3C Recommendation on 09 December 2021,
- the following substantive additions and/or corrections have been proposed:
-
- Reviewers of the document can identify candidate additions
- and/or corrections by their distinctive styling in the document:
- Candidate corrections are marked in the document. Candidate additions are marked in the document.
[[wai-aria-1.2|WAI-ARIA]] identifies roles which have
prohibited states and properties.
@@ -507,7 +357,6 @@
While setting an ARIA `role` and/or `aria-*` attribute that matches the implicit ARIA semantics
is NOT RECOMMENDED, in some situations explicitly setting these attributes can be helpful – for instance,
@@ -592,7 +441,7 @@
Any `role`, though
Otherwise, global `aria-*` attributes
and any `aria-*` attributes applicable to the allowed roles.
@@ -610,7 +459,7 @@
Otherwise, global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.
Roles:
`button`
@@ -670,7 +518,6 @@
Otherwise, any `role`, though
+
Naming Prohibited if exposed as the `generic` role, or if exposed
as another role which prohibits naming.
Any `role`, though
Otherwise, global `aria-*` attributes
and any `aria-*` attributes applicable to the allowed roles.
@@ -820,7 +667,7 @@
Any `role`, though
Otherwise, global `aria-*` attributes
and any `aria-*` attributes applicable to the allowed roles.
@@ -838,7 +685,7 @@
Any `role`, though
Otherwise, global `aria-*` attributes
and any `aria-*` attributes applicable to the allowed roles.
@@ -873,12 +720,10 @@
No `role` other than
Otherwise, global `aria-*` attributes
-
- allowed for the `generic` role, with the exception that authors MUST NOT specify `aria-hidden=true` on the `body` element.
-
+ allowed for the `generic` role, with the exception that authors MUST NOT specify `aria-hidden=true` on the `body` element.
If the `img` has non-empty [^img/alt^] (`alt="some text"`) or an accessible name is provided by another
`img` naming method,
- or the `img` has no `alt` and has not been provided a name:
+ or the `img` has no `alt` and no accessible name:
role=img or image
@@ -1659,7 +1659,7 @@
From bd9e2892b025ad7116231dbd21d3ac841c690a9f Mon Sep 17 00:00:00 2001
From: Scott O'Hara
- [^img^] with no accessible name
+ [^img^] with empty `alt` and no accessible name
role=none,
role=presentation
-
- role=img or image
-
@@ -1693,10 +1688,6 @@
No `aria-*` attributes
except `aria-hidden="true"`.
-
Global `aria-*` attributes
and any `aria-*` attributes applicable to the allowed roles.
+
+
role=none or presentation roles.
+ (role=img or image is also allowed, but NOT RECOMMENDED.)
+
@@ -1673,12 +1680,6 @@
role=none or presentation roles.
- (role=img or image is also allowed, but NOT RECOMMENDED.)
- role=none or
From c74f9bf32b11aeb38204b28dba0b3afd15fb3d92 Mon Sep 17 00:00:00 2001
From: Scott O'Hara
role=none or
presentation roles, which are NOT RECOMMENDED.
-
-
@@ -488,13 +339,12 @@
(role, states, and properties) given in the cell in the second column of the same row.
The third cell in each row defines the ARIA `role` values and `aria-*` attributes which authors MAY specify
on the element. Where a cell in the third column includes the term Any `role`
- it indicates that any `role` value MAY be used on the element. However,
+ it indicates that any `role` value MAY be used on the element. However,
it is NOT RECOMMENDED for authors to specify the implicit role of the element, the `generic` role, or a role
- deprecated by ARIA on these elements.
+ deprecated by ARIA on these elements.
If a cell in the third column includes the term No `role` it indicates
that authors MUST NOT overwrite the implicit ARIA semantics, or native semantics of the HTML element.
-
`aria-label` or `aria-labelledby` attribute, unless the element allows for its implicit role to be overwritten
by an explicit WAI-ARIA role which allows naming from authors. For more information see [[[#docconformance-naming]]].
-
generic SHOULD NOT be used.
-
+
role=generic
-
Otherwise, global `aria-*` attributes
and any `aria-*` attributes applicable to the allowed roles.
-
@@ -719,7 +566,7 @@
@@ -895,7 +740,7 @@
`doc-dedication`,
`doc-example`,
`doc-footnote`,
- `doc-glossary`,
+ `doc-glossary`,
`doc-pullquote`
or `doc-tip`
@@ -768,7 +615,7 @@
generic SHOULD NOT be used.
generic SHOULD NOT be used.
generic SHOULD NOT be used.
generic SHOULD NOT be used.
generic, which SHOULD NOT be used.
`none`
or `presentation`
+
Authors MAY specify the `aria-hidden` attribute on the `br` element. Otherwise, no other allowed `aria-*` attributes.
@@ -913,20 +758,19 @@
Roles:
`checkbox`,
- `combobox`,
- `gridcell`,
+ `combobox`,
+ `gridcell`,
`link`,
`menuitem`,
`menuitemcheckbox`,
`menuitemradio`,
`option`,
`radio`,
-
`separator`,
- `slider`,
+ `slider`,
`switch`,
`tab`,
- or `treeitem`.
+ or `treeitem`.
(button is also allowed, but NOT RECOMMENDED.)
@@ -966,7 +810,7 @@
No `role` other than `caption`, which is NOT RECOMMENDED.
Otherwise, global `aria-*` attributes.
@@ -983,7 +827,7 @@Otherwise, global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles. @@ -1001,7 +845,7 @@
Any `role`, though `code` is NOT RECOMMENDED.
Otherwise, global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles. @@ -1045,7 +889,7 @@
Any `role`, though generic SHOULD NOT be used.
Otherwise, global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles. @@ -1060,14 +904,12 @@
role=listbox
Any `role`, though `deletion` is NOT RECOMMENDED.
Otherwise, global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles. @@ -1165,13 +1007,13 @@
role=generic
+
If a direct child of a [^dl^] element,
only `presentation`
or `none`. Otherwise,
any `role`, though generic SHOULD NOT be used.
Otherwise, global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles. @@ -1228,7 +1070,7 @@
Any `role`, though `emphasis` is NOT RECOMMENDED.
Otherwise, global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles. @@ -1292,7 +1134,7 @@
Otherwise, global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles. @@ -1361,7 +1203,7 @@
Naming Prohibited if exposed as `generic`.
+Naming Prohibited if exposed as `generic`.
Otherwise, global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles. @@ -1426,7 +1268,7 @@
generic is also allowed, but SHOULD NOT be used.)
- +
Naming Prohibited if exposed as the `generic` role.
@@ -1502,7 +1344,7 @@
role=generic
is also allowed, but SHOULD NOT be used.)
- Naming Prohibited if exposed as `generic`.
+Naming Prohibited if exposed as `generic`.
Otherwise, global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles. @@ -1577,7 +1419,7 @@
Any `role`, though generic SHOULD NOT be used.
Otherwise, global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles. @@ -1609,9 +1451,7 @@
If the `img` has an empty `alt` ([^img/alt^]`=""`) and lacks any other
`img` naming methods:
role=none,
role=presentation
No `role` other than the role=none or
presentation roles, which are NOT RECOMMENDED.
@@ -1688,7 +1519,6 @@
Roles:
- `checkbox`,
- `combobox`,
- `gridcell`,
+ `checkbox`,
+ `combobox`,
+ `gridcell`,
`link`,
`menuitem`,
`menuitemcheckbox`,
`menuitemradio`,
`option`,
- `radio`,
-
+ `radio`,
`separator`,
- `slider`,
+ `slider`,
`switch`,
`tab`,
- or `treeitem`.
+ or `treeitem`.
(button is also allowed, but NOT RECOMMENDED.)
@@ -1739,7 +1568,7 @@
checkbox is also allowed, but NOT RECOMMENDED.)
- +
Authors MUST NOT use the `aria-checked` attribute on `input type=checkbox` elements.
@@ -1859,7 +1688,6 @@
role=button
The following roles are allowed, but are NOT RECOMMENDED: `button`, @@ -1885,7 +1713,6 @@
radio is also allowed, but NOT RECOMMENDED.)
- +
Authors MUST NOT use the `aria-checked` attribute on `input type=radio` elements.
@@ -1996,7 +1823,6 @@role=button
The following roles are allowed, but are NOT RECOMMENDED: `button`, @@ -2023,7 +1849,6 @@
role=button
The following roles are allowed, but are NOT RECOMMENDED: `button`, @@ -2079,7 +1903,6 @@
Any `role`, though `insertion` is NOT RECOMMENDED.
Otherwise, global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles. @@ -2228,7 +2051,7 @@
Otherwise, global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles. @@ -2269,7 +2092,7 @@
Otherwise, global `aria-*` attributes.
@@ -2292,7 +2115,6 @@
No `role` other than listitem, which is NOT RECOMMENDED,
if the parent list element has an implicit or explicit `list` role.
@@ -2304,17 +2126,14 @@
Global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.
-Authors SHOULD NOT use the following deprecated DPub Roles: `doc-biblioentry`, `doc-endnote`.
-Otherwise, global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles. @@ -2420,10 +2239,8 @@
Authors SHOULD NOT use deprecated `directory` role.
-navigation is also allowed, but NOT RECOMMENDED.)
@@ -2548,10 +2365,8 @@
Authors SHOULD NOT use deprecated `directory` role.
-
Any `role`, though `paragraph` is NOT RECOMMENDED.
Otherwise, global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles. @@ -2652,12 +2467,10 @@
Authors MAY specify the `aria-hidden` attribute on the `picture` element. Otherwise, no other allowed `aria-*` attributes.
-
Any `role`, though generic SHOULD NOT be used.
Otherwise, global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles. @@ -2711,7 +2524,7 @@
Any `role`, though generic SHOULD NOT be used.
Otherwise, global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles. @@ -2729,7 +2542,7 @@
Global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles. @@ -2747,7 +2560,7 @@
Otherwise, global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles. @@ -2779,10 +2592,10 @@
role=`deletion`
+
Any `role`, though `deletion` is NOT RECOMMENDED.
Otherwise, global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles. @@ -2800,7 +2613,7 @@
Any `role`, though generic SHOULD NOT be used.
Otherwise, global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles. @@ -2830,7 +2643,6 @@
Roles: `form`, @@ -2844,7 +2656,6 @@
Any `role`, though generic SHOULD NOT be used.
Otherwise, global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles. @@ -3043,7 +2854,7 @@
Any `role`, though generic SHOULD NOT be used.
Otherwise, global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles. @@ -3061,7 +2872,7 @@
Any `role`, though `strong` is NOT RECOMMENDED.
Otherwise, global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles. @@ -3092,7 +2903,7 @@
Any `role`, though `subscript` is NOT RECOMMENDED.
Otherwise, global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles. @@ -3112,7 +2923,6 @@
No `role` if the `summary` element is a summary for its parent details element. @@ -3128,7 +2938,6 @@
Any `role`, though superscript is NOT RECOMMENDED.
Otherwise, global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles. @@ -3374,7 +3183,7 @@
Any `role`, though time is NOT RECOMMENDED.
Otherwise, global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles. @@ -3438,7 +3247,7 @@
Any `role`, though generic SHOULD NOT be used.
Otherwise, global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles. @@ -3470,12 +3279,10 @@
Authors SHOULD NOT use the deprecated `directory` role.
-Otherwise, global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles. @@ -3521,7 +3328,6 @@
Roles: `none` @@ -3531,7 +3337,6 @@
Use the `checked` attribute on any element that is allowed the `checked` attribute in HTML. Use the `indeterminate` IDL attribute to indicate the "mixed" state for `input type=checkbox` elements. @@ -3690,7 +3494,6 @@
Authors MAY use the `aria-checked` attribute on any other element with a WAI-ARIA role which allows the attribute.
@@ -3946,7 +3749,7 @@role=listbox
- No `role` other than listbox, which is NOT RECOMMENDED.
-
- No `aria-*` attributes. -
+
+ No `role` other than listbox, which is NOT RECOMMENDED.
+
+ No `aria-*` attributes. +
If the `img` has no `alt` attribute or no accessible name: No `role` other than the @@ -1503,12 +1502,12 @@
- If the `img` has an empty `alt` ([^img/alt^]`=""`) and lacks any other
- `img` naming methods:
- role=none,
- role=presentation
-
+ If the `img` has an empty `alt` ([^img/alt^]`=""`) and lacks any other
+ `img` naming methods:
+ role=none,
+ role=presentation
+
@@ -1539,9 +1538,8 @@
role=button
- The following roles are allowed, but are NOT RECOMMENDED: - `button`, - `checkbox`, - `gridcell`, - `link`, - `menuitem`, - `menuitemcheckbox`, - `menuitemradio`, - `option`, - `radio`, - `separator`, - `slider`, - `switch`, - `tab` - or `treeitem`. -
-- Global `aria-*` attributes - and any `aria-*` attributes applicable to the allowed roles. -
-- If possible, authors SHOULD consider using a different HTML element which allows the specified role, - such as the `button` element. -
++ The following roles are allowed, but are NOT RECOMMENDED: + `button`, + `checkbox`, + `gridcell`, + `link`, + `menuitem`, + `menuitemcheckbox`, + `menuitemradio`, + `option`, + `radio`, + `separator`, + `slider`, + `switch`, + `tab` + or `treeitem`. +
++ Global `aria-*` attributes + and any `aria-*` attributes applicable to the allowed roles. +
++ If possible, authors SHOULD consider using a different HTML element which allows the specified role, + such as the `button` element. +
role=button
- The following roles are allowed, but are NOT RECOMMENDED: - `button`, - `checkbox`, - `combobox`, - `gridcell`, - `link`, - `menuitem`, - `menuitemcheckbox`, - `menuitemradio`, - `option`, - `radio`, - `separator`, - `slider`, - `switch`, - `tab` - or `treeitem`. -
-- Global `aria-*` attributes - and any `aria-*` attributes applicable to the allowed roles. -
-- If possible, authors SHOULD consider using a different HTML element which allows the specified role, - such as the `button` element. -
++ The following roles are allowed, but are NOT RECOMMENDED: + `button`, + `checkbox`, + `combobox`, + `gridcell`, + `link`, + `menuitem`, + `menuitemcheckbox`, + `menuitemradio`, + `option`, + `radio`, + `separator`, + `slider`, + `switch`, + `tab` + or `treeitem`. +
++ Global `aria-*` attributes + and any `aria-*` attributes applicable to the allowed roles. +
++ If possible, authors SHOULD consider using a different HTML element which allows the specified role, + such as the `button` element. +
role=button
- The following roles are allowed, but are NOT RECOMMENDED: - `button`, - `checkbox`, - `combobox`, - `gridcell`, - `link`, - `menuitem`, - `menuitemcheckbox`, - `menuitemradio`, - `option`, - `radio`, - `separator`, - `slider`, - `switch`, - `tab` - or `treeitem`. -
-- Global `aria-*` attributes - and any `aria-*` attributes applicable to the allowed roles. -
-- If possible, authors SHOULD consider using a different HTML element which allows the specified role, - such as the `button` element. -
++ The following roles are allowed, but are NOT RECOMMENDED: + `button`, + `checkbox`, + `combobox`, + `gridcell`, + `link`, + `menuitem`, + `menuitemcheckbox`, + `menuitemradio`, + `option`, + `radio`, + `separator`, + `slider`, + `switch`, + `tab` + or `treeitem`. +
++ Global `aria-*` attributes + and any `aria-*` attributes applicable to the allowed roles. +
++ If possible, authors SHOULD consider using a different HTML element which allows the specified role, + such as the `button` element. +
- No `role` other than listitem, which is NOT RECOMMENDED,
- if the parent list element has an implicit or explicit `list` role.
-
- Otherwise, any `role` if the parent list element does not expose an implicit or explicit `list` role. -
-- See `ul`, `ol`, or - `menu` for allowed roles for list elements. -
+
+ No `role` other than listitem, which is NOT RECOMMENDED,
+ if the parent list element has an implicit or explicit `list` role.
+
+ Otherwise, any `role` if the parent list element does not expose an implicit or explicit `list` role. +
++ See `ul`, `ol`, or + `menu` for allowed roles for list elements. +
Global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles.
-Authors SHOULD NOT use the following deprecated DPub Roles: - `doc-biblioentry`, - `doc-endnote`. -
+Authors SHOULD NOT use the following deprecated DPub Roles: + `doc-biblioentry`, + `doc-endnote`. +
Authors SHOULD NOT use deprecated `directory` role. -
+Authors SHOULD NOT use deprecated `directory` role. +
- Authors MAY specify the `aria-hidden` attribute on the `picture` element. - Otherwise, no other allowed `aria-*` attributes. -
++ Authors MAY specify the `aria-hidden` attribute on the `picture` element. + Otherwise, no other allowed `aria-*` attributes. +
- Roles:
- `form`,
- `group`,
- `none`,
- `presentation` or
- `region`.
- (search is also allowed, but NOT RECOMMENDED.)
-
- Global `aria-*` attributes - and any `aria-*` attributes applicable to the allowed roles. -
+
+ Roles:
+ `form`,
+ `group`,
+ `none`,
+ `presentation` or
+ `region`.
+ (search is also allowed, but NOT RECOMMENDED.)
+
+ Global `aria-*` attributes + and any `aria-*` attributes applicable to the allowed roles. +
- No `role` if the `summary` element is a - summary for its parent details element. -
-- Global `aria-*` attributes, - `aria-disabled`, and `aria-haspopup` attributes. -
-- Otherwise, if the `summary` element is not a - summary for its parent details - element, authors MAY specify any `role`, and any - global `aria-*` attributes - and any `aria-*` attributes applicable to the allowed roles. -
++ No `role` if the `summary` element is a + summary for its parent details element. +
++ Global `aria-*` attributes, + `aria-disabled`, and `aria-haspopup` attributes. +
++ Otherwise, if the `summary` element is not a + summary for its parent details + element, authors MAY specify any `role`, and any + global `aria-*` attributes + and any `aria-*` attributes applicable to the allowed roles. +
- Authors SHOULD NOT use the deprecated - `directory` role. -
++ Authors SHOULD NOT use the deprecated + `directory` role. +
- Roles: - `none` - or `presentation` -
-- Authors MAY specify the `aria-hidden` attribute on the `wbr` element. - Otherwise, no other allowed `aria-*` attributes. -
++ Roles: + `none` + or `presentation` +
++ Authors MAY specify the `aria-hidden` attribute on the `wbr` element. + Otherwise, no other allowed `aria-*` attributes. +
- Use the `checked` attribute on any element that is allowed the `checked` attribute in HTML. - Use the `indeterminate` IDL attribute to indicate the "mixed" state for `input type=checkbox` elements. -
-- Authors MUST NOT use the `aria-checked` attribute on any element where the checkedness, or the - indeterminate checked value of the element can be in opposition to the current value of the `aria-checked` attribute. -
++ Use the `checked` attribute on any element that is allowed the `checked` attribute in HTML. + Use the `indeterminate` IDL attribute to indicate the "mixed" state for `input type=checkbox` elements. +
++ Authors MUST NOT use the `aria-checked` attribute on any element where the checkedness, or the + indeterminate checked value of the element can be in opposition to the current value of the `aria-checked` attribute. +
Authors MAY use the `aria-checked` attribute on any other element with a WAI-ARIA role which allows the attribute.
From fe65269221bec7c96427e0a2553a304aea8ae997 Mon Sep 17 00:00:00 2001 From: DanielFuture updates to this Recommendation may incorporate new features.
+ Since this specification become a W3C Recommendation on 09 December 2021, + the following substantive changes have been made: +
+For a complete list of changes made to this specification (including informative and editorial updates) see all closed pull requests on GitHub.
Future updates to this Recommendation may incorporate new features.
For a complete list of changes made to this specification (including informative and editorial updates) see all closed pull requests on GitHub.
-Future updates to this Recommendation may incorporate new features.
For a complete list of changes made to this specification (including informative and editorial updates) see all closed pull requests on GitHub.
@@ -219,25 +219,25 @@- Any constraints for the use of ARIA features in HTML defined by this specification - are intended to prevent authors from making assistive technology products report + Any constraints for the use of ARIA features in HTML defined by this specification + are intended to prevent authors from making assistive technology products report nonsensical user interface (UI) information that does not represent the actual UI of the document.
- Authors MUST NOT use the ARIA `role` and `aria-*` attributes in a manner that conflicts - with the semantics described in the [[[#docconformance]]] and [[[#docconformance-attr]]] - tables. It is NOT RECOMMENDED for authors to set the ARIA `role` and `aria-*` attributes - to values that match the implicit ARIA semantics defined in either table. + Authors MUST NOT use the ARIA `role` and `aria-*` attributes in a manner that conflicts + with the semantics described in the [[[#docconformance]]] and [[[#docconformance-attr]]] + tables. It is NOT RECOMMENDED for authors to set the ARIA `role` and `aria-*` attributes + to values that match the implicit ARIA semantics defined in either table. Doing so is unnecessary and can potentially lead to unintended consequences.
- Through the use of ARIA, authors can specify semantics that go beyond the current - capabilities of native HTML. This can be very useful, as it provides authors the opportunity - to create widgets, or expose specific accessible states and properties to native HTML features + Through the use of ARIA, authors can specify semantics that go beyond the current + capabilities of native HTML. This can be very useful, as it provides authors the opportunity + to create widgets, or expose specific accessible states and properties to native HTML features which would not be possible by the use of HTML alone.
From 9270e703209843d03694dc2c05abd72971241d7a Mon Sep 17 00:00:00 2001
From: Daniel ARIA semantics that extend and diverge from HTML
attribute, allowing for an aural UI that will match the visual presentation of the control.
- In the following example, a `button` element allows for a user to toggle the state of a - setting within a web application. The `aria-pressed` attribute is used to + In the following example, a `button` element allows for a user to toggle the state of a + setting within a web application. The `aria-pressed` attribute is used to augment the `button` element. When in the "pressed" state that information can be exposed to users of assistive technologies.
@@ -255,40 +255,40 @@- There are also situations where certain `aria-*` attributes are allowed for use on elements + There are also situations where certain `aria-*` attributes are allowed for use on elements with specific `role`s, while the equivalent native attribute is currently not valid in HTML itself.
- For instance, HTML has no direct concept of a disabled hyperlink (`a href` element). - Constructs such as `<a href="..." disabled> ... </a>` are not valid, - and will not be conveyed to assistive technologies. + For instance, HTML has no direct concept of a disabled hyperlink (`a href` element). + Constructs such as `<a href="..." disabled> ... </a>` are not valid, + and will not be conveyed to assistive technologies.
ARIA diverges from HTML in this regard and does allow for an `aria-disabled` attribute to be specified on an element with an explicit `role=link`. If an author were to specify an `aria-disabled=true` on an HTML hyperlink, user agents would not functionally - treat the hyperlink any differently (it would still be clickable/operable), however it + treat the hyperlink any differently (it would still be clickable/operable), however it would be exposed to assistive technologies as being in the disabled state.
- Similarly, while native HTML `option` elements that are descendants of a `select` can - only be set as being `selected`, elements with an explicit `option` role can not only + Similarly, while native HTML `option` elements that are descendants of a `select` can + only be set as being `selected`, elements with an explicit `option` role can not only allow the equivalent `aria-selected`, but also the `aria-checked` attribute, supporting widgets/constructs that go beyond the capabilities of a native `select` element.
- Unfortunately, in these situations where ARIA and HTML have feature parity, but diverge - in allowances, it can create for a misalignment in support, if not also user experiences. + Unfortunately, in these situations where ARIA and HTML have feature parity, but diverge + in allowances, it can create for a misalignment in support, if not also user experiences. In situations where ARIA allows a feature not supported by HTML, it will often - be in the author's and ultimately the user's best interest to instead implement as a + be in the author's and ultimately the user's best interest to instead implement as a fully custom ARIA widget.
In the following example, a hyperlink needs to be communicated as being in the disabled state. HTML does not allow for the use of the `disabled` attribute on a hyperlink, - and using `aria-disabled=true` would communicate the hyperlink as being disabled to - assistive technologies, but would not actually disable the element. The most effective way - to both communicate and actually disable a hyperlink would be to remove the `href` from + and using `aria-disabled=true` would communicate the hyperlink as being disabled to + assistive technologies, but would not actually disable the element. The most effective way + to both communicate and actually disable a hyperlink would be to remove the `href` from the [^a^] element, creating a placeholder. Then, ARIA can be applied to this placeholder link to communicate the element's intended role and state.
@@ -312,16 +312,16 @@As an example, the following uses a `role=heading` on a [^button^] element. This is - not allowed, because the `button` element has default functionality that conflicts with user + not allowed, because the `button` element has default functionality that conflicts with user expectations for the heading role.
<button role="heading">search</button>
- An author would need to take additional steps to ensure the default functionality and presentation of - the `button` was removed, and even doing so may still not be enough to fully suppress the element's - implicit features depending on how the user chooses to engage with the web page. E.g., by turning on + An author would need to take additional steps to ensure the default functionality and presentation of + the `button` was removed, and even doing so may still not be enough to fully suppress the element's + implicit features depending on how the user chooses to engage with the web page. E.g., by turning on Windows high contrast themes, or viewing the web page in a browser's reader mode.
The following example illustrates a [^button^] element which has also been - provided an explicit `role=button`. Specifying this role is unnecessary, as a "button" + provided an explicit `role=button`. Specifying this role is unnecessary, as a "button" element is already exposed with an implicit `button` role. In practice this particular - instance of redundancy will likely not have unforeseen side effects, other than - unnecessarily making the markup more verbose, and incorrectly signaling to other authors + instance of redundancy will likely not have unforeseen side effects, other than + unnecessarily making the markup more verbose, and incorrectly signaling to other authors that this practice is useful. Please review the section [[[#side-effects]]] for an example of where specifying unnecessary roles can be problematic.
@@ -344,7 +344,7 @@Similarly, the following uses a `role=group` on a [^fieldset^] element, and a `role=main` on a [^main^] element. - This is unnecessary, because the `fieldset` element is implicitly exposed as a `role=group`, as is the `main` element + This is unnecessary, because the `fieldset` element is implicitly exposed as a `role=group`, as is the `main` element implicitly exposed as a `role=main`.
@@ -354,9 +354,9 @@<main role="main">...</main>
- The following uses a `role=list` on an [^ul^] element. As the `ul` element has an implicit role of `list`, + The following uses a `role=list` on an [^ul^] element. As the `ul` element has an implicit role of `list`, explicitly adding the role would generally be considered redundant. However, some user agents suppress a list's - implicit ARIA semantics if the list markers are removed from the visual presentation of the list items. + implicit ARIA semantics if the list markers are removed from the visual presentation of the list items. Generally the redundant declaration of an element's implicit role would not be recommended, but in specific situations such as this, and where the role is necessary to expose, authors can explicitly add the role.
@@ -403,8 +403,8 @@- In the following example, rather than using a `generic` role, authors are advised to use a `div` in - place of the `article` element. If changing the HTML element is not possible, specifying a role of + In the following example, rather than using a `generic` role, authors are advised to use a `div` in + place of the `article` element. If changing the HTML element is not possible, specifying a role of `presentation` or `none` would be acceptable alternatives to remove the implicit role of the `article`.
@@ -412,7 +412,7 @@Adhere to the rules of ARIA
<article role="generic" ...>...</article>
- Additionally, ARIA specifically mentions in Conflicts with Host Language Semantics + Additionally, ARIA specifically mentions in Conflicts with Host Language Semantics that if authors use both native HTML features for exposing states and properties as well as their ARIA counterparts, then the host language features take priority over the explicit ARIA attributes that are also used.
@@ -437,12 +437,12 @@For instance, in the following example an author has specified a role of `link` on a `div` element. While HTML allows for a hyperlink (exposed as a `role=link`) to be a descendant of a `p` element, the HTML parser does not - allow a `div` to be a descendant of a `p` element. + allow a `div` to be a descendant of a `p` element.
<!-- Do not do this! -->
<p>
- ... <div role=link tabindex=0>...</div> ...
+ ... <div role=link tabindex=0>...</div> ...
</p>
@@ -451,10 +451,9 @@
<!-- The previous example's markup will render as follows -->
<p>...</p>
- <div role=link tabindex=0>...</div>
- ...
+ <div role=link tabindex=0>...</div>
+ ...
<p></p>
-
<!-- Instead of a div, use a span. Spans are allowed descendants of p elements! -->
<p>
... <span role=link tabindex=0>...</span> ...
@@ -472,21 +471,21 @@
Document conformance requirements for use of ARIA attributes in HTML
- The following table provides normative per-element document conformance requirements for the
- use of ARIA markup in HTML documents. Additionally, it identifies the implicit ARIA semantics
- that apply to [=HTML elements=]. The implicit ARIA semantics of these elements are defined
+ The following table provides normative per-element document conformance requirements for the
+ use of ARIA markup in HTML documents. Additionally, it identifies the implicit ARIA semantics
+ that apply to [=HTML elements=]. The implicit ARIA semantics of these elements are defined
in [[html-aam-1.0|HTML AAM]].
- Each language feature (element) in a cell in the first column implies the ARIA semantics
- (role, states, and properties) given in the cell in the second column of the same row.
+ Each language feature (element) in a cell in the first column implies the ARIA semantics
+ (role, states, and properties) given in the cell in the second column of the same row.
The third cell in each row defines the ARIA `role` values and `aria-*` attributes which authors MAY specify
on the element. Where a cell in the third column includes the term Any `role`
- it indicates that any `role` value MAY be used on the element. However,
- it is NOT RECOMMENDED for authors to specify the implicit role of the element, the `generic` role, or a role
- deprecated by ARIA on these elements.
- If a cell in the third column includes the term No `role` it indicates
- that authors MUST NOT overwrite the implicit ARIA semantics, or native semantics of the HTML element.
+ it indicates that any `role` value MAY be used on the element. However,
+ it is NOT RECOMMENDED for authors to specify the implicit role of the element, the `generic` role, or a role
+ deprecated by ARIA on these elements.
+ If a cell in the third column includes the term No `role` it indicates
+ that authors MUST NOT overwrite the implicit ARIA semantics, or native semantics of the HTML element.
[[wai-aria-1.2|WAI-ARIA]] identifies roles which have
From adeb9d7e52b0c1b5ef78acfe8dc7b007d230296d Mon Sep 17 00:00:00 2001
From: Daniel
Date: Tue, 14 Jul 2026 18:09:17 +0200
Subject: [PATCH 19/31] remove trailing space
---
index.html | 280 ++++++++++++++++++++++++++---------------------------
1 file changed, 140 insertions(+), 140 deletions(-)
diff --git a/index.html b/index.html
index d21cd0b1..b5044207 100644
--- a/index.html
+++ b/index.html
@@ -488,25 +488,25 @@
that authors MUST NOT overwrite the implicit ARIA semantics, or native semantics of the HTML element.
- [[wai-aria-1.2|WAI-ARIA]] identifies roles which have
+ [[wai-aria-1.2|WAI-ARIA]] identifies roles which have
prohibited states and properties.
These roles do not allow certain WAI-ARIA attributes to be specified by authors.
HTML elements which expose these implicit WAI-ARIA roles also prohibit authors from
specifying these WAI-ARIA attributes.
- Elements which are identified as Naming prohibited are those which authors MUST NOT specify an
- `aria-label` or `aria-labelledby` attribute, unless the element allows for its implicit role to be overwritten
+ Elements which are identified as Naming prohibited are those which authors MUST NOT specify an
+ `aria-label` or `aria-labelledby` attribute, unless the element allows for its implicit role to be overwritten
by an explicit WAI-ARIA role which allows naming from authors. For more information see [[[#docconformance-naming]]].
While setting an ARIA `role` and/or `aria-*` attribute that matches the implicit ARIA semantics
- is NOT RECOMMENDED, in some situations explicitly setting these attributes can be helpful – for instance,
+ is NOT RECOMMENDED, in some situations explicitly setting these attributes can be helpful – for instance,
for user agents that do not expose implicit ARIA semantics for certain elements.
While it is conforming to use [[[dpub-aria-1.1]]] `role` values as outlined in the following table, the use of these roles
- is not intended for implementation of websites. If using these role for purposes beyond the scope of the digital publishing
+ is not intended for implementation of websites. If using these role for purposes beyond the scope of the digital publishing
industry, further manual testing will be necessary to ensure the intended experience is provided to users.
|
- If role defined by `ElementInternals`, + If role defined by `ElementInternals`, no `role` @@ -762,7 +762,7 @@ as another role which prohibits naming.- Otherwise, global `aria-*` attributes + Otherwise, global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles. |
@@ -780,7 +780,7 @@
- If role defined by `ElementInternals`, + If role defined by `ElementInternals`, no `role` @@ -1414,7 +1414,7 @@ Naming Prohibited if exposed as the `generic` role.- Otherwise, global `aria-*` attributes + Otherwise, global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles. |
@@ -1439,7 +1439,7 @@
- No `role` other than @@ -1563,7 +1563,7 @@ - Otherwise, global `aria-*` attributes + Otherwise, global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles. |
@@ -1586,7 +1586,7 @@
- If the `img` has non-empty [^img/alt^] (`alt="some text"`) or an accessible name is provided by another
- `img` naming method,
+ If the `img` has non-empty [^img/alt^] (`alt="some text"`) or an accessible name is provided by another
+ `img` naming method,
or the `img` has no `alt` and no accessible name:role=img or image
|
@@ -1620,7 +1620,7 @@
- If the `img` has an empty `alt` ([^img/alt^]`=""`) and lacks any other
+ If the `img` has an empty `alt` ([^img/alt^]`=""`) and lacks any other
`img` naming methods: |
@@ -1688,7 +1688,7 @@ |||
| - `input type=tel`, + `input type=tel`, with no [^input/list^] attribute |
@@ -2058,7 +2058,7 @@
No `role` other than |
@@ -2079,7 +2079,7 @@
- If a `label` element is implicitly or explicitly associated with a + If a `label` element is implicitly or explicitly associated with a labelable element then no `role`
- Otherwise, if the `label` is not associated with an element then any `role`,
+ Otherwise, if the `label` is not associated with an element then any `role`,
though Naming Prohibited if exposed as the `generic` role, or if exposed as another role which prohibits naming. @@ -2244,13 +2244,13 @@
- If the `li` is a child of an element exposed as a `role=list`
- (e.g., `ul`, `ol`,
+ If the `li` is a child of an element exposed as a `role=list`
+ (e.g., `ul`, `ol`,
`menu`):
- Otherwise,
+ Otherwise,
|
@@ -2332,7 +2332,7 @@
Authors MAY use the `aria-hidden` attribute on any HTML element that allows - global `aria-*` attributes to + Global `aria-*` attributesto be specified, with the exception of focusable elements and the `body` element.
From c64bac25b6e03b12cd84006e62d401f4651af472 Mon Sep 17 00:00:00 2001
From: Daniel - Authors SHOULD NOT use the `aria-valuemax` attribute + Authors SHOULD NOT use the `aria-valuemax` attribute on `progress` elements. - Otherwise, + Otherwise, any Global `aria-*` attributes and any other `aria-*` attributes applicable to the `progressbar` role. From 3a4120039e67b7a48f514310f9b7b6423eb7a100 Mon Sep 17 00:00:00 2001 From: Daniel
If the `img` has no `alt` attribute or no accessible name:
- No `role` other than the
+ No `role` other than the
`slider`,
`switch`,
`tab`,
- or `treeitem`.
+ or `treeitem`.
( |
Otherwise,
`search`,
`status`
or `tabpanel`.
- ( |
- No `role` if the `summary` element is a + No `role` if the `summary` element is a summary for its parent details element. - Global `aria-*` attributes, + Global `aria-*` attributes, `aria-disabled`, and `aria-haspopup` attributes. - Otherwise, if the `summary` element is not a - summary for its parent details - element, authors MAY specify any `role`, and any + Otherwise, if the `summary` element is not a + summary for its parent details + element, authors MAY specify any `role`, and any Global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles. @@ -3247,13 +3247,13 @@
and any `aria-*` attributes applicable to the allowed roles.- Authors SHOULD NOT use the deprecated + Authors SHOULD NOT use the deprecated `directory` role. |
|---|
- The elements marked with No corresponding role, in the second column of - the table do not have any implicit ARIA semantics, but they do have meaning - and this meaning may be represented in roles, states and properties not provided - by ARIA, and exposed to users of assistive technology via accessibility APIs. - It is therefore recommended that authors add a `role` attribute to a semantically - neutral element such as a [^div^] or [^span^], rather than overriding the semantics + The elements marked with No corresponding role, in the second column of + the table do not have any implicit ARIA semantics, but they do have meaning + and this meaning may be represented in roles, states and properties not provided + by ARIA, and exposed to users of assistive technology via accessibility APIs. + It is therefore recommended that authors add a `role` attribute to a semantically + neutral element such as a [^div^] or [^span^], rather than overriding the semantics of the listed elements.
<!-- DO NOT do the following! -->
<p aria-label="...">...</p>
-
<span aria-label="...">...<span>
-
<code aria-label="...">...<code>
-
<div aria-labelledby="...">...</div>
@@ -3565,9 +3561,7 @@
<p role="link" tabindex="0" aria-label="...">...</p>
-
<span role="button" tabindex="0" aria-label="...">...<span>
-
<div role="article" aria-labelledby="...">...</div>
@@ -3577,14 +3571,14 @@ - Unless otherwise stated, authors MAY use `aria-*` attributes in place of their HTML equivalents on HTML elements where the `aria-*` semantics would - be expected. For example, authors MAY specify `aria-disabled=true` on a [^button^] element, while also implementing the necessary scripting to functionally + Unless otherwise stated, authors MAY use `aria-*` attributes in place of their HTML equivalents on HTML elements where the `aria-*` semantics would + be expected. For example, authors MAY specify `aria-disabled=true` on a [^button^] element, while also implementing the necessary scripting to functionally disable the `button`, rather than the use `disabled` attribute.
As stated in WAI-ARIA's Conflicts with Host Language Semantics, - when HTML elements use both `aria-*` attributes and their host language (HTML) equivalents, user agents MUST ignore the WAI-ARIA attributes – the - native HTML attributes with the same implicit ARIA semantics take precedence. For this reason, authors SHOULD NOT specify both the native HTML attribute + when HTML elements use both `aria-*` attributes and their host language (HTML) equivalents, user agents MUST ignore the WAI-ARIA attributes – the + native HTML attributes with the same implicit ARIA semantics take precedence. For this reason, authors SHOULD NOT specify both the native HTML attribute and the equivalent `aria-*` attribute on an element. Please review each attribute for any further author specific requirements.
@@ -3627,11 +3621,11 @@
- Use the `checked` attribute on any element that is allowed the `checked` attribute in HTML. + Use the `checked` attribute on any element that is allowed the `checked` attribute in HTML. Use the `indeterminate` IDL attribute to indicate the "mixed" state for `input type=checkbox` elements.
- Authors MUST NOT use the `aria-checked` attribute on any element where the checkedness, or the + Authors MUST NOT use the `aria-checked` attribute on any element where the checkedness, or the indeterminate checked value of the element can be in opposition to the current value of the `aria-checked` attribute.
@@ -3654,7 +3648,7 @@
- Authors MAY use the `aria-disabled` attribute on any element that is allowed the `disabled` attribute in HTML, + Authors MAY use the `aria-disabled` attribute on any element that is allowed the `disabled` attribute in HTML, or any element with a WAI-ARIA role which allows the `aria-disabled` attribute.
@@ -3674,13 +3668,13 @@
- Authors MAY use the `aria-hidden` attribute on any HTML element that allows - Global `aria-*` attributesto + Authors MAY use the `aria-hidden` attribute on any HTML element that allows + Global `aria-*` attributesto be specified, with the exception of focusable elements and the `body` element.
- It is generally NOT RECOMMENDED for authors to use `aria-hidden="true"` on any element which also has the `hidden` attribute specified. However, - authors MUST NOT use `aria-hidden="true"` on any element which also has the `hidden` attribute specified in the + It is generally NOT RECOMMENDED for authors to use `aria-hidden="true"` on any element which also has the `hidden` attribute specified. However, + authors MUST NOT use `aria-hidden="true"` on any element which also has the `hidden` attribute specified in the Hidden Until Found state.
- Authors MAY use the `aria-placeholder` attribute on any element that is allowed the `placeholder` attribute in HTML, + Authors MAY use the `aria-placeholder` attribute on any element that is allowed the `placeholder` attribute in HTML, or any element with a WAI-ARIA role which allows the `aria-placeholder` attribute.
@@ -3899,15 +3893,13 @@
The following roles and attributes are deprecated features of ARIA and DPub ARIA. Conformance checkers MUST warn authors about the deprecated status of these features. Whenever possible, authors are advised to use alternatives to deprecated features.
-The `directory` role is marked for deprecation in [[wai-aria-1.2|WAI-ARIA 1.2]]. In reality, the `directory` role had no functional difference compared to an element with an implicit or explicitly declared `list` role. Authors are advised to use one of HTML's native list elements, or an ARIA `list` role instead.
The `doc-biblioentry` and `doc-endnote` roles are marked for deprecation in [[[dpub-aria-1.1]]], as they are not valid children for an element with an implicit or explicit role of `list`. Authors can use standard list and child `li` elements without the need for these roles.
While modern browsers treat the `role` or `aria-*` attribute values as [=ASCII case-insensitive=], not all assistive technologies will correctly parse these values. @@ -3950,7 +3940,6 @@
<div role="main">...</div>
-
<a href="home/" aria-current="page">home</a>
@@ -3958,15 +3947,12 @@
<!-- DO NOT DO THE FOLLOWING -->
<div role="MAIN">...</div>
-
<div role="Main">...</div>
-
<a href="home/" aria-current="Page">home</a>
-
Additionally, there are certain roles which [[[wai-aria-1.2]]] has specified specific requirements for their allowed descendants. These have been identified in column 3 (Descendant allowances) by indicating to "Refer to the 'Required Owned Elements'" for those particular roles.
-|
Authors MAY use the `aria-hidden` attribute on any HTML element that allows - Global `aria-*` attributesto + Global `aria-*` attributes to be specified, with the exception of focusable elements and the `body` element.
From 762f6834a14b88c9ae7167fb573ce34220485835 Mon Sep 17 00:00:00 2001
From: Daniel - Since this specification become a W3C Recommendation on 09 December 2021, - the following substantive changes have been made: - -
For a complete list of changes made to this specification (including informative and editorial updates) see all closed pull requests on GitHub.
From 3cca83e925097d3d364be41643f52c7e1fcca59b Mon Sep 17 00:00:00 2001
From: Daniel - Otherwise, Global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles. + Otherwise, global `aria-*` attributes and any `aria-*` attributes applicable to the allowed roles. |
@@ -1567,7 +1567,7 @@