From 047f5692e3e1548bac50e5d7b0666643186a8187 Mon Sep 17 00:00:00 2001
From: Scott O'Hara
Date: Fri, 11 Feb 2022 10:03:18 -0500
Subject: [PATCH 01/13] Prohibit naming of elements
Adds new naming requirements section.
Additional work and review needed.
Need to indicate all elements with implicit roles which prohibit naming
closes #147
---
index.html | 37 +++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)
diff --git a/index.html b/index.html
index 0154a542..f6cd4e69 100644
--- a/index.html
+++ b/index.html
@@ -3052,6 +3052,43 @@
</figure>
+
+
+ Requirements for use of ARIA attributes to name elements
+
+ Authors MUST NOT specify `aria-label` or `aria-labelledby` on elements that expose an ARIA role which cannot be named. Elements whose implicit ARIA roles prohibit naming from authors are identified in [[[#docconformance]]].
+
+
+ The following markup example demonstrates a selection of HTML elements with implicit ARIA roles that prohibit naming from authors.
+
+ The following markup example demonstrates elements which have explicit ARIA roles which allow naming from authors, and thus `aria-label` and `aria-labelledby` attributes are allow.
+
Requirements for use of ARIA attributes in place of equivalent HTML attributes
From c5a9bb4df81642232714e13c06330d179637095d Mon Sep 17 00:00:00 2001
From: Steve Faulkner
Date: Fri, 11 Feb 2022 16:08:51 +0000
Subject: [PATCH 02/13] Update index.html
hardened the code comment
---
index.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/index.html b/index.html
index f6cd4e69..1a960085 100644
--- a/index.html
+++ b/index.html
@@ -3068,7 +3068,7 @@
Elements with implicit ARIA roles which prohibit naming
-->
The following markup example demonstrates a selection of HTML elements with implicit ARIA roles that prohibit naming from authors.
- <!-- Avoid doing the following! -->
+ <!-- DO NOT do the following! -->
<p aria-label="...">...</p>
<span aria-label="...">...<span>
From 28ff042b68f473f018ec6570825f137f890c4a8f Mon Sep 17 00:00:00 2001
From: Scott O'Hara
Date: Sat, 12 Feb 2022 19:10:49 -0500
Subject: [PATCH 03/13] naming prohibited updates
* define elements which are prohibited from being named so long as they expose their implicit semantics
* introduce the concepts of prohibited attributes and provide a def for 'naming prohibited' in the spec
---
index.html | 140 +++++++++++++++++++++++++++++++++++++----------------
1 file changed, 97 insertions(+), 43 deletions(-)
diff --git a/index.html b/index.html
index 1a960085..9258049b 100644
--- a/index.html
+++ b/index.html
@@ -217,7 +217,7 @@
unnecessary and can result in cross-platform issues. For instance,
preventing the element from correctly exposing its state, and forcing
the role of `button`, when it might otherwise be exposed with a
- different role.
+ platform or browser specific role.
<details>
@@ -254,7 +254,21 @@
MUST NOT overwrite the implicit ARIA semantics, or native semantics
of the HTML element.
-
+
+
+ [[wai-aria-1.2|WAI-ARIA]] identifies roles which have
+ prohibited states and properties.
+ These roles do not allow certain `aria-*` attributes to be specified by authors.
+ HTML elements which expose these implicit ARIA roles also do not allow authors to
+ specify these prohibited states and properties.
+
+
+ Elements which are identified as Naming prohibited
+ are elements which authors MUST NOT specify an `aria-label` or `aria-labelledby`
+ attribute, unless the implicit role has been overwritten by an ARIA role
+ which allows for naming from authors.
+
+
While setting an ARIA `role` and/or `aria-*` attribute that matches the
implicit ARIA semantics is NOT RECOMMENDED, in some
@@ -339,8 +353,9 @@
Authors MAY specify the `aria-hidden` attribute on the `picture` element.
- Otherwise, no other allowed `aria-*` attributes.
+ Otherwise, no allowed `aria-*` attributes.
Authors SHOULD NOT use the `aria-hidden="true"` attribute on any element which also has a `hidden` attribute.
From 125bd7fb45ecc811ded992437d48b196873f72d9 Mon Sep 17 00:00:00 2001
From: Scott O'Hara
Date: Sat, 12 Mar 2022 14:09:29 -0500
Subject: [PATCH 06/13] reference new section
---
index.html | 20 ++++++++------------
1 file changed, 8 insertions(+), 12 deletions(-)
diff --git a/index.html b/index.html
index 5f7f0747..d6212095 100644
--- a/index.html
+++ b/index.html
@@ -288,22 +288,15 @@
[[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 ARIA roles also prohibit authors from
+ 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 elements authors MUST NOT specify an `aria-label` or `aria-labelledby`
- attribute, unless the implicit role has been overwritten by an ARIA role
- which allows for naming from authors.
+ 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]]].
-
- <!-- Authors cannot name a div -->
- <div aria-label="My name">...</div>
-
- <!-- But authors CAN name a div with a role which allows for naming -->
- <div role="group" aria-label="My name">...</div>
-
While setting an ARIA `role` and/or `aria-*` attribute that matches the
@@ -461,7 +454,7 @@
- Authors MUST NOT specify `aria-label` or `aria-labelledby` on elements that expose an ARIA role which cannot be named. Elements whose implicit ARIA roles prohibit naming from authors are identified in [[[#docconformance]]].
+ Authors MUST NOT specify `aria-label` or `aria-labelledby` on elements with implicit WAI-ARIA roles which cannot be named. Elements whose implicit WAI-ARIA roles prohibit naming from authors are identified in [[[#docconformance]]].
The following markup example demonstrates a selection of HTML elements with implicit ARIA roles that prohibit naming from authors.
From f24d04eec23c2d34d695d3d8ee6687c13b1bf232 Mon Sep 17 00:00:00 2001
From: Scott O'Hara
Date: Sat, 12 Mar 2022 14:14:14 -0500
Subject: [PATCH 07/13] fixing a typo by revising a sentence
---
index.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/index.html b/index.html
index d6212095..70e0378c 100644
--- a/index.html
+++ b/index.html
@@ -3164,7 +3164,7 @@
Elements with implicit ARIA roles which prohibit naming
-->
<div aria-labelledby="...">...</div>
- The following markup example demonstrates elements which have explicit ARIA roles which allow naming from authors, and thus `aria-label` and `aria-labelledby` attributes are allow.
+ The following markup example demonstrates elements which have explicit WAI-ARIA roles which allow naming from authors. Due to the explicit roles specified on these elements, `aria-label` and `aria-labelledby` attributes are allowed.
<p role="link" tabindex="0" aria-label="...">...</p>
From 1b93a4245550433e4b8cf8eff089ef43b3432e70 Mon Sep 17 00:00:00 2001
From: Scott O'Hara
Date: Sat, 12 Mar 2022 15:37:51 -0500
Subject: [PATCH 08/13] prohibit naming of legend
same rules as caption and label
---
index.html | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/index.html b/index.html
index 70e0378c..1beb2445 100644
--- a/index.html
+++ b/index.html
@@ -1931,8 +1931,9 @@
From a7f5e36120c8fe2bc35ed078b771d3149ba5cd28 Mon Sep 17 00:00:00 2001
From: Scott O'Hara
Date: Sat, 12 Mar 2022 15:45:13 -0500
Subject: [PATCH 09/13] prohibit naming of rp and rt
these either represent their children, per other text-level semantics, or are important in the structure of a `ruby` element. These shouldn't be named... more testing needed to determine the impact aria can have on these in general.
---
index.html | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/index.html b/index.html
index 1beb2445..75118701 100644
--- a/index.html
+++ b/index.html
@@ -2381,8 +2381,9 @@
From 638ae508e323d6d0a03f114fe29b86274aa15f3f Mon Sep 17 00:00:00 2001
From: Scott O'Hara
Date: Sat, 12 Mar 2022 16:18:18 -0500
Subject: [PATCH 10/13] create prohibit naming test
---
tests/prohibit-naming.html | 301 +++++++++++++++++++++++++++++++++++++
1 file changed, 301 insertions(+)
create mode 100644 tests/prohibit-naming.html
diff --git a/tests/prohibit-naming.html b/tests/prohibit-naming.html
new file mode 100644
index 00000000..abd3b37a
--- /dev/null
+++ b/tests/prohibit-naming.html
@@ -0,0 +1,301 @@
+
+
+
+ ARIA in HTML - Test Cases
+
+
+
+
+
+
+
ARIA in HTML - test cases for elements which prohibit naming
+
last updated 12 March 2022
+
+
+
Tests:
+
+ Each of the following test cases is an instance of an HTML element which either has an aria-labelledby or a aria-label attribute, which are not allowed for these elements with their implicit ARIA roles which prohibit naming.
+
+
Note: the body element of this page has an aria-label and aria-labelledby specified for checking purposes, as that element too is not allowed to be named by authors.
+
+
+
+
From 3d6c956db4850423ec97b88f63e0eb0ae506f00f Mon Sep 17 00:00:00 2001
From: Scott O'Hara
Date: Sat, 12 Mar 2022 16:21:32 -0500
Subject: [PATCH 11/13] shouldn't have pushed this here
should push the test to the main branch instead.
---
tests/prohibit-naming.html | 301 -------------------------------------
1 file changed, 301 deletions(-)
delete mode 100644 tests/prohibit-naming.html
diff --git a/tests/prohibit-naming.html b/tests/prohibit-naming.html
deleted file mode 100644
index abd3b37a..00000000
--- a/tests/prohibit-naming.html
+++ /dev/null
@@ -1,301 +0,0 @@
-
-
-
- ARIA in HTML - Test Cases
-
-
-
-
-
-
-
ARIA in HTML - test cases for elements which prohibit naming
-
last updated 12 March 2022
-
-
-
Tests:
-
- Each of the following test cases is an instance of an HTML element which either has an aria-labelledby or a aria-label attribute, which are not allowed for these elements with their implicit ARIA roles which prohibit naming.
-
-
Note: the body element of this page has an aria-label and aria-labelledby specified for checking purposes, as that element too is not allowed to be named by authors.
- Authors MUST NOT specify `aria-label` or `aria-labelledby` on elements with implicit WAI-ARIA roles which cannot be named. Elements whose implicit WAI-ARIA roles prohibit naming from authors are identified in [[[#docconformance]]].
+ Authors MUST NOT specify `aria-label` or `aria-labelledby` on elements with implicit WAI-ARIA roles which cannot be named. HTML elements whose implicit WAI-ARIA roles prohibit naming from authors are identified in [[[#docconformance]]].
The following markup example demonstrates a selection of HTML elements with implicit ARIA roles that prohibit naming from authors.