From b6131e5c0d03e78e1eb85f7491c22f988450e9c7 Mon Sep 17 00:00:00 2001 From: James Craig Date: Wed, 25 Jan 2023 16:51:06 -0800 Subject: [PATCH 01/12] Update the from PR #1018 for nameFrom: heading Closes #899 --- index.html | 67 ++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 47 insertions(+), 20 deletions(-) diff --git a/index.html b/index.html index 9b1a3329c..14d0cda68 100644 --- a/index.html +++ b/index.html @@ -617,9 +617,11 @@

Accessible Name Calculation

One of the following values:
  1. author: name comes from values provided by the author in explicit markup features such as the aria-label attribute, the aria-labelledby attribute, or the host language labeling mechanism, such as the alt or title attributes in HTML, with HTML title attribute having the lowest precedence for specifying a text alternative.
  2. -
  3. contents: name comes from the text value of the element node. Although this may be allowed in addition to "author" in some roles, this is used in content only if higher priority "author" features are not provided. Priority is defined by the accessible name and description computation algorithm [[ACCNAME-1.2]].
  4. +
  5. heading: name comes from the text value of the first descendant (i.e., depth first) element node with the role of heading. Although "heading" may be allowed in addition to "author" in some roles, "heading" is used in content only if higher priority "author" features are not provided.
  6. +
  7. contents: name comes from the text value of the element node. Although this may be allowed in addition to "author" in some roles, this is used in content only if higher priority "author" features are not provided.
  8. prohibited: the element does not support name from author. Authors MUST NOT use the aria-label or aria-labelledby attributes to name the element.
+

Priority is defined by the accessible name and description computation algorithm. [[ACCNAME-1.3]]

@@ -634,21 +636,22 @@

Description Computation

Accessible Name and Description Computation

Accessible Name and Description Computation is defined in the Accessible Name and Description specification.

-
-

Roles Supporting Name from Author

-
-
+
+

Roles Supporting Name from Author

+
-
-

Roles Supporting Name from Content

-
-
+
+

Roles Supporting Name from Heading

+
+
+
+

Roles Supporting Name from Content

+
-

Roles which cannot be named (Name prohibited)

-
-
-
+

Roles which cannot be named (Name prohibited)

+
+

Presentational Children

@@ -988,7 +991,12 @@

Definition of Roles

Name From: - author + + + Accessible Name Required: @@ -1168,7 +1176,12 @@

Definition of Roles

Name From: - author + + + Accessible Name Required: @@ -2660,7 +2673,12 @@

Definition of Roles

Name From: - author + + + Accessible Name Required: @@ -3018,7 +3036,6 @@

Definition of Roles

A dialog is a descendant window of the primary window of a web application. For HTML pages, the primary application window is the entire web document, i.e., the body element.

Dialogs are most often used to prompt the user to enter or respond to information. A dialog that is designed to interrupt workflow is usually modal. See related alertdialog.

-

Authors MUST provide an accessible name for a dialog, which can be done with the aria-label or aria-labelledby attribute.

Authors SHOULD ensure that all dialogs (both modal and non-modal) have at least one focusable descendant element. Authors SHOULD focus an element in the modal dialog when it is displayed, and authors SHOULD manage focus of modal dialogs.

In the description of this role, the term "web application" does not refer to the application role, which specifies specific assistive technology behaviors.

@@ -3073,7 +3090,12 @@

Definition of Roles

Name From: - author + + + Accessible Name Required: @@ -6802,7 +6824,7 @@
Presentational Role Inheritance

A landmark containing content that is relevant to a specific, author-specified purpose and sufficiently important that users will likely want to be able to navigate to the section easily and to have it listed in a summary of the page. Such a page summary could be generated dynamically by a user agent or assistive technology.

Authors SHOULD limit use of the region role to sections containing content with a purpose that is not accurately described by one of the other landmark roles, such as main, complementary, or navigation.

-

Authors MUST give each element with role region a brief label that describes the purpose of the content in the region. Authors SHOULD reference a visible label with aria-labelledby if a visible label is present. Authors SHOULD include the label inside of a heading whenever possible. The heading MAY be an instance of the standard host language heading element or an instance of an element with role heading.

+

Authors MUST give each element with a region role a brief label that describes the purpose of the region. For host languages that support elements with the default role of region (e.g., HTML section), authors would need to specify an explicit role="region" on the element to enable the nameFrom: heading technique.

Assistive technologies SHOULD enable users to quickly navigate to elements with role region. [=User agents=] SHOULD treat elements with role region and have an accessible name as navigational landmarks. [=User agents=] MAY enable users to quickly navigate to elements with role region.

