From ef9ea4016c4bbee5a72d6b0d9b865e55bcd8e2ff Mon Sep 17 00:00:00 2001 From: Scott O'Hara Date: Thu, 16 Mar 2023 15:57:13 -0400 Subject: [PATCH 1/7] Clarify and consolidate img ARIA allowances This PR closes #424 and #452 Description of changes to come.... --- index.html | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/index.html b/index.html index ab1e4dee..a7f7b1da 100644 --- a/index.html +++ b/index.html @@ -1527,7 +1527,10 @@

- [^img^] with [^img/alt^]`="some text"` +
+ [^img^] with an accessible name. E.g., [^img/alt^]`="some text"` or as provided by other + `img` naming methods +
role=img @@ -1564,42 +1567,39 @@

- - [^img^] with [^img/alt^]`=""` + + [^img^] with no accessible name. - role=presentation - - -

- No `role` other than presentation, which is NOT RECOMMENDED -

-

- No `aria-*` attributes - except `aria-hidden="true"`. -

- - - - - [^img^] without an `alt` attribute - - - role=img +
+

+ If the `img` has an empty `alt` ([^img/alt^]`=""`) and lacks any other + `img` naming methods:
+ role=none, + role=presentation +

+

+ If the `img` lacks an `alt` attribute and lacks any other + `img` naming methods:
+ role=img +

+

- If no accessible name is provided via other - `img` naming methods (e.g., `aria-labelledby`, `aria-label`): - No `role` other than img, which is NOT RECOMMENDED. + No `role` other the roles + role=img, + role=none or + presentation, which are NOT RECOMMENDED.

No `aria-*` attributes except `aria-hidden="true"`.

+

Otherwise, if the `img` has an author defined accessible name, - see `img` with `alt="some text"`. + see `img` with an accessible name.

From dbf1cfc00512612f9b4003de99470fa91e023508 Mon Sep 17 00:00:00 2001 From: Scott O'Hara Date: Wed, 14 Jun 2023 12:16:12 -0400 Subject: [PATCH 2/7] clarify when img role is allowed --- index.html | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/index.html b/index.html index 9e135546..b76d2362 100644 --- a/index.html +++ b/index.html @@ -1601,16 +1601,19 @@

- No `role` other the roles - role=img, - role=none or - presentation, which are NOT RECOMMENDED. + If the `img` has no `alt` attribute or accessible name: + No `role` other than the + role=img role which is NOT RECOMMENDED. +

+

+ 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 role=none or + presentation roles, which are NOT RECOMMENDED.

No `aria-*` attributes except `aria-hidden="true"`.

-

Otherwise, if the `img` has an author defined accessible name, see `img` with an accessible name. From ddcdd491048dfaa6d062d665ff501b1201d4269e Mon Sep 17 00:00:00 2001 From: Scott O'Hara Date: Wed, 14 Jun 2023 12:20:27 -0400 Subject: [PATCH 3/7] add missing comma --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index b76d2362..38c55eae 100644 --- a/index.html +++ b/index.html @@ -1603,7 +1603,7 @@

If the `img` has no `alt` attribute or accessible name: No `role` other than the - role=img role which is NOT RECOMMENDED. + role=img role, which is NOT RECOMMENDED.

If the `img` has an empty `alt=""` attribute and no `aria-label` or `aria-labelledby` attributes to provide it an accessible name: From 901eddefaceb7d933c9a4e3b34bd9dd62bd75db0 Mon Sep 17 00:00:00 2001 From: Scott O'Hara Date: Wed, 14 Jun 2023 12:23:18 -0400 Subject: [PATCH 4/7] mark as updated from previous spec via classes --- index.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 38c55eae..559f94b8 100644 --- a/index.html +++ b/index.html @@ -1600,10 +1600,12 @@

+

If the `img` has no `alt` attribute or accessible name: No `role` other than the - role=img role, which is NOT RECOMMENDED. + role=img, role=none or + presentation roles, which are NOT RECOMMENDED.

If the `img` has an empty `alt=""` attribute and no `aria-label` or `aria-labelledby` attributes to provide it an accessible name: @@ -1618,6 +1620,7 @@

Otherwise, if the `img` has an author defined accessible name, see `img` with an accessible name.

+

From 78f8b9e299d6201b8fc1847b660e6a93e340a00f Mon Sep 17 00:00:00 2001 From: Scott O'Hara Date: Wed, 14 Jun 2023 14:03:03 -0400 Subject: [PATCH 5/7] add meter to allowed role for img similar to progressbar, meter should thus also be allowed. --- index.html | 3 +++ 1 file changed, 3 insertions(+) diff --git a/index.html b/index.html index 559f94b8..0343603f 100644 --- a/index.html +++ b/index.html @@ -1558,6 +1558,9 @@

`menuitem`, `menuitemcheckbox`, `menuitemradio`, + + `meter`, + `option`, `progressbar`, From e79904ece512b4c15f9cc02e81bbca452a5c9516 Mon Sep 17 00:00:00 2001 From: Scott O'Hara Date: Thu, 15 Jun 2023 11:40:47 -0400 Subject: [PATCH 6/7] fix img lacking alt allowance --- index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 0343603f..906e6b3b 100644 --- a/index.html +++ b/index.html @@ -1607,8 +1607,8 @@

If the `img` has no `alt` attribute or accessible name: No `role` other than the - role=img, role=none or - presentation roles, which are NOT RECOMMENDED. + role=none or presentation roles. + (role=img is also allowed, but NOT RECOMMENDED.)

If the `img` has an empty `alt=""` attribute and no `aria-label` or `aria-labelledby` attributes to provide it an accessible name: From f1c5a2b12f3de5c14693b9ca8c6e586753c947b8 Mon Sep 17 00:00:00 2001 From: Scott O'Hara Date: Tue, 3 Oct 2023 13:24:34 -0400 Subject: [PATCH 7/7] update changelog --- index.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/index.html b/index.html index f33a20f4..1b42355c 100644 --- a/index.html +++ b/index.html @@ -64,6 +64,10 @@ the following substantive additions and/or corrections have been proposed: