From 52be13add06c281273787633aa1facbdd850184a Mon Sep 17 00:00:00 2001 From: Scott O'Hara Date: Mon, 6 Feb 2023 09:13:12 -0500 Subject: [PATCH 1/4] Update button and input button allowances closes #444 closes #395 closes #298 This PR makes the allowances for button-elements (button, input type=button|image|submit|reset) more consistent with each other. Additionally, slider and gridcell are now listed under the allowed roles for these elements. the LOE to properly create the necessary UX for some of these roles when specified, especially on the `input` type buttons, is rather large _but_ possible. Any failures to not implement these properly would be caught by WCAG rules. Allowing the roles won't change that. --- index.html | 119 +++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 88 insertions(+), 31 deletions(-) diff --git a/index.html b/index.html index 3055e52f..ce095300 100644 --- a/index.html +++ b/index.html @@ -833,14 +833,18 @@

Roles: `checkbox`, `combobox`, + `gridcell`, `link`, `menuitem`, `menuitemcheckbox`, `menuitemradio`, `option`, `radio`, - `switch` - or `tab`. (button is also allowed, but NOT RECOMMENDED.) + `slider`, + `switch`, + `tab`, + or `treeitem`. + (button is also allowed, but NOT RECOMMENDED.)

Global `aria-*` attributes @@ -1600,14 +1604,18 @@

Roles: `checkbox`, `combobox`, + `gridcell`, `link`, `menuitem`, `menuitemcheckbox`, `menuitemradio`, `option`, `radio`, - `switch` - or `tab`. (button is also allowed, but NOT RECOMMENDED.) + `slider`, + `switch`, + `tab`, + or `treeitem`. + (button is also allowed, but NOT RECOMMENDED.)

Global `aria-*` attributes @@ -1749,19 +1757,30 @@

role=button -

- Roles: - `link`, - `menuitem`, - `menuitemcheckbox`, - `menuitemradio`, - `radio` - or `switch`. (button is also allowed, but NOT RECOMMENDED.) -

-

- Global `aria-*` attributes - and any `aria-*` attributes applicable to the allowed roles. -

+
+

+ The following roles are allowed, but are NOT RECOMMENDED: + `button`, + `checkbox`, + `gridcell`, + `link`, + `menuitem`, + `menuitemcheckbox`, + `menuitemradio`, + `option`, + `radio`, + `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. +

+
@@ -1872,13 +1891,32 @@

role=button -

- No `role` other than button, which is NOT RECOMMENDED. -

-

- Global `aria-*` attributes - and any `aria-*` attributes applicable to the `button` role. -

+
+

+ The following roles are allowed, but are NOT RECOMMENDED: + `button`, + `checkbox`, + `combobox`, + `gridcell`, + `link`, + `menuitem`, + `menuitemcheckbox`, + `menuitemradio`, + `option`, + `radio`, + `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. +

+
@@ -1907,13 +1945,32 @@

role=button -

- No `role` other than button, which is NOT RECOMMENDED. -

-

- Global `aria-*` attributes - and any `aria-*` attributes applicable to the `button` role. -

+
+

+ The following roles are allowed, but are NOT RECOMMENDED: + `button`, + `checkbox`, + `combobox`, + `gridcell`, + `link`, + `menuitem`, + `menuitemcheckbox`, + `menuitemradio`, + `option`, + `radio`, + `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. +

+
From e7be8cac14b917822b5d2c156a561d075b79f754 Mon Sep 17 00:00:00 2001 From: Scott O'Hara Date: Wed, 15 Feb 2023 11:14:39 -0500 Subject: [PATCH 2/4] add missing slider allowance for input type=image --- index.html | 1 + 1 file changed, 1 insertion(+) diff --git a/index.html b/index.html index c062723e..68b28a0a 100644 --- a/index.html +++ b/index.html @@ -1777,6 +1777,7 @@

`menuitemradio`, `option`, `radio`, + `slider`, `switch`, `tab` or `treeitem`. From 17a628a62f6da7c78e0cac49b9af7cb8217c5bf1 Mon Sep 17 00:00:00 2001 From: Scott O'Hara Date: Wed, 5 Jul 2023 11:22:18 -0400 Subject: [PATCH 3/4] add changelog and re-simplify input type=image rules. now all button elements have the same rules, even though type=image is likely to be more trouble than it's worth for authors to use, correctly and without other wcag related issue. --- index.html | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/index.html b/index.html index a1867032..a297ebd4 100644 --- a/index.html +++ b/index.html @@ -64,9 +64,14 @@ the following substantive additions and/or corrections have been proposed:

    +
  • + 5 July 2023 - Addition: + Update the `button`, `input type=button`, `input type=image` + `input type=reset`, and `input type=submit` elements to align their allowed roles. +
  • 29 June 2023 - Addition: - Update the `s` element allowed roles to indicate use of `role=deletion` on the element would be considered redundnat. + Update the `s` element allowed roles to indicate use of `role=deletion` on the element would be considered redundnat.
  • 31 May 2023 - Correction: @@ -1793,7 +1798,7 @@

    - The following roles are allowed, but are NOT RECOMMENDED: + Roles: `button`, `checkbox`, `gridcell`, @@ -1812,9 +1817,6 @@

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

    From b492937b01fdb0e50cfbe5a4aa2cf27ca20272b9 Mon Sep 17 00:00:00 2001 From: Scott O'Hara Date: Wed, 5 Jul 2023 11:24:53 -0400 Subject: [PATCH 4/4] Update input-image-reset-submit.html --- tests/input-image-reset-submit.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/input-image-reset-submit.html b/tests/input-image-reset-submit.html index fcfb118d..2dc35708 100644 --- a/tests/input-image-reset-submit.html +++ b/tests/input-image-reset-submit.html @@ -66,10 +66,10 @@

    Authors are allowed to use the roles - button, checkbox, combobox, gridcell, link, menuitem, menuitemcheckbox, menuitemradio, option, radio, slider, switch, tab or treeitem on a input type=reset, input type=image or input type=submit element, but their use is NOT RECOMMENDED. + button, checkbox, combobox, gridcell, link, menuitem, menuitemcheckbox, menuitemradio, option, radio, slider, switch, tab or treeitem on a input type=reset, input type=image or input type=submit element.

    - All allowed roles on the button element are now allowed on these elements as well. While there are far better elements to use as a base for these roles, and thus why it is 'not recommended' to specify these updated role allowances on these elements, if an author has no other choice and they end up using these elements to make an otherwise accessible custom widget, there is no reason to preclude their use as other automated and manual checks can call out potential accessibility gaps. + All allowed roles on the button element are now allowed on these elements as well. While there are far better elements to use as a base for these roles, if an author has no other choice and they end up using these elements to make an otherwise accessible custom widget, there is no reason to preclude their use as other automated and manual checks can call out potential accessibility gaps.