@@ -6858,7 +6880,12 @@
Presentational Role Inheritance
Name From: - author + +
    +
  • author
  • +
  • heading
  • +
+ Accessible Name Required: From de9cfa8a04538bf32bdb3b0e9a67bcde871ab59b Mon Sep 17 00:00:00 2001 From: James Craig Date: Wed, 25 Jan 2023 18:38:01 -0800 Subject: [PATCH 02/12] m. specref reconciliation. --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 14d0cda68..5fb9d85aa 100644 --- a/index.html +++ b/index.html @@ -621,7 +621,7 @@

Accessible Name Calculation

  • contents: name comes from the text value of the element node. Although this may be allowed in addition to "author" in some roles, this is used in content only if higher priority "author" features are not provided.
  • prohibited: the element does not support name from author. Authors MUST NOT use the aria-label or aria-labelledby attributes to name the element.
  • -

    Priority is defined by the accessible name and description computation algorithm. [[ACCNAME-1.3]]

    +

    Priority is defined by the accessible name and description computation algorithm. [[ACCNAME-1.2]]

    From d11b6a46a9b956a13b705cf2c0ae9d8e04270ec3 Mon Sep 17 00:00:00 2001 From: James Craig Date: Wed, 25 Jan 2023 18:43:45 -0800 Subject: [PATCH 03/12] ReSpec script, too --- common/script/aria.js | 47 ++++++++++++------------------------------- 1 file changed, 13 insertions(+), 34 deletions(-) diff --git a/common/script/aria.js b/common/script/aria.js index 38c02a06b..c4df7c10d 100644 --- a/common/script/aria.js +++ b/common/script/aria.js @@ -217,9 +217,8 @@ function ariaAttributeReferences() { var subRoles = []; var roleIndex = ''; var fromAuthor = ''; + var fromHeading = ""; var fromContent = ''; - var fromEncapsulation = ''; - var fromLegend = ''; var fromProhibited = ''; Array.prototype.slice @@ -358,8 +357,8 @@ function ariaAttributeReferences() { req + ''; } - if (!isAbstract && node.textContent.indexOf('content') !== -1) { - fromContent += + if (node.textContent.indexOf('heading') !== -1) { + fromHeading += '
  • ' + @@ -368,18 +367,8 @@ function ariaAttributeReferences() { req + '
  • '; } - if (node.textContent.indexOf('prohibited') !== -1) { - fromProhibited += - '
  • ' + - content + - '' + - req + - '
  • '; - } - if (node.textContent.indexOf('encapsulation') !== -1) { - fromEncapsulation += + if (!isAbstract && node.textContent.indexOf('content') !== -1) { + fromContent += '
  • ' + @@ -388,8 +377,8 @@ function ariaAttributeReferences() { req + '
  • '; } - if (node.textContent.indexOf('legend') !== -1) { - fromLegend += + if (node.textContent.indexOf('prohibited') !== -1) { + fromProhibited += '
  • ' + @@ -677,33 +666,23 @@ function ariaAttributeReferences() { parentNode.replaceChild(list, node); } - node = document.getElementById('index_fromcontent'); - if (node) { - parentNode = node.parentNode; - list = document.createElement('ul'); - list.id = 'index_fromcontent'; - list.className = 'compact'; - list.innerHTML = fromContent; - parentNode.replaceChild(list, node); - } - - node = document.getElementById('index_fromencapsulation'); + node = document.getElementById('index_fromheading'); if (node) { parentNode = node.parentNode; list = document.createElement('ul'); - list.id = 'index_fromencapsulation'; + list.id = 'index_fromheading'; list.className = 'compact'; - list.innerHTML = fromEncapsulation; + list.innerHTML = fromHeading; parentNode.replaceChild(list, node); } - node = document.getElementById('index_fromlegend'); + node = document.getElementById('index_fromcontent'); if (node) { parentNode = node.parentNode; list = document.createElement('ul'); - list.id = 'index_fromlegend'; + list.id = 'index_fromcontent'; list.className = 'compact'; - list.innerHTML = fromLegend; + list.innerHTML = fromContent; parentNode.replaceChild(list, node); } From 3192676ffe7ec761378007be47b5c3c53e56e88a Mon Sep 17 00:00:00 2001 From: James Craig Date: Thu, 16 Feb 2023 00:20:25 -0800 Subject: [PATCH 04/12] revert changes to aria.js as these will come from the aria-common repo --- common/script/aria.js | 47 +++++++++++++++++++++++++++++++------------ 1 file changed, 34 insertions(+), 13 deletions(-) diff --git a/common/script/aria.js b/common/script/aria.js index c4df7c10d..38c02a06b 100644 --- a/common/script/aria.js +++ b/common/script/aria.js @@ -217,8 +217,9 @@ function ariaAttributeReferences() { var subRoles = []; var roleIndex = ''; var fromAuthor = ''; - var fromHeading = ""; var fromContent = ''; + var fromEncapsulation = ''; + var fromLegend = ''; var fromProhibited = ''; Array.prototype.slice @@ -357,8 +358,8 @@ function ariaAttributeReferences() { req + '
  • '; } - if (node.textContent.indexOf('heading') !== -1) { - fromHeading += + if (!isAbstract && node.textContent.indexOf('content') !== -1) { + fromContent += '
  • ' + @@ -367,8 +368,8 @@ function ariaAttributeReferences() { req + '
  • '; } - if (!isAbstract && node.textContent.indexOf('content') !== -1) { - fromContent += + if (node.textContent.indexOf('prohibited') !== -1) { + fromProhibited += '
  • ' + @@ -377,8 +378,18 @@ function ariaAttributeReferences() { req + '
  • '; } - if (node.textContent.indexOf('prohibited') !== -1) { - fromProhibited += + if (node.textContent.indexOf('encapsulation') !== -1) { + fromEncapsulation += + '
  • ' + + content + + '' + + req + + '
  • '; + } + if (node.textContent.indexOf('legend') !== -1) { + fromLegend += '
  • ' + @@ -666,23 +677,33 @@ function ariaAttributeReferences() { parentNode.replaceChild(list, node); } - node = document.getElementById('index_fromheading'); + node = document.getElementById('index_fromcontent'); if (node) { parentNode = node.parentNode; list = document.createElement('ul'); - list.id = 'index_fromheading'; + list.id = 'index_fromcontent'; list.className = 'compact'; - list.innerHTML = fromHeading; + list.innerHTML = fromContent; parentNode.replaceChild(list, node); } - node = document.getElementById('index_fromcontent'); + node = document.getElementById('index_fromencapsulation'); if (node) { parentNode = node.parentNode; list = document.createElement('ul'); - list.id = 'index_fromcontent'; + list.id = 'index_fromencapsulation'; list.className = 'compact'; - list.innerHTML = fromContent; + list.innerHTML = fromEncapsulation; + parentNode.replaceChild(list, node); + } + + node = document.getElementById('index_fromlegend'); + if (node) { + parentNode = node.parentNode; + list = document.createElement('ul'); + list.id = 'index_fromlegend'; + list.className = 'compact'; + list.innerHTML = fromLegend; parentNode.replaceChild(list, node); } From b4f7124ba3bd55e55e33652095c3a10cddcb014f Mon Sep 17 00:00:00 2001 From: James Craig Date: Thu, 16 Feb 2023 00:37:47 -0800 Subject: [PATCH 05/12] pull namefrom:heading for complementary and region; due to review discussion, these will be taken up as separate issues --- index.html | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/index.html b/index.html index 5fb9d85aa..71e6574b1 100644 --- a/index.html +++ b/index.html @@ -2673,12 +2673,7 @@

    Definition of Roles

    Name From: - -
      -
    • author
    • -
    • heading
    • -
    - + author Accessible Name Required: @@ -6880,12 +6875,7 @@
    Presentational Role Inheritance
    Name From: - -
      -
    • author
    • -
    • heading
    • -
    - + author Accessible Name Required: From 3370b0b5a3e0f6cc19b09de18b08e61a69892d11 Mon Sep 17 00:00:00 2001 From: James Craig Date: Thu, 16 Feb 2023 15:34:43 -0800 Subject: [PATCH 06/12] Missed removing one ref to region Good catch by @scottaohara in review Co-authored-by: Scott O'Hara --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 71e6574b1..ab1298af4 100644 --- a/index.html +++ b/index.html @@ -6819,7 +6819,7 @@
    Presentational Role Inheritance

    A landmark containing content that is relevant to a specific, author-specified purpose and sufficiently important that users will likely want to be able to navigate to the section easily and to have it listed in a summary of the page. Such a page summary could be generated dynamically by a user agent or assistive technology.

    Authors SHOULD limit use of the region role to sections containing content with a purpose that is not accurately described by one of the other landmark roles, such as main, complementary, or navigation.

    -

    Authors MUST give each element with a region role a brief label that describes the purpose of the region. For host languages that support elements with the default role of region (e.g., HTML section), authors would need to specify an explicit role="region" on the element to enable the nameFrom: heading technique.

    +

    Authors MUST give each element with a region role a brief label that describes the purpose of the region.

    Assistive technologies SHOULD enable users to quickly navigate to elements with role region. [=User agents=] SHOULD treat elements with role region and have an accessible name as navigational landmarks. [=User agents=] MAY enable users to quickly navigate to elements with role region.

    From 1b682eff92e2f6e1d14a62b46e5e3b12c37cf937 Mon Sep 17 00:00:00 2001 From: James Craig Date: Tue, 9 May 2023 11:10:40 -0700 Subject: [PATCH 07/12] Removing one missed instance of duplication noticed by Scott in review. --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 47e55731d..ea51b46c1 100644 --- a/index.html +++ b/index.html @@ -3571,7 +3571,7 @@

    Definition of Roles

    A landmark region that contains a collection of items and objects that, as a whole, combine to create a form. See related search.

    A form can contain a mix of host language form controls, scripted controls, and hyperlinks. Authors are reminded to use native host language semantics to create form controls whenever possible. If the purpose of a form is to submit search criteria, authors SHOULD use the search role instead of the generic form role.

    -

    Authors MUST give each element with role form a brief label that describes the purpose of the form. Authors SHOULD reference a visible label with aria-labelledby if a visible label is present. Authors SHOULD include the label inside of a heading whenever possible. The heading MAY be an instance of the standard host language heading element or an instance of an element with role heading.

    +

    Authors MUST give each element with role form a brief label that describes the purpose of the form.

    If an author uses a script to submit a form based on a user action that would otherwise not trigger an onsubmit event (for example, a form submission triggered by the user changing a form element's value), the author SHOULD provide the user with advance notification of the behavior.

    Assistive technologies SHOULD enable users to quickly navigate to elements with role form. [=User agents=] SHOULD treat elements with role form and an accessible name as navigational landmarks. From 648102e76538f80071d9c5110653b65d00cebf2f Mon Sep 17 00:00:00 2001 From: James Craig Date: Tue, 9 May 2023 11:13:42 -0700 Subject: [PATCH 08/12] Removing one missed instance of duplication noticed by Scott in review. Part Deux. --- index.html | 1 - 1 file changed, 1 deletion(-) diff --git a/index.html b/index.html index ea51b46c1..7cf8851df 100644 --- a/index.html +++ b/index.html @@ -3571,7 +3571,6 @@

    Definition of Roles

    A landmark region that contains a collection of items and objects that, as a whole, combine to create a form. See related search.

    A form can contain a mix of host language form controls, scripted controls, and hyperlinks. Authors are reminded to use native host language semantics to create form controls whenever possible. If the purpose of a form is to submit search criteria, authors SHOULD use the search role instead of the generic form role.

    -

    Authors MUST give each element with role form a brief label that describes the purpose of the form.

    If an author uses a script to submit a form based on a user action that would otherwise not trigger an onsubmit event (for example, a form submission triggered by the user changing a form element's value), the author SHOULD provide the user with advance notification of the behavior.

    Assistive technologies SHOULD enable users to quickly navigate to elements with role form. [=User agents=] SHOULD treat elements with role form and an accessible name as navigational landmarks. From 6df3d8f0058bdd5e5d082e0c82444a683a0b3fc6 Mon Sep 17 00:00:00 2001 From: James Craig Date: Tue, 9 May 2023 11:16:54 -0700 Subject: [PATCH 09/12] Removing another missed instance of prose duplicating an already normative requirement: 'Accessible Name Required: True' --- index.html | 1 - 1 file changed, 1 deletion(-) diff --git a/index.html b/index.html index 7cf8851df..6b9ad0373 100644 --- a/index.html +++ b/index.html @@ -6895,7 +6895,6 @@

    Presentational Role Inheritance

    A landmark containing content that is relevant to a specific, author-specified purpose and sufficiently important that users will likely want to be able to navigate to the section easily and to have it listed in a summary of the page. Such a page summary could be generated dynamically by a user agent or assistive technology.

    Authors SHOULD limit use of the region role to sections containing content with a purpose that is not accurately described by one of the other landmark roles, such as main, complementary, or navigation.

    -

    Authors MUST give each element with a region role a brief label that describes the purpose of the region.

    Assistive technologies SHOULD enable users to quickly navigate to elements with role region. [=User agents=] SHOULD treat elements with role region and an accessible name as navigational landmarks. [=User agents=] MAY enable users to quickly navigate to elements with role region.

    From 9335b3dca0e7ebcfa7d5501b1dcb5467df9a8530 Mon Sep 17 00:00:00 2001 From: James Craig Date: Tue, 9 May 2023 11:24:27 -0700 Subject: [PATCH 10/12] fix errant 'may' in prose from original PR. --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 6b9ad0373..3684df430 100644 --- a/index.html +++ b/index.html @@ -662,7 +662,7 @@

    Accessible Name Calculation

    One of the following values:
    1. author: name comes from values provided by the author in explicit markup features such as the aria-label attribute, the aria-labelledby attribute, or the host language labeling mechanism, such as the alt or title attributes in HTML, with HTML title attribute having the lowest precedence for specifying a text alternative.
    2. -
    3. heading: name comes from the text value of the first descendant (i.e., depth first) element node with the role of heading. Although "heading" may be allowed in addition to "author" in some roles, "heading" is used in content only if higher priority "author" features are not provided.
    4. +
    5. heading: name comes from the text value of the first descendant (i.e., depth first) element node with the role of heading. Although "heading" is allowed in addition to "author" in some roles, "heading" is used in content only if higher priority "author" features are not provided.
    6. contents: name comes from the text value of the element node. Although this might be allowed in addition to "author" in some roles, this is used in content only if higher priority "author" features are not provided. Priority is defined by the accessible name and description computation algorithm [[ACCNAME-1.2]].
    7. prohibited: the element does not support name from author. Authors MUST NOT use the aria-label or aria-labelledby attributes to name the element.
    From 42e33c3d84a372b2748ce5615a27cefcdd894631 Mon Sep 17 00:00:00 2001 From: James Craig Date: Fri, 2 Feb 2024 22:54:19 -0800 Subject: [PATCH 11/12] Clarify that DFS is referring to IDDFS --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 3684df430..ab67c74f3 100644 --- a/index.html +++ b/index.html @@ -662,7 +662,7 @@

    Accessible Name Calculation

    One of the following values:
    1. author: name comes from values provided by the author in explicit markup features such as the aria-label attribute, the aria-labelledby attribute, or the host language labeling mechanism, such as the alt or title attributes in HTML, with HTML title attribute having the lowest precedence for specifying a text alternative.
    2. -
    3. heading: name comes from the text value of the first descendant (i.e., depth first) element node with the role of heading. Although "heading" is allowed in addition to "author" in some roles, "heading" is used in content only if higher priority "author" features are not provided.
    4. +
    5. heading: name comes from the text value of the first descendant element node matching the role of heading in an iterative deepening depth-first search. Although "heading" is allowed in addition to "author" in some roles, "heading" is used in content only if higher priority "author" features are not provided.
    6. contents: name comes from the text value of the element node. Although this might be allowed in addition to "author" in some roles, this is used in content only if higher priority "author" features are not provided. Priority is defined by the accessible name and description computation algorithm [[ACCNAME-1.2]].
    7. prohibited: the element does not support name from author. Authors MUST NOT use the aria-label or aria-labelledby attributes to name the element.
    From ade3a8e3c746074f36b93a6ae9550018e4bceba6 Mon Sep 17 00:00:00 2001 From: James Craig Date: Thu, 8 Feb 2024 17:24:38 -0800 Subject: [PATCH 12/12] Moving the more technical part of the definition to the AccName PR. --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index ab67c74f3..096b0b432 100644 --- a/index.html +++ b/index.html @@ -662,7 +662,7 @@

    Accessible Name Calculation

    One of the following values:
    1. author: name comes from values provided by the author in explicit markup features such as the aria-label attribute, the aria-labelledby attribute, or the host language labeling mechanism, such as the alt or title attributes in HTML, with HTML title attribute having the lowest precedence for specifying a text alternative.
    2. -
    3. heading: name comes from the text value of the first descendant element node matching the role of heading in an iterative deepening depth-first search. Although "heading" is allowed in addition to "author" in some roles, "heading" is used in content only if higher priority "author" features are not provided.
    4. +
    5. heading: name comes from the text alternative of the first descendant element node matching the role of heading as defined in the AccName computation algorithm for nameFrom: heading. Although "heading" is allowed in addition to "author" in some roles, "heading" is used in content only if higher priority "author" features are not provided.
    6. contents: name comes from the text value of the element node. Although this might be allowed in addition to "author" in some roles, this is used in content only if higher priority "author" features are not provided. Priority is defined by the accessible name and description computation algorithm [[ACCNAME-1.2]].
    7. prohibited: the element does not support name from author. Authors MUST NOT use the aria-label or aria-labelledby attributes to name the element.