From 4b2cd9aa81fe037140d163897e35babb9db939b4 Mon Sep 17 00:00:00 2001 From: Anne Thyme Date: Fri, 14 Sep 2018 22:07:01 +0200 Subject: [PATCH 01/64] Create SC1-3-1-aria-required-context-role.md --- _rules/SC1-3-1-aria-required-context-role.md | 145 +++++++++++++++++++ 1 file changed, 145 insertions(+) create mode 100644 _rules/SC1-3-1-aria-required-context-role.md diff --git a/_rules/SC1-3-1-aria-required-context-role.md b/_rules/SC1-3-1-aria-required-context-role.md new file mode 100644 index 00000000000..2c6763b4954 --- /dev/null +++ b/_rules/SC1-3-1-aria-required-context-role.md @@ -0,0 +1,145 @@ +--- +name: ARIA required context role +description: | + This rule checks that a role does not exist outside of its required context roles + +success_criterion: +- 1.3.1 # Info and Relationships + +test_aspects: +- DOM Tree +- CSS Styling + +authors: +- Anne Thyme Nørregaard +--- + +## Test procedure + +### Applicability + +The rule applies to any HTML or SVG element that is [exposed to assistive technologies](#exposed-to-assistive-technologies) and has an explicit [semantic role](#semantic-role) that has [required context roles](https://www.w3.org/TR/wai-aria-1.1/#scope) listed for that role in [WAI-ARIA](https://www.w3.org/TR/wai-aria). + +### Expectation + +Each target element is [owned](https://www.w3.org/TR/wai-aria-1.1/#dfn-owned-element) by an element that is [exposed to assistive technologies](#exposed-to-assistive-technologies) and has a [semantic role](#semantic-role) matching one of the [required context roles](https://www.w3.org/TR/wai-aria-1.1/#scope) listed for that role in [WAI-ARIA](https://www.w3.org/TR/wai-aria). + +## Assumptions + +_There are currently no assumptions_ + +## Accessibility Support + +When a required owned element is not an immediate child, but rather a nested descendant, certain AT have issues recognizing the owned element. + +## Background + +- [Required Context Role](https://www.w3.org/TR/wai-aria-1.1/#scope) + +## Test Cases + +### Passed + +#### Passed example 1 + +Element with role ´listitem´ is contained within its required context role ´list´, expressed as an explicit role. + +```html +
+
+
+``` + +#### Passed example 2 + +Multiple levels of required context roles. + +```html +
+
+
+
+
+ +``` + +#### Passed example 3 + +Element with role ´listitem´ is contained within its required context role ´list´, through the implicit role of ´ul´. + +```html + +``` + +#### Passed example 4 + +Element contained within its required context role even though it is not a direct child of the context role. + +```html +
+
+
+
+
+
+
+
+
+``` + +### Failed + +#### Failed example 1 + +No context role. + +```html +
+``` + +#### Failed example 2 + +Wrong context role + +```html +
+
+
+``` + +#### Failed example 3 + +Element not contained within its required context role. + +```html +
+
+``` + +### Inapplicable + +#### Inapplicable example 1 + +Element does not have an explicit semantic role + +```html +
    +``` + +#### Inapplicable example 2 + +Element is not exposed to assistive technologies. + +```html + +``` + +#### Inapplicable example 3 + +Role does not have any required context roles listed in WAI-ARIA spec. + +```html +
    +``` From bdbfbeb3f1a9a0370e62e9f49c590c5df70b3b3c Mon Sep 17 00:00:00 2001 From: Anne Thyme Date: Sat, 15 Sep 2018 13:35:36 +0200 Subject: [PATCH 02/64] Update SC1-3-1-aria-required-context-role.md Handled Kasper's comment. --- _rules/SC1-3-1-aria-required-context-role.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_rules/SC1-3-1-aria-required-context-role.md b/_rules/SC1-3-1-aria-required-context-role.md index 2c6763b4954..9e8c56e005e 100644 --- a/_rules/SC1-3-1-aria-required-context-role.md +++ b/_rules/SC1-3-1-aria-required-context-role.md @@ -30,7 +30,7 @@ _There are currently no assumptions_ ## Accessibility Support -When a required owned element is not an immediate child, but rather a nested descendant, certain AT have issues recognizing the owned element. +When a required owned element is not a child, but rather a descendant, certain AT have issues recognizing the owned element. ## Background From f80607dfa9e947ea3a6cd7ace18f80bd3725cb2e Mon Sep 17 00:00:00 2001 From: Anne Thyme Date: Wed, 3 Oct 2018 17:13:38 +0200 Subject: [PATCH 03/64] Editorial update per feedback --- _rules/SC1-3-1-aria-required-context-role.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_rules/SC1-3-1-aria-required-context-role.md b/_rules/SC1-3-1-aria-required-context-role.md index 9e8c56e005e..66b47285e2b 100644 --- a/_rules/SC1-3-1-aria-required-context-role.md +++ b/_rules/SC1-3-1-aria-required-context-role.md @@ -18,7 +18,7 @@ authors: ### Applicability -The rule applies to any HTML or SVG element that is [exposed to assistive technologies](#exposed-to-assistive-technologies) and has an explicit [semantic role](#semantic-role) that has [required context roles](https://www.w3.org/TR/wai-aria-1.1/#scope) listed for that role in [WAI-ARIA](https://www.w3.org/TR/wai-aria). +The rule applies to any HTML or SVG element that is [exposed to assistive technologies](#exposed-to-assistive-technologies) and has an explicit [semantic role](#semantic-role) with a [WAI-ARIA required context role](https://www.w3.org/TR/wai-aria-1.1/#scope). ### Expectation From 409bb9aed7a6923554685397aab75fa5e3b6e075 Mon Sep 17 00:00:00 2001 From: Anne Thyme Date: Wed, 3 Oct 2018 17:18:57 +0200 Subject: [PATCH 04/64] Removed test case per feedback --- _rules/SC1-3-1-aria-required-context-role.md | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/_rules/SC1-3-1-aria-required-context-role.md b/_rules/SC1-3-1-aria-required-context-role.md index 66b47285e2b..16755c55edf 100644 --- a/_rules/SC1-3-1-aria-required-context-role.md +++ b/_rules/SC1-3-1-aria-required-context-role.md @@ -52,19 +52,6 @@ Element with role ´listitem´ is contained within its required context role ´l #### Passed example 2 -Multiple levels of required context roles. - -```html -
    -
    -
    -
    -
    -
    -``` - -#### Passed example 3 - Element with role ´listitem´ is contained within its required context role ´list´, through the implicit role of ´ul´. ```html @@ -73,7 +60,7 @@ Element with role ´listitem´ is contained within its required context role ´l ``` -#### Passed example 4 +#### Passed example 3 Element contained within its required context role even though it is not a direct child of the context role. From 8f79ac6237691396303866bff6e36c17abd33886 Mon Sep 17 00:00:00 2001 From: Anne Thyme Date: Wed, 3 Oct 2018 21:00:01 +0200 Subject: [PATCH 05/64] Update to Accessibility Support --- _rules/SC1-3-1-aria-required-context-role.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_rules/SC1-3-1-aria-required-context-role.md b/_rules/SC1-3-1-aria-required-context-role.md index 16755c55edf..2bbdd4f57cb 100644 --- a/_rules/SC1-3-1-aria-required-context-role.md +++ b/_rules/SC1-3-1-aria-required-context-role.md @@ -30,7 +30,7 @@ _There are currently no assumptions_ ## Accessibility Support -When a required owned element is not a child, but rather a descendant, certain AT have issues recognizing the owned element. +This rule relies on assistive technologies to recognize owned elements, also when they are nested descendants that are not immediate children. Certain assistive technologies cannot recognize owned elements that not immediate children, unless workarounds are used. ## Background From 4f4701d3012d709d7de68d93fe44e2e39f9f2fe3 Mon Sep 17 00:00:00 2001 From: Anne Thyme Date: Fri, 5 Oct 2018 16:58:47 +0200 Subject: [PATCH 06/64] Cleaner WAI-ARIA references --- _rules/SC1-3-1-aria-required-context-role.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_rules/SC1-3-1-aria-required-context-role.md b/_rules/SC1-3-1-aria-required-context-role.md index 2bbdd4f57cb..94276dcae00 100644 --- a/_rules/SC1-3-1-aria-required-context-role.md +++ b/_rules/SC1-3-1-aria-required-context-role.md @@ -22,7 +22,7 @@ The rule applies to any HTML or SVG element that is [exposed to assistive techno ### Expectation -Each target element is [owned](https://www.w3.org/TR/wai-aria-1.1/#dfn-owned-element) by an element that is [exposed to assistive technologies](#exposed-to-assistive-technologies) and has a [semantic role](#semantic-role) matching one of the [required context roles](https://www.w3.org/TR/wai-aria-1.1/#scope) listed for that role in [WAI-ARIA](https://www.w3.org/TR/wai-aria). +Each target element is [owned (per WAI-ARIA)](https://www.w3.org/TR/wai-aria-1.1/#dfn-owned-element) by an element that is [exposed to assistive technologies](#exposed-to-assistive-technologies) and has a [semantic role](#semantic-role) matching one of the [WAI-ARIA required context roles](https://www.w3.org/TR/wai-aria-1.1/#scope). ## Assumptions @@ -30,7 +30,7 @@ _There are currently no assumptions_ ## Accessibility Support -This rule relies on assistive technologies to recognize owned elements, also when they are nested descendants that are not immediate children. Certain assistive technologies cannot recognize owned elements that not immediate children, unless workarounds are used. +This rule relies on assistive technologies to recognize owned elements, as defined by [WAI-ARIA 1.1](https://www.w3.org/TR/wai-aria). This includes when they are nested descendants that are not immediate children. However, some assistive technologies do not recognize owned elements that are not immediate children, unless workarounds are used. ## Background From 7b43dde85cf2d162a7a2d7302e59ee593b4fb28f Mon Sep 17 00:00:00 2001 From: Anne Thyme Date: Thu, 18 Oct 2018 09:24:05 +0200 Subject: [PATCH 07/64] Editorials per feedback from Kasper --- _rules/SC1-3-1-aria-required-context-role.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/_rules/SC1-3-1-aria-required-context-role.md b/_rules/SC1-3-1-aria-required-context-role.md index 94276dcae00..fdc23aeb649 100644 --- a/_rules/SC1-3-1-aria-required-context-role.md +++ b/_rules/SC1-3-1-aria-required-context-role.md @@ -18,7 +18,7 @@ authors: ### Applicability -The rule applies to any HTML or SVG element that is [exposed to assistive technologies](#exposed-to-assistive-technologies) and has an explicit [semantic role](#semantic-role) with a [WAI-ARIA required context role](https://www.w3.org/TR/wai-aria-1.1/#scope). +The rule applies to any HTML or SVG element that is [exposed to assistive technologies](#exposed-to-assistive-technologies) and has an explicit [semantic role](#semantic-role) with a [WAI-ARIA required context role](https://www.w3.org/TR/wai-aria-1.1/#scope), except if the element has an implicit semantic role that is identical to its explicit semantic role. ### Expectation @@ -30,7 +30,7 @@ _There are currently no assumptions_ ## Accessibility Support -This rule relies on assistive technologies to recognize owned elements, as defined by [WAI-ARIA 1.1](https://www.w3.org/TR/wai-aria). This includes when they are nested descendants that are not immediate children. However, some assistive technologies do not recognize owned elements that are not immediate children, unless workarounds are used. +This rule relies on assistive technologies to recognize owned elements, as defined by [WAI-ARIA 1.1](https://www.w3.org/TR/wai-aria). This includes when they are descendants that are not children. However, some assistive technologies do not recognize owned elements that are not children, unless workarounds are used. ## Background @@ -42,7 +42,7 @@ This rule relies on assistive technologies to recognize owned elements, as defin #### Passed example 1 -Element with role ´listitem´ is contained within its required context role ´list´, expressed as an explicit role. +Element with role `listitem` is contained within its required context role `list`, expressed as an explicit role. ```html
    @@ -52,7 +52,7 @@ Element with role ´listitem´ is contained within its required context role ´l #### Passed example 2 -Element with role ´listitem´ is contained within its required context role ´list´, through the implicit role of ´ul´. +Element with role `listitem` is contained within its required context role `list`, through the implicit role of `ul`. ```html
      From 2ac617fdc99322063a44bc846e8ce31ac6572e2e Mon Sep 17 00:00:00 2001 From: Anne Thyme Date: Tue, 22 Jan 2019 09:50:10 +0100 Subject: [PATCH 08/64] Create owner-element.md --- pages/algorithms/owner-element.md | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 pages/algorithms/owner-element.md diff --git a/pages/algorithms/owner-element.md b/pages/algorithms/owner-element.md new file mode 100644 index 00000000000..fd121c326a0 --- /dev/null +++ b/pages/algorithms/owner-element.md @@ -0,0 +1,4 @@ +If the node is referenced by an element through the `aria-owns` attribute, then the owner element is the first node in the DOM tree that references it through `aria-owns`. +Otherwise, the owner element is the closest ancestor that is a node [included in the accessibility tree](#included-in-the-accessibility-tree). + +Nodes that are not in the accessibility tree do not have an owner element. From ded2be635a22585335b9a1b6045784a533ca9cf6 Mon Sep 17 00:00:00 2001 From: Anne Thyme Date: Tue, 22 Jan 2019 09:52:36 +0100 Subject: [PATCH 09/64] Update owner-element.md --- pages/algorithms/owner-element.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pages/algorithms/owner-element.md b/pages/algorithms/owner-element.md index fd121c326a0..d34a972943c 100644 --- a/pages/algorithms/owner-element.md +++ b/pages/algorithms/owner-element.md @@ -1,3 +1,9 @@ +--- +title: Owner element +key: owner-element +--- + + If the node is referenced by an element through the `aria-owns` attribute, then the owner element is the first node in the DOM tree that references it through `aria-owns`. Otherwise, the owner element is the closest ancestor that is a node [included in the accessibility tree](#included-in-the-accessibility-tree). From 8a81b5034aba74bea64f89f561583b0b4d78452f Mon Sep 17 00:00:00 2001 From: Anne Thyme Date: Tue, 22 Jan 2019 09:54:40 +0100 Subject: [PATCH 10/64] Update rule to use new Owner element definition --- _rules/SC1-3-1-aria-required-context-role.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_rules/SC1-3-1-aria-required-context-role.md b/_rules/SC1-3-1-aria-required-context-role.md index fdc23aeb649..0f10a645d30 100644 --- a/_rules/SC1-3-1-aria-required-context-role.md +++ b/_rules/SC1-3-1-aria-required-context-role.md @@ -18,11 +18,11 @@ authors: ### Applicability -The rule applies to any HTML or SVG element that is [exposed to assistive technologies](#exposed-to-assistive-technologies) and has an explicit [semantic role](#semantic-role) with a [WAI-ARIA required context role](https://www.w3.org/TR/wai-aria-1.1/#scope), except if the element has an implicit semantic role that is identical to its explicit semantic role. +The rule applies to any HTML or SVG element that is [included in the accessibility tree](#included-in-the-accessibility-tree) and has an explicit [semantic role](#semantic-role) with a [WAI-ARIA required context role](https://www.w3.org/TR/wai-aria-1.1/#scope), except if the element has an implicit semantic role that is identical to its explicit semantic role. ### Expectation -Each target element is [owned (per WAI-ARIA)](https://www.w3.org/TR/wai-aria-1.1/#dfn-owned-element) by an element that is [exposed to assistive technologies](#exposed-to-assistive-technologies) and has a [semantic role](#semantic-role) matching one of the [WAI-ARIA required context roles](https://www.w3.org/TR/wai-aria-1.1/#scope). +Each target element has an [owner element](owner-element) that has a [semantic role](#semantic-role) matching one of the [WAI-ARIA required context roles](https://www.w3.org/TR/wai-aria-1.1/#scope). ## Assumptions From 1542f48cf61813064f1f068b96699f573ac088a6 Mon Sep 17 00:00:00 2001 From: Anne Thyme Date: Tue, 22 Jan 2019 09:59:09 +0100 Subject: [PATCH 11/64] Update owner-element.md --- pages/algorithms/owner-element.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/algorithms/owner-element.md b/pages/algorithms/owner-element.md index d34a972943c..5db9195e6f6 100644 --- a/pages/algorithms/owner-element.md +++ b/pages/algorithms/owner-element.md @@ -5,6 +5,6 @@ key: owner-element If the node is referenced by an element through the `aria-owns` attribute, then the owner element is the first node in the DOM tree that references it through `aria-owns`. -Otherwise, the owner element is the closest ancestor that is a node [included in the accessibility tree](#included-in-the-accessibility-tree). +Otherwise, the owner element is the closest ancestor that is a node that is [included in the accessibility tree](#included-in-the-accessibility-tree). -Nodes that are not in the accessibility tree do not have an owner element. +Nodes that are not included in the accessibility tree do not have an owner element. From 8bf6038343eac01071bcaa0d7897742f6738c13d Mon Sep 17 00:00:00 2001 From: Anne Thyme Date: Tue, 22 Jan 2019 12:13:09 +0100 Subject: [PATCH 12/64] Update included-in-the-accessibility-tree.md Including Wilco's definition from https://github.com/auto-wcag/auto-wcag/issues/302 --- .../included-in-the-accessibility-tree.md | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/pages/glossary/included-in-the-accessibility-tree.md b/pages/glossary/included-in-the-accessibility-tree.md index 069a466949f..923d0df0c0a 100644 --- a/pages/glossary/included-in-the-accessibility-tree.md +++ b/pages/glossary/included-in-the-accessibility-tree.md @@ -3,8 +3,22 @@ title: Included in the accessibility tree key: included-in-the-accessibility-tree --- -Elements included in the accessibility tree of platform specific accessibility APIs. Elements in the accessibility tree are exposed to assistive technologies, allowing users to interact with the elements in a way that meet the requirements of the individual user. +Elements included in the accessibility tree of platform specific accessibility APIs. -The general rules for when elements are included in the accessibility tree are defined in the [core accessibility API mappings](https://www.w3.org/TR/core-aam/). For native markup languages, such as HTML and SVG, additional rules for when elements are [included in the accessibility tree][] can be found in the [HTML accessibility API mappings](https://www.w3.org/TR/html-aam/) and the [SVG accessibility API mappings](https://www.w3.org/TR/svg-aam/). +Elements in the accessibility tree are exposed to assistive technologies, allowing users to interact with the elements in a way that meet the requirements of the individual user. + +An element is included in the accessibility tree if it is a DOM node in the flattened DOM tree that meets the following criteria: + +1. It isn't hidden through WAI-ARIA or CSS, and +2. It does not have a [semantic role](#semantic-role) of `none` or `presentation`, and +3. it has one or more of the following: + * It has a [semantic role](#semantic-role), or + * It has an accessible name that, when trimmed of whitespace, is not an empty string, or + * it owns another element though an `aria-owns` attribute, or + * It is owned by another element that references it with `aria-owns` + + > **Note:** Text nodes and pseudo elements can also be part of the accessibility tree, since they have their text content as the accessible name. + +The general rules for when elements are included in the accessibility tree are defined in the [core accessibility API mappings](https://www.w3.org/TR/core-aam/). For native markup languages, such as HTML and SVG, additional rules for when elements are [included in the accessibility tree](#included-in-the-accessibility-tree) can be found in the [HTML accessibility API mappings](https://www.w3.org/TR/html-aam/) and the [SVG accessibility API mappings](https://www.w3.org/TR/svg-aam/). > **Note:** Users of assistive technologies might still be able to interact with elements that are not included in the accessibility tree. An example of this is a [focusable](#focusable) element with an `aria-hidden` attribute with a value of `true`. Such an element could still be interacted with using sequential keyboard navigation regardless of the assistive technologies used, even though the element would not be included in the accessibility tree. From dfc56b21ed49fabf4bbdf9dc6472a9f71e72e167 Mon Sep 17 00:00:00 2001 From: Anne Thyme Date: Tue, 22 Jan 2019 12:14:08 +0100 Subject: [PATCH 13/64] Update owner-element.md --- pages/glossary/owner-element.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/glossary/owner-element.md b/pages/glossary/owner-element.md index 5db9195e6f6..a8afd3071fd 100644 --- a/pages/glossary/owner-element.md +++ b/pages/glossary/owner-element.md @@ -5,6 +5,6 @@ key: owner-element If the node is referenced by an element through the `aria-owns` attribute, then the owner element is the first node in the DOM tree that references it through `aria-owns`. -Otherwise, the owner element is the closest ancestor that is a node that is [included in the accessibility tree](#included-in-the-accessibility-tree). +Otherwise, the owner element is the closest ancestor that is [included in the accessibility tree](#included-in-the-accessibility-tree). Nodes that are not included in the accessibility tree do not have an owner element. From c2ccbc1b4fcb5304f57780f6017c75715f5f05d1 Mon Sep 17 00:00:00 2001 From: Anne Thyme Date: Tue, 22 Jan 2019 12:29:08 +0100 Subject: [PATCH 14/64] Removed role="none"/"presentation" ... since they just remove the role, not remove the node from the accessibility tree. --- pages/glossary/included-in-the-accessibility-tree.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pages/glossary/included-in-the-accessibility-tree.md b/pages/glossary/included-in-the-accessibility-tree.md index 923d0df0c0a..a265c677674 100644 --- a/pages/glossary/included-in-the-accessibility-tree.md +++ b/pages/glossary/included-in-the-accessibility-tree.md @@ -10,8 +10,7 @@ Elements in the accessibility tree are exposed to assistive technologies, allowi An element is included in the accessibility tree if it is a DOM node in the flattened DOM tree that meets the following criteria: 1. It isn't hidden through WAI-ARIA or CSS, and -2. It does not have a [semantic role](#semantic-role) of `none` or `presentation`, and -3. it has one or more of the following: +2. it has one or more of the following: * It has a [semantic role](#semantic-role), or * It has an accessible name that, when trimmed of whitespace, is not an empty string, or * it owns another element though an `aria-owns` attribute, or From 35d480e04dea5e9ef6a0f0b84d3816c3df37f4fd Mon Sep 17 00:00:00 2001 From: Anne Thyme Date: Tue, 22 Jan 2019 12:48:59 +0100 Subject: [PATCH 15/64] Updated test cases to match new definitions --- _rules/SC1-3-1-aria-required-context-role.md | 58 ++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/_rules/SC1-3-1-aria-required-context-role.md b/_rules/SC1-3-1-aria-required-context-role.md index 0f10a645d30..9237c594000 100644 --- a/_rules/SC1-3-1-aria-required-context-role.md +++ b/_rules/SC1-3-1-aria-required-context-role.md @@ -76,6 +76,18 @@ Element contained within its required context role even though it is not a direc
    ``` +#### Passed example 4 + +`aria-owns` used to give the target element the right context role. + +```html +
    +
    +
    +
    +
    +``` + ### Failed #### Failed example 1 @@ -105,6 +117,52 @@ Element not contained within its required context role.
    ``` +#### Failed example 4 + +Context role is not included in the accessibility tree. + +```html + +``` + +#### Failed example 5 + +Element with role `listitem` has a closer ancestor, that is included in the accessibility tree, than the role `list` that should have been its context role + +```html +
    +
    +
    +
    +
    +``` + +#### Failed example 6 + +Element with role `listitem` has a closer ancestor, that is included in the accessibility tree, than the role `list` that should have been its context role + +```html +
    +
    +
    +
    +
    +``` + +#### Failed example 7 + +The owner element is the first element that references the target element through `aria-owns`, which results in the wrong context role. + +```html +
    +
    +
    +
    +
    +``` + ### Inapplicable #### Inapplicable example 1 From 9835b4470837b98836d4c11fedf878fe607c1fcc Mon Sep 17 00:00:00 2001 From: Anne Thyme Date: Tue, 22 Jan 2019 13:05:41 +0100 Subject: [PATCH 16/64] Add note about divergence from WAI-ARIA spec --- pages/glossary/owner-element.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pages/glossary/owner-element.md b/pages/glossary/owner-element.md index a8afd3071fd..0262dfc5534 100644 --- a/pages/glossary/owner-element.md +++ b/pages/glossary/owner-element.md @@ -8,3 +8,5 @@ If the node is referenced by an element through the `aria-owns` attribute, then Otherwise, the owner element is the closest ancestor that is [included in the accessibility tree](#included-in-the-accessibility-tree). Nodes that are not included in the accessibility tree do not have an owner element. + + > **Note:** This definition is diverging from the definition of ["owned element" in WAI-ARIA](https://www.w3.org/TR/wai-aria-1.1/#dfn-owned-element). The reason is that the WAI-ARIA definition was found to provide too little guidance on how to handle specific edge cases where several elements compete about the ownership, and it seem that browser implementations of this are diverging a lot. This definition seeks to find a reasonable middle ground, but will have to be updated if the WAI-ARIA definition changes. From d92d89c0a3ef7781aa65eaae4320fd89cb217ff1 Mon Sep 17 00:00:00 2001 From: Anne Thyme Date: Tue, 22 Jan 2019 13:08:41 +0100 Subject: [PATCH 17/64] Update SC1-3-1-aria-required-context-role.md --- _rules/SC1-3-1-aria-required-context-role.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_rules/SC1-3-1-aria-required-context-role.md b/_rules/SC1-3-1-aria-required-context-role.md index 9237c594000..112462197ff 100644 --- a/_rules/SC1-3-1-aria-required-context-role.md +++ b/_rules/SC1-3-1-aria-required-context-role.md @@ -22,7 +22,7 @@ The rule applies to any HTML or SVG element that is [included in the accessibili ### Expectation -Each target element has an [owner element](owner-element) that has a [semantic role](#semantic-role) matching one of the [WAI-ARIA required context roles](https://www.w3.org/TR/wai-aria-1.1/#scope). +The [owner element](owner-element) for each target element has a [semantic role](#semantic-role) matching one of the [WAI-ARIA required context roles](https://www.w3.org/TR/wai-aria-1.1/#scope) for the target element. ## Assumptions @@ -30,7 +30,7 @@ _There are currently no assumptions_ ## Accessibility Support -This rule relies on assistive technologies to recognize owned elements, as defined by [WAI-ARIA 1.1](https://www.w3.org/TR/wai-aria). This includes when they are descendants that are not children. However, some assistive technologies do not recognize owned elements that are not children, unless workarounds are used. +This rule relies on assistive technologies to recognize [owner elements](#owner-elements). This includes when they are descendants that are not children. However, some assistive technologies do not recognize owned elements that are not children, unless workarounds are used. ## Background From 16f50c7f183ddcb02a25708de382fdd6d21f083b Mon Sep 17 00:00:00 2001 From: Anne Thyme Date: Tue, 22 Jan 2019 13:11:19 +0100 Subject: [PATCH 18/64] Editorials --- _rules/SC1-3-1-aria-required-context-role.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_rules/SC1-3-1-aria-required-context-role.md b/_rules/SC1-3-1-aria-required-context-role.md index 112462197ff..4635b4a7156 100644 --- a/_rules/SC1-3-1-aria-required-context-role.md +++ b/_rules/SC1-3-1-aria-required-context-role.md @@ -30,7 +30,7 @@ _There are currently no assumptions_ ## Accessibility Support -This rule relies on assistive technologies to recognize [owner elements](#owner-elements). This includes when they are descendants that are not children. However, some assistive technologies do not recognize owned elements that are not children, unless workarounds are used. +This rule relies on assistive technologies to recognize [owner elements](#owner-element). This includes when the owner elements are ancestors that are not parents of the target element. However, some assistive technologies do not recognize owner elements that are not parents, unless workarounds are used. ## Background From 47e4ce5031d27a1de453565bb7ae3224525bcca6 Mon Sep 17 00:00:00 2001 From: Anne Thyme Date: Tue, 12 Feb 2019 13:46:00 +0100 Subject: [PATCH 19/64] `aria-owns` support added to Accessibility Support --- _rules/SC1-3-1-aria-required-context-role.md | 1 + 1 file changed, 1 insertion(+) diff --git a/_rules/SC1-3-1-aria-required-context-role.md b/_rules/SC1-3-1-aria-required-context-role.md index 4635b4a7156..55e2225a85c 100644 --- a/_rules/SC1-3-1-aria-required-context-role.md +++ b/_rules/SC1-3-1-aria-required-context-role.md @@ -31,6 +31,7 @@ _There are currently no assumptions_ ## Accessibility Support This rule relies on assistive technologies to recognize [owner elements](#owner-element). This includes when the owner elements are ancestors that are not parents of the target element. However, some assistive technologies do not recognize owner elements that are not parents, unless workarounds are used. +Furthermore, `aria-owns` has limited support in user agents. ## Background From 96472af1a38df54d78d2d014d67f3f9cf15ec95d Mon Sep 17 00:00:00 2001 From: Anne Thyme Date: Tue, 12 Feb 2019 13:51:00 +0100 Subject: [PATCH 20/64] Test case moved from Failed to Inapplicable ... according to Carlos' feedback. --- _rules/SC1-3-1-aria-required-context-role.md | 24 ++++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/_rules/SC1-3-1-aria-required-context-role.md b/_rules/SC1-3-1-aria-required-context-role.md index 55e2225a85c..e1e83bc3265 100644 --- a/_rules/SC1-3-1-aria-required-context-role.md +++ b/_rules/SC1-3-1-aria-required-context-role.md @@ -120,16 +120,6 @@ Element not contained within its required context role. #### Failed example 4 -Context role is not included in the accessibility tree. - -```html - -``` - -#### Failed example 5 - Element with role `listitem` has a closer ancestor, that is included in the accessibility tree, than the role `list` that should have been its context role ```html @@ -140,7 +130,7 @@ Element with role `listitem` has a closer ancestor, that is included in the acce
    ``` -#### Failed example 6 +#### Failed example 5 Element with role `listitem` has a closer ancestor, that is included in the accessibility tree, than the role `list` that should have been its context role @@ -152,7 +142,7 @@ Element with role `listitem` has a closer ancestor, that is included in the acce
    ``` -#### Failed example 7 +#### Failed example 6 The owner element is the first element that references the target element through `aria-owns`, which results in the wrong context role. @@ -189,3 +179,13 @@ Role does not have any required context roles listed in WAI-ARIA spec. ```html
    ``` + +#### Failed example 4 + +Element is not exposed to assistive technologies, since decendant has `aria-hidden` attribute with value set to `true`. + +```html + +``` From 0785f0900ca05fcb6ae784038c5c2f61923b592c Mon Sep 17 00:00:00 2001 From: Anne Thyme Date: Tue, 12 Feb 2019 14:31:26 +0100 Subject: [PATCH 21/64] Changed "element" to "node" ... per Wilco's feedback --- .../glossary/included-in-the-accessibility-tree.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pages/glossary/included-in-the-accessibility-tree.md b/pages/glossary/included-in-the-accessibility-tree.md index a265c677674..9d696a037a1 100644 --- a/pages/glossary/included-in-the-accessibility-tree.md +++ b/pages/glossary/included-in-the-accessibility-tree.md @@ -3,21 +3,21 @@ title: Included in the accessibility tree key: included-in-the-accessibility-tree --- -Elements included in the accessibility tree of platform specific accessibility APIs. +DOM nodes included as nodes in the accessibility tree of platform specific accessibility APIs. -Elements in the accessibility tree are exposed to assistive technologies, allowing users to interact with the elements in a way that meet the requirements of the individual user. +Nodes in the accessibility tree are exposed to assistive technologies, allowing users to interact with the object in a way that meets the requirements of the individual user. -An element is included in the accessibility tree if it is a DOM node in the flattened DOM tree that meets the following criteria: +A DOM node is included in the accessibility tree if it is a DOM node in the flattened DOM tree that meets the following criteria: -1. It isn't hidden through WAI-ARIA or CSS, and -2. it has one or more of the following: +1. It isn't hidden through WAI-ARIA (`aria-hidden="true"`) or CSS (`display:none` or `visibility:hidden`), and +2. It has one or more of the following: * It has a [semantic role](#semantic-role), or * It has an accessible name that, when trimmed of whitespace, is not an empty string, or - * it owns another element though an `aria-owns` attribute, or + * It owns another element though an `aria-owns` attribute, or * It is owned by another element that references it with `aria-owns` > **Note:** Text nodes and pseudo elements can also be part of the accessibility tree, since they have their text content as the accessible name. -The general rules for when elements are included in the accessibility tree are defined in the [core accessibility API mappings](https://www.w3.org/TR/core-aam/). For native markup languages, such as HTML and SVG, additional rules for when elements are [included in the accessibility tree](#included-in-the-accessibility-tree) can be found in the [HTML accessibility API mappings](https://www.w3.org/TR/html-aam/) and the [SVG accessibility API mappings](https://www.w3.org/TR/svg-aam/). +The general rules for when nodes are included in the accessibility tree are defined in the [core accessibility API mappings](https://www.w3.org/TR/core-aam/). For native markup languages, such as HTML and SVG, additional rules for when nodes are [included in the accessibility tree](#included-in-the-accessibility-tree) can be found in the [HTML accessibility API mappings](https://www.w3.org/TR/html-aam/) and the [SVG accessibility API mappings](https://www.w3.org/TR/svg-aam/). > **Note:** Users of assistive technologies might still be able to interact with elements that are not included in the accessibility tree. An example of this is a [focusable](#focusable) element with an `aria-hidden` attribute with a value of `true`. Such an element could still be interacted with using sequential keyboard navigation regardless of the assistive technologies used, even though the element would not be included in the accessibility tree. From 9c81dcda4f54d95b8610b1f0711a3bb6626b28f6 Mon Sep 17 00:00:00 2001 From: Anne Thyme Date: Tue, 12 Feb 2019 14:55:02 +0100 Subject: [PATCH 22/64] Disclaimer notes inserted --- _rules/SC1-3-1-aria-required-context-role.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/_rules/SC1-3-1-aria-required-context-role.md b/_rules/SC1-3-1-aria-required-context-role.md index e1e83bc3265..8965ada32b2 100644 --- a/_rules/SC1-3-1-aria-required-context-role.md +++ b/_rules/SC1-3-1-aria-required-context-role.md @@ -24,6 +24,8 @@ The rule applies to any HTML or SVG element that is [included in the accessibili The [owner element](owner-element) for each target element has a [semantic role](#semantic-role) matching one of the [WAI-ARIA required context roles](https://www.w3.org/TR/wai-aria-1.1/#scope) for the target element. +**Note:** The definition of [owner element](owner-element) used in this rule is diverging from the definition of ["owned element" in WAI-ARIA](https://www.w3.org/TR/wai-aria-1.1/#dfn-owned-element). See more in the [owner element](owner-element) definition. + ## Assumptions _There are currently no assumptions_ @@ -130,6 +132,9 @@ Element with role `listitem` has a closer ancestor, that is included in the acce
    ``` +**Note:** This test case follows the definition of [owner element](owner-element) used in this rule. If implemented differently, this definition could cause differences in outcome for this test case. + + #### Failed example 5 Element with role `listitem` has a closer ancestor, that is included in the accessibility tree, than the role `list` that should have been its context role @@ -154,6 +159,8 @@ The owner element is the first element that references the target element throug
    ``` +**Note:** This test case follows the definition of [owner element](owner-element) used in this rule. If implemented differently, this definition could cause differences in outcome for this test case. + ### Inapplicable #### Inapplicable example 1 From 52a4b1e804c38cad2d57622b0771bc235400cdde Mon Sep 17 00:00:00 2001 From: Anne Thyme Date: Tue, 12 Feb 2019 15:02:56 +0100 Subject: [PATCH 23/64] Note added on hiding elements ... as per comments from Wilco --- pages/glossary/owner-element.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pages/glossary/owner-element.md b/pages/glossary/owner-element.md index 0262dfc5534..e0800aad06e 100644 --- a/pages/glossary/owner-element.md +++ b/pages/glossary/owner-element.md @@ -5,6 +5,9 @@ key: owner-element If the node is referenced by an element through the `aria-owns` attribute, then the owner element is the first node in the DOM tree that references it through `aria-owns`. + +> **Note:** When using `aria-owns`, hiding the owner element through WAI-ARIA (`aria-hidden="true"`) or CSS (`display:none` or `visibility:hidden`) will not change the ownership, but should instead hide all elements owned by the owner element. + Otherwise, the owner element is the closest ancestor that is [included in the accessibility tree](#included-in-the-accessibility-tree). Nodes that are not included in the accessibility tree do not have an owner element. From 4339973c10efb71b798d7ca4629bb31e3b5eca4b Mon Sep 17 00:00:00 2001 From: Anne Thyme Date: Tue, 5 Mar 2019 14:05:52 +0100 Subject: [PATCH 24/64] Editorials per Wilco's comments --- _rules/SC1-3-1-aria-required-context-role.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_rules/SC1-3-1-aria-required-context-role.md b/_rules/SC1-3-1-aria-required-context-role.md index 8965ada32b2..cb2a3127976 100644 --- a/_rules/SC1-3-1-aria-required-context-role.md +++ b/_rules/SC1-3-1-aria-required-context-role.md @@ -33,7 +33,7 @@ _There are currently no assumptions_ ## Accessibility Support This rule relies on assistive technologies to recognize [owner elements](#owner-element). This includes when the owner elements are ancestors that are not parents of the target element. However, some assistive technologies do not recognize owner elements that are not parents, unless workarounds are used. -Furthermore, `aria-owns` has limited support in user agents. +Furthermore, `aria-owns` has limited support in some user agents. ## Background @@ -187,7 +187,7 @@ Role does not have any required context roles listed in WAI-ARIA spec.
    ``` -#### Failed example 4 +#### Inapplicable example 4 Element is not exposed to assistive technologies, since decendant has `aria-hidden` attribute with value set to `true`. From 5c7b137e05b696e51d6af3ed44fdd20ed92b873a Mon Sep 17 00:00:00 2001 From: Anne Thyme Date: Wed, 6 Mar 2019 12:55:14 +0100 Subject: [PATCH 25/64] Updating to account for competing owned elements Updating definition to cover this edge case: ```html
    Parent
    Child 1
    Child 2
    ``` Parent owns Child 1 Parent does not own Child 2 --- pages/glossary/owner-element.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pages/glossary/owner-element.md b/pages/glossary/owner-element.md index e0800aad06e..43f6a7b9ba8 100644 --- a/pages/glossary/owner-element.md +++ b/pages/glossary/owner-element.md @@ -1,15 +1,15 @@ --- -title: Owner element -key: owner-element +title: Owned by +key: owned-by --- +An element A is owned by element B if both elements exist within the same [document tree]() or [shadow tree]() and either: -If the node is referenced by an element through the `aria-owns` attribute, then the owner element is the first node in the DOM tree that references it through `aria-owns`. +1. Element A is the first element within the tree, in [tree order](), whose ID is included within the `aria-owns` attribute of element B. +2. Element B is the closest ancestor of element A that is included in the accessibility tree. -> **Note:** When using `aria-owns`, hiding the owner element through WAI-ARIA (`aria-hidden="true"`) or CSS (`display:none` or `visibility:hidden`) will not change the ownership, but should instead hide all elements owned by the owner element. +Nodes that are not included in the accessibility tree cannot be owned by other elements. -Otherwise, the owner element is the closest ancestor that is [included in the accessibility tree](#included-in-the-accessibility-tree). +> **Note:** When using `aria-owns`, hiding the owner element through WAI-ARIA (`aria-hidden="true"`) or CSS (`display:none` or `visibility:hidden`) will not change the ownership, but should instead hide all elements owned by the element. -Nodes that are not included in the accessibility tree do not have an owner element. - - > **Note:** This definition is diverging from the definition of ["owned element" in WAI-ARIA](https://www.w3.org/TR/wai-aria-1.1/#dfn-owned-element). The reason is that the WAI-ARIA definition was found to provide too little guidance on how to handle specific edge cases where several elements compete about the ownership, and it seem that browser implementations of this are diverging a lot. This definition seeks to find a reasonable middle ground, but will have to be updated if the WAI-ARIA definition changes. +> **Note:** This definition is diverging from the definition of ["owned element" in WAI-ARIA](https://www.w3.org/TR/wai-aria-1.1/#dfn-owned-element). The reason is that the WAI-ARIA definition was found to provide too little guidance on how to handle specific edge cases where several elements compete about the ownership, and it seem that browser implementations of this are diverging a lot. This definition seeks to find a reasonable middle ground, but will have to be updated if the WAI-ARIA definition changes. From 127beb48f57e01d6f88da817b9b44dec67b847e4 Mon Sep 17 00:00:00 2001 From: Anne Thyme Date: Wed, 6 Mar 2019 12:59:43 +0100 Subject: [PATCH 26/64] Adding links to definitions --- pages/glossary/owner-element.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pages/glossary/owner-element.md b/pages/glossary/owner-element.md index 43f6a7b9ba8..ec49f2dd21d 100644 --- a/pages/glossary/owner-element.md +++ b/pages/glossary/owner-element.md @@ -3,10 +3,10 @@ title: Owned by key: owned-by --- -An element A is owned by element B if both elements exist within the same [document tree]() or [shadow tree]() and either: +An element A is owned by element B if both elements exist within the same [document tree](https://www.w3.org/TR/dom41/#document-trees) or [shadow tree](https://www.w3.org/TR/dom41/#shadow-trees) and either: -1. Element A is the first element within the tree, in [tree order](), whose ID is included within the `aria-owns` attribute of element B. -2. Element B is the closest ancestor of element A that is included in the accessibility tree. +1. Element A is the first element within the tree, in [tree order](https://www.w3.org/TR/dom/#concept-tree-order), whose ID is included within the `aria-owns` attribute of element B. +2. Element B is the closest ancestor of element A that is [included in the accessibility tree](#included-in-the-accessibility-tree). Nodes that are not included in the accessibility tree cannot be owned by other elements. From 473016f3ac5601917917c637d7114f8cb8ea0f6d Mon Sep 17 00:00:00 2001 From: Anne Thyme Date: Wed, 6 Mar 2019 13:01:40 +0100 Subject: [PATCH 27/64] Added link to definition --- pages/glossary/owner-element.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/glossary/owner-element.md b/pages/glossary/owner-element.md index ec49f2dd21d..544a58b0cea 100644 --- a/pages/glossary/owner-element.md +++ b/pages/glossary/owner-element.md @@ -6,7 +6,7 @@ key: owned-by An element A is owned by element B if both elements exist within the same [document tree](https://www.w3.org/TR/dom41/#document-trees) or [shadow tree](https://www.w3.org/TR/dom41/#shadow-trees) and either: 1. Element A is the first element within the tree, in [tree order](https://www.w3.org/TR/dom/#concept-tree-order), whose ID is included within the `aria-owns` attribute of element B. -2. Element B is the closest ancestor of element A that is [included in the accessibility tree](#included-in-the-accessibility-tree). +2. Element B is the closest [ancestor](https://www.w3.org/TR/dom/#concept-tree-ancestor) of element A that is [included in the accessibility tree](#included-in-the-accessibility-tree). Nodes that are not included in the accessibility tree cannot be owned by other elements. From b9525557088fe6bbe7027fa6801d915a9980393d Mon Sep 17 00:00:00 2001 From: Anne Thyme Date: Wed, 6 Mar 2019 13:09:47 +0100 Subject: [PATCH 28/64] Rule updated to use new "owned by" definition --- _rules/SC1-3-1-aria-required-context-role.md | 22 ++++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/_rules/SC1-3-1-aria-required-context-role.md b/_rules/SC1-3-1-aria-required-context-role.md index cb2a3127976..8b69b0bfce9 100644 --- a/_rules/SC1-3-1-aria-required-context-role.md +++ b/_rules/SC1-3-1-aria-required-context-role.md @@ -1,7 +1,7 @@ --- name: ARIA required context role description: | - This rule checks that a role does not exist outside of its required context roles + This rule checks that a role does not exist outside of its required context roles. success_criterion: - 1.3.1 # Info and Relationships @@ -22,9 +22,9 @@ The rule applies to any HTML or SVG element that is [included in the accessibili ### Expectation -The [owner element](owner-element) for each target element has a [semantic role](#semantic-role) matching one of the [WAI-ARIA required context roles](https://www.w3.org/TR/wai-aria-1.1/#scope) for the target element. +The target element is [owned by](#owned-by) an element that has a [semantic role](#semantic-role) matching one of the [WAI-ARIA required context roles](https://www.w3.org/TR/wai-aria-1.1/#scope) for the target element. -**Note:** The definition of [owner element](owner-element) used in this rule is diverging from the definition of ["owned element" in WAI-ARIA](https://www.w3.org/TR/wai-aria-1.1/#dfn-owned-element). See more in the [owner element](owner-element) definition. +**Note:** The definition of [owned by](#owned-by) used in this rule is diverging from the definition of ["owned element" in WAI-ARIA](https://www.w3.org/TR/wai-aria-1.1/#dfn-owned-element). See more in the [owned by](#owned-by) definition. ## Assumptions @@ -32,7 +32,7 @@ _There are currently no assumptions_ ## Accessibility Support -This rule relies on assistive technologies to recognize [owner elements](#owner-element). This includes when the owner elements are ancestors that are not parents of the target element. However, some assistive technologies do not recognize owner elements that are not parents, unless workarounds are used. +This rule relies on assistive technologies to recognize which elements are [owned by](#owned-by) each other. This includes when the element is owned by another element that is an ancester, but not a parent of the target element. Some assistive technologies does not accept these `owned by` relationships, unless workarounds are used. Furthermore, `aria-owns` has limited support in some user agents. ## Background @@ -103,7 +103,7 @@ No context role. #### Failed example 2 -Wrong context role +Wrong context role. ```html
    @@ -122,7 +122,7 @@ Element not contained within its required context role. #### Failed example 4 -Element with role `listitem` has a closer ancestor, that is included in the accessibility tree, than the role `list` that should have been its context role +Element with role `listitem` has a closer ancestor, that is included in the accessibility tree, than the role `list` that should have been its context role. ```html
    @@ -132,12 +132,12 @@ Element with role `listitem` has a closer ancestor, that is included in the acce
    ``` -**Note:** This test case follows the definition of [owner element](owner-element) used in this rule. If implemented differently, this definition could cause differences in outcome for this test case. +**Note:** This test case follows the definition of [owned by](#owned-by) used in this rule. If implemented differently, this definition could cause differences in outcome for this test case. #### Failed example 5 -Element with role `listitem` has a closer ancestor, that is included in the accessibility tree, than the role `list` that should have been its context role +Element with role `listitem` has a closer ancestor, that is included in the accessibility tree, than the role `list` that should have been its context role. ```html
    @@ -149,7 +149,7 @@ Element with role `listitem` has a closer ancestor, that is included in the acce #### Failed example 6 -The owner element is the first element that references the target element through `aria-owns`, which results in the wrong context role. +The element with the semantic role of `list` is [owned by](#owned-by) the first element that references it element through `aria-owns`, which results in the wrong context role. ```html
    @@ -159,13 +159,13 @@ The owner element is the first element that references the target element throug
    ``` -**Note:** This test case follows the definition of [owner element](owner-element) used in this rule. If implemented differently, this definition could cause differences in outcome for this test case. +**Note:** This test case follows the definition of [owned by](#owned-by) used in this rule. If implemented differently, this definition could cause differences in outcome for this test case. ### Inapplicable #### Inapplicable example 1 -Element does not have an explicit semantic role +Element does not have an explicit semantic role. ```html
      From dc50845abc12de7b558b4018631710baa533bb14 Mon Sep 17 00:00:00 2001 From: Anne Thyme Date: Wed, 6 Mar 2019 13:28:24 +0100 Subject: [PATCH 29/64] Reverting changes to "included in the acc. tree" Removing the "expanded" description of when DOM nodes are included in the accessibility tree, since it was too simplified and only applied to native HTML elements, and not even covering all the edge cases for that technology. The source of truth for this lies within the specs already linked to from the definition. --- pages/glossary/included-in-the-accessibility-tree.md | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/pages/glossary/included-in-the-accessibility-tree.md b/pages/glossary/included-in-the-accessibility-tree.md index 9d696a037a1..31c1c4b24f8 100644 --- a/pages/glossary/included-in-the-accessibility-tree.md +++ b/pages/glossary/included-in-the-accessibility-tree.md @@ -7,17 +7,6 @@ DOM nodes included as nodes in the accessibility tree of platform specific acces Nodes in the accessibility tree are exposed to assistive technologies, allowing users to interact with the object in a way that meets the requirements of the individual user. -A DOM node is included in the accessibility tree if it is a DOM node in the flattened DOM tree that meets the following criteria: - -1. It isn't hidden through WAI-ARIA (`aria-hidden="true"`) or CSS (`display:none` or `visibility:hidden`), and -2. It has one or more of the following: - * It has a [semantic role](#semantic-role), or - * It has an accessible name that, when trimmed of whitespace, is not an empty string, or - * It owns another element though an `aria-owns` attribute, or - * It is owned by another element that references it with `aria-owns` - - > **Note:** Text nodes and pseudo elements can also be part of the accessibility tree, since they have their text content as the accessible name. - The general rules for when nodes are included in the accessibility tree are defined in the [core accessibility API mappings](https://www.w3.org/TR/core-aam/). For native markup languages, such as HTML and SVG, additional rules for when nodes are [included in the accessibility tree](#included-in-the-accessibility-tree) can be found in the [HTML accessibility API mappings](https://www.w3.org/TR/html-aam/) and the [SVG accessibility API mappings](https://www.w3.org/TR/svg-aam/). > **Note:** Users of assistive technologies might still be able to interact with elements that are not included in the accessibility tree. An example of this is a [focusable](#focusable) element with an `aria-hidden` attribute with a value of `true`. Such an element could still be interacted with using sequential keyboard navigation regardless of the assistive technologies used, even though the element would not be included in the accessibility tree. From 542090df194d63c069d5b0740a5b7746428e00ec Mon Sep 17 00:00:00 2001 From: Anne Thyme Date: Wed, 6 Mar 2019 15:56:42 +0100 Subject: [PATCH 30/64] Added inapplicable test case Inapplicable example added for explicit role that is identical to implicit role. --- _rules/SC1-3-1-aria-required-context-role.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/_rules/SC1-3-1-aria-required-context-role.md b/_rules/SC1-3-1-aria-required-context-role.md index 8b69b0bfce9..5a45fe3c427 100644 --- a/_rules/SC1-3-1-aria-required-context-role.md +++ b/_rules/SC1-3-1-aria-required-context-role.md @@ -196,3 +196,10 @@ Element is not exposed to assistive technologies, since decendant has `aria-hidd
      ``` +#### Inapplicable example 5 + +Element has an explicit semantic role, but it is identical to the implicit semantic role, making the element inapplicable. + +```html +
    • +``` From 31a7bf140a6151503d1cce2c599506ec8e97a67e Mon Sep 17 00:00:00 2001 From: Anne Thyme Date: Thu, 7 Mar 2019 08:29:59 +0100 Subject: [PATCH 31/64] Added Passed test case --- _rules/SC1-3-1-aria-required-context-role.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/_rules/SC1-3-1-aria-required-context-role.md b/_rules/SC1-3-1-aria-required-context-role.md index 5a45fe3c427..709615751f5 100644 --- a/_rules/SC1-3-1-aria-required-context-role.md +++ b/_rules/SC1-3-1-aria-required-context-role.md @@ -83,6 +83,15 @@ Element contained within its required context role even though it is not a direc `aria-owns` used to give the target element the right context role. +```html +
      +
      +``` + +#### Passed example 5 + +`aria-owns` trumps ownership by closest ancestor, giving the element with role of `listitem` the correct context role. + ```html
      From 576eb0de38e0935b62e0baba067db10acb2bad33 Mon Sep 17 00:00:00 2001 From: Anne Thyme Date: Thu, 7 Mar 2019 09:11:49 +0100 Subject: [PATCH 32/64] New assumption: role being used to comply to WCAG --- _rules/SC1-3-1-aria-required-context-role.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_rules/SC1-3-1-aria-required-context-role.md b/_rules/SC1-3-1-aria-required-context-role.md index 709615751f5..e200389572d 100644 --- a/_rules/SC1-3-1-aria-required-context-role.md +++ b/_rules/SC1-3-1-aria-required-context-role.md @@ -28,7 +28,7 @@ The target element is [owned by](#owned-by) an element that has a [semantic role ## Assumptions -_There are currently no assumptions_ +This rule assumes that the explicit [semantic role](#semantic-role) on the target element is being used with the intention to comply to WCAG. If the semantic role on the target element is incorrectly used, and any relationships between elements are already programmatically determinable, failing this rule might not result in accessibility issues for real users. ## Accessibility Support From c031c8987712478e95932c022b78ebf01d22b44f Mon Sep 17 00:00:00 2001 From: Anne Thyme Date: Thu, 7 Mar 2019 09:20:35 +0100 Subject: [PATCH 33/64] Further elaboration of assumption --- _rules/SC1-3-1-aria-required-context-role.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_rules/SC1-3-1-aria-required-context-role.md b/_rules/SC1-3-1-aria-required-context-role.md index e200389572d..adc31434037 100644 --- a/_rules/SC1-3-1-aria-required-context-role.md +++ b/_rules/SC1-3-1-aria-required-context-role.md @@ -28,7 +28,7 @@ The target element is [owned by](#owned-by) an element that has a [semantic role ## Assumptions -This rule assumes that the explicit [semantic role](#semantic-role) on the target element is being used with the intention to comply to WCAG. If the semantic role on the target element is incorrectly used, and any relationships between elements are already programmatically determinable, failing this rule might not result in accessibility issues for real users. +This rule assumes that the explicit [semantic role](#semantic-role) on the target element is being used with the intention to comply to WCAG. If the explicit semantic role on the target element is incorrectly used, and any relationships between elements are already programmatically determinable, failing this rule might not result in accessibility issues for real users, and it should then not be considered a failure under WCAG success criterion 1.3.1 Info and Relationships. ## Accessibility Support From 8d0875284265096967fb56746182cdd656d7fa6f Mon Sep 17 00:00:00 2001 From: Anne Thyme Date: Thu, 21 Mar 2019 11:16:13 +0100 Subject: [PATCH 34/64] Editorials per Kasper's comments --- _rules/SC1-3-1-aria-required-context-role.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/_rules/SC1-3-1-aria-required-context-role.md b/_rules/SC1-3-1-aria-required-context-role.md index adc31434037..a0c51186201 100644 --- a/_rules/SC1-3-1-aria-required-context-role.md +++ b/_rules/SC1-3-1-aria-required-context-role.md @@ -1,7 +1,7 @@ --- name: ARIA required context role description: | - This rule checks that a role does not exist outside of its required context roles. + This rule checks that a role does not exist outside of its required context. success_criterion: - 1.3.1 # Info and Relationships @@ -28,11 +28,11 @@ The target element is [owned by](#owned-by) an element that has a [semantic role ## Assumptions -This rule assumes that the explicit [semantic role](#semantic-role) on the target element is being used with the intention to comply to WCAG. If the explicit semantic role on the target element is incorrectly used, and any relationships between elements are already programmatically determinable, failing this rule might not result in accessibility issues for real users, and it should then not be considered a failure under WCAG success criterion 1.3.1 Info and Relationships. +This rule assumes that the explicit [semantic role](#semantic-role) on the target element is being used with the intention to comply to WCAG. If the explicit semantic role on the target element is incorrectly used, and any relationships between elements are already programmatically determinable, failing this rule might not result in accessibility issues for users of assistive technologies, and it should then not be considered a failure under WCAG success criterion 1.3.1 Info and Relationships. ## Accessibility Support -This rule relies on assistive technologies to recognize which elements are [owned by](#owned-by) each other. This includes when the element is owned by another element that is an ancester, but not a parent of the target element. Some assistive technologies does not accept these `owned by` relationships, unless workarounds are used. +This rule relies on assistive technologies to recognize which elements are [owned by](#owned-by) each other. This includes when the element is owned by another element that is an ancestor, but not a parent of the target element. Some assistive technologies does not accept these owned by relationships, unless workarounds are used. Furthermore, `aria-owns` has limited support in some user agents. ## Background From 08069fa9c7107f2bfa082cd8a8790d75a420b211 Mon Sep 17 00:00:00 2001 From: Anne Thyme Date: Tue, 23 Apr 2019 14:26:02 +0200 Subject: [PATCH 35/64] Fix incorrect code and descriptions in test cases --- _rules/SC1-3-1-aria-required-context-role.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/_rules/SC1-3-1-aria-required-context-role.md b/_rules/SC1-3-1-aria-required-context-role.md index a0c51186201..993656b9ff6 100644 --- a/_rules/SC1-3-1-aria-required-context-role.md +++ b/_rules/SC1-3-1-aria-required-context-role.md @@ -32,7 +32,7 @@ This rule assumes that the explicit [semantic role](#semantic-role) on the targe ## Accessibility Support -This rule relies on assistive technologies to recognize which elements are [owned by](#owned-by) each other. This includes when the element is owned by another element that is an ancestor, but not a parent of the target element. Some assistive technologies does not accept these owned by relationships, unless workarounds are used. +This rule relies on assistive technologies to recognize which elements are [owned by](#owned-by) each other. This includes when the element is owned by another element that is an ancestor, but not a parent of the target element. Some assistive technologies do not accept these owned by relationships, unless workarounds are used. Furthermore, `aria-owns` has limited support in some user agents. ## Background @@ -74,8 +74,8 @@ Element contained within its required context role even though it is not a direc
      -
      -
      +
      +
      ``` @@ -137,7 +137,7 @@ Element with role `listitem` has a closer ancestor, that is included in the acce
      -
      +
      ``` @@ -158,7 +158,7 @@ Element with role `listitem` has a closer ancestor, that is included in the acce #### Failed example 6 -The element with the semantic role of `list` is [owned by](#owned-by) the first element that references it element through `aria-owns`, which results in the wrong context role. +The element with the semantic role of `listitem` is [owned by](#owned-by) the first element that references it element through `aria-owns`, which results in the wrong context role. ```html
      From 75784134b56f1a5a3a667de2601bf85131b50917 Mon Sep 17 00:00:00 2001 From: Anne Thyme Date: Tue, 23 Apr 2019 14:33:58 +0200 Subject: [PATCH 36/64] Accessibility Support note on empty elements --- _rules/SC1-3-1-aria-required-context-role.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/_rules/SC1-3-1-aria-required-context-role.md b/_rules/SC1-3-1-aria-required-context-role.md index 993656b9ff6..b969f41b337 100644 --- a/_rules/SC1-3-1-aria-required-context-role.md +++ b/_rules/SC1-3-1-aria-required-context-role.md @@ -32,8 +32,9 @@ This rule assumes that the explicit [semantic role](#semantic-role) on the targe ## Accessibility Support -This rule relies on assistive technologies to recognize which elements are [owned by](#owned-by) each other. This includes when the element is owned by another element that is an ancestor, but not a parent of the target element. Some assistive technologies do not accept these owned by relationships, unless workarounds are used. +- This rule relies on assistive technologies to recognize which elements are [owned by](#owned-by) each other. This includes when the element is owned by another element that is an ancestor, but not a parent of the target element. Some assistive technologies do not accept these owned by relationships, unless workarounds are used. Furthermore, `aria-owns` has limited support in some user agents. +- Some user agents and assistive technologies ignore empty elements, which means they are not presented to all users. However, since this is handled inconsitently across user agents and assistive technologies, empty elements are applicable to this rule. ## Background From b360785f37ec12828690b1ef5834511bfdf0aada Mon Sep 17 00:00:00 2001 From: Anne Thyme Date: Wed, 1 May 2019 15:35:44 +0200 Subject: [PATCH 37/64] Editorial: Slight rewording of Expectation As suggested by @kasperisager --- _rules/SC1-3-1-aria-required-context-role.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_rules/SC1-3-1-aria-required-context-role.md b/_rules/SC1-3-1-aria-required-context-role.md index b969f41b337..977f3786258 100644 --- a/_rules/SC1-3-1-aria-required-context-role.md +++ b/_rules/SC1-3-1-aria-required-context-role.md @@ -22,7 +22,7 @@ The rule applies to any HTML or SVG element that is [included in the accessibili ### Expectation -The target element is [owned by](#owned-by) an element that has a [semantic role](#semantic-role) matching one of the [WAI-ARIA required context roles](https://www.w3.org/TR/wai-aria-1.1/#scope) for the target element. +The target element is [owned by](#owned-by) an element that has a [semantic role](#semantic-role) that is one of the [WAI-ARIA required context roles](https://www.w3.org/TR/wai-aria-1.1/#scope) of the target element. **Note:** The definition of [owned by](#owned-by) used in this rule is diverging from the definition of ["owned element" in WAI-ARIA](https://www.w3.org/TR/wai-aria-1.1/#dfn-owned-element). See more in the [owned by](#owned-by) definition. From 4b13b65b6a5720f054b2bc72ee00ab8d9b42170b Mon Sep 17 00:00:00 2001 From: Anne Thyme Date: Wed, 1 May 2019 15:46:47 +0200 Subject: [PATCH 38/64] Add id to frontmatter of rule --- _rules/SC1-3-1-aria-required-context-role.md | 1 + 1 file changed, 1 insertion(+) diff --git a/_rules/SC1-3-1-aria-required-context-role.md b/_rules/SC1-3-1-aria-required-context-role.md index 977f3786258..8278d6a7822 100644 --- a/_rules/SC1-3-1-aria-required-context-role.md +++ b/_rules/SC1-3-1-aria-required-context-role.md @@ -1,4 +1,5 @@ --- +id: ff89c9 name: ARIA required context role description: | This rule checks that a role does not exist outside of its required context. From 922d3e8b3f41fe0db3667aa605ab32cc7a081e60 Mon Sep 17 00:00:00 2001 From: Anne Thyme Date: Fri, 7 Jun 2019 12:42:51 +0200 Subject: [PATCH 39/64] Update template + editorials + note for Appl. Per Wilco's comments --- _rules/SC1-3-1-aria-required-context-role.md | 56 ++++++++++---------- 1 file changed, 29 insertions(+), 27 deletions(-) diff --git a/_rules/SC1-3-1-aria-required-context-role.md b/_rules/SC1-3-1-aria-required-context-role.md index 8278d6a7822..323c833ec4a 100644 --- a/_rules/SC1-3-1-aria-required-context-role.md +++ b/_rules/SC1-3-1-aria-required-context-role.md @@ -1,27 +1,29 @@ --- id: ff89c9 name: ARIA required context role +rule_type: atomic description: | - This rule checks that a role does not exist outside of its required context. - -success_criterion: -- 1.3.1 # Info and Relationships - -test_aspects: + This rule checks that a role exists inside its required context. +accessibility_requirements: + wcag20:1.3.1: # Info and Relationships (A) + forConformance: true + failed: not satisfied + passed: further testing needed + inapplicable: further testing needed +input_aspects: - DOM Tree - CSS Styling - authors: - Anne Thyme Nørregaard --- -## Test procedure - -### Applicability +## Applicability The rule applies to any HTML or SVG element that is [included in the accessibility tree](#included-in-the-accessibility-tree) and has an explicit [semantic role](#semantic-role) with a [WAI-ARIA required context role](https://www.w3.org/TR/wai-aria-1.1/#scope), except if the element has an implicit semantic role that is identical to its explicit semantic role. -### Expectation +**Note:** An example of an element that has an implicit semantic role that is identical to its explicit semantic role is an `
    • `element that has `role="listitem"`. Elements like these are not applicable to this rule. + +## Expectation The target element is [owned by](#owned-by) an element that has a [semantic role](#semantic-role) that is one of the [WAI-ARIA required context roles](https://www.w3.org/TR/wai-aria-1.1/#scope) of the target element. @@ -29,7 +31,7 @@ The target element is [owned by](#owned-by) an element that has a [semantic role ## Assumptions -This rule assumes that the explicit [semantic role](#semantic-role) on the target element is being used with the intention to comply to WCAG. If the explicit semantic role on the target element is incorrectly used, and any relationships between elements are already programmatically determinable, failing this rule might not result in accessibility issues for users of assistive technologies, and it should then not be considered a failure under WCAG success criterion 1.3.1 Info and Relationships. +This rule assumes that the explicit [semantic role](#semantic-role) on the target element is used with the intention to comply to WCAG. If the explicit semantic role on the target element is incorrectly used, and any relationships between elements are already programmatically determinable, failing this rule might not result in accessibility issues for users of assistive technologies, and it should then not be considered a failure under WCAG success criterion 1.3.1 Info and Relationships. ## Accessibility Support @@ -45,7 +47,7 @@ Furthermore, `aria-owns` has limited support in some user agents. ### Passed -#### Passed example 1 +#### Passed Example 1 Element with role `listitem` is contained within its required context role `list`, expressed as an explicit role. @@ -55,7 +57,7 @@ Element with role `listitem` is contained within its required context role `list
    • ``` -#### Passed example 2 +#### Passed Example 2 Element with role `listitem` is contained within its required context role `list`, through the implicit role of `ul`. @@ -65,7 +67,7 @@ Element with role `listitem` is contained within its required context role `list ``` -#### Passed example 3 +#### Passed Example 3 Element contained within its required context role even though it is not a direct child of the context role. @@ -81,7 +83,7 @@ Element contained within its required context role even though it is not a direc
      ``` -#### Passed example 4 +#### Passed Example 4 `aria-owns` used to give the target element the right context role. @@ -90,7 +92,7 @@ Element contained within its required context role even though it is not a direc
      ``` -#### Passed example 5 +#### Passed Example 5 `aria-owns` trumps ownership by closest ancestor, giving the element with role of `listitem` the correct context role. @@ -104,7 +106,7 @@ Element contained within its required context role even though it is not a direc ### Failed -#### Failed example 1 +#### Failed Example 1 No context role. @@ -112,7 +114,7 @@ No context role.
      ``` -#### Failed example 2 +#### Failed Example 2 Wrong context role. @@ -122,7 +124,7 @@ Wrong context role.
      ``` -#### Failed example 3 +#### Failed Example 3 Element not contained within its required context role. @@ -131,7 +133,7 @@ Element not contained within its required context role.
      ``` -#### Failed example 4 +#### Failed Example 4 Element with role `listitem` has a closer ancestor, that is included in the accessibility tree, than the role `list` that should have been its context role. @@ -146,7 +148,7 @@ Element with role `listitem` has a closer ancestor, that is included in the acce **Note:** This test case follows the definition of [owned by](#owned-by) used in this rule. If implemented differently, this definition could cause differences in outcome for this test case. -#### Failed example 5 +#### Failed Example 5 Element with role `listitem` has a closer ancestor, that is included in the accessibility tree, than the role `list` that should have been its context role. @@ -158,7 +160,7 @@ Element with role `listitem` has a closer ancestor, that is included in the acce
      ``` -#### Failed example 6 +#### Failed Example 6 The element with the semantic role of `listitem` is [owned by](#owned-by) the first element that references it element through `aria-owns`, which results in the wrong context role. @@ -174,7 +176,7 @@ The element with the semantic role of `listitem` is [owned by](#owned-by) the fi ### Inapplicable -#### Inapplicable example 1 +#### Inapplicable Example 1 Element does not have an explicit semantic role. @@ -190,7 +192,7 @@ Element is not exposed to assistive technologies. ``` -#### Inapplicable example 3 +#### Inapplicable Example 3 Role does not have any required context roles listed in WAI-ARIA spec. @@ -198,7 +200,7 @@ Role does not have any required context roles listed in WAI-ARIA spec.
      ``` -#### Inapplicable example 4 +#### Inapplicable Example 4 Element is not exposed to assistive technologies, since decendant has `aria-hidden` attribute with value set to `true`. @@ -207,7 +209,7 @@ Element is not exposed to assistive technologies, since decendant has `aria-hidd
      ``` -#### Inapplicable example 5 +#### Inapplicable Example 5 Element has an explicit semantic role, but it is identical to the implicit semantic role, making the element inapplicable. From 33d0f441627d8297aac6e9495a8c38e1403648cc Mon Sep 17 00:00:00 2001 From: Anne Thyme Date: Wed, 12 Jun 2019 14:28:47 +0200 Subject: [PATCH 40/64] Now tree-crossing ownership for implicit ownership --- pages/glossary/owner-element.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pages/glossary/owner-element.md b/pages/glossary/owner-element.md index 544a58b0cea..b6adc9f036f 100644 --- a/pages/glossary/owner-element.md +++ b/pages/glossary/owner-element.md @@ -3,10 +3,10 @@ title: Owned by key: owned-by --- -An element A is owned by element B if both elements exist within the same [document tree](https://www.w3.org/TR/dom41/#document-trees) or [shadow tree](https://www.w3.org/TR/dom41/#shadow-trees) and either: +An element A is owned by element B if: -1. Element A is the first element within the tree, in [tree order](https://www.w3.org/TR/dom/#concept-tree-order), whose ID is included within the `aria-owns` attribute of element B. -2. Element B is the closest [ancestor](https://www.w3.org/TR/dom/#concept-tree-ancestor) of element A that is [included in the accessibility tree](#included-in-the-accessibility-tree). +1. Both elements exist within the same [document tree](https://www.w3.org/TR/dom41/#document-trees) or [shadow tree](https://www.w3.org/TR/dom41/#shadow-trees), and element A is the first element within the tree, in [tree order](https://www.w3.org/TR/dom/#concept-tree-order), whose ID is included within the `aria-owns` attribute of element B, or +2. Element B is the closest [shadow including ancestor](https://www.w3.org/TR/dom41/#concept-shadow-including-ancestor) of element A that is [included in the accessibility tree](#included-in-the-accessibility-tree). Nodes that are not included in the accessibility tree cannot be owned by other elements. From e9f8a8a04f666509e659a0fba01e1db6271afbed Mon Sep 17 00:00:00 2001 From: Anne Thyme Date: Wed, 12 Jun 2019 14:35:06 +0200 Subject: [PATCH 41/64] Added test cases crossing shadow boundaries --- _rules/SC1-3-1-aria-required-context-role.md | 41 ++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/_rules/SC1-3-1-aria-required-context-role.md b/_rules/SC1-3-1-aria-required-context-role.md index 323c833ec4a..5290ed9c75d 100644 --- a/_rules/SC1-3-1-aria-required-context-role.md +++ b/_rules/SC1-3-1-aria-required-context-role.md @@ -104,6 +104,26 @@ Element contained within its required context role even though it is not a direc ``` +#### Passed Example 6 + +Implicit ownership that crosses shadow boundary. + +```html +
      +
      List item 1
      +
      + + +``` + ### Failed #### Failed Example 1 @@ -174,6 +194,27 @@ The element with the semantic role of `listitem` is [owned by](#owned-by) the fi **Note:** This test case follows the definition of [owned by](#owned-by) used in this rule. If implemented differently, this definition could cause differences in outcome for this test case. +#### Failed Example 7 + +Explicit ownership that crosses shadow boundary. + +```html +
      +
      List item 1
      +
      + +
      + + +``` + ### Inapplicable #### Inapplicable Example 1 From 1a6d693eb22fa1851011ec74beea76531d286fa0 Mon Sep 17 00:00:00 2001 From: Anne Thyme Date: Thu, 13 Jun 2019 14:40:24 +0200 Subject: [PATCH 42/64] Extended description for shadow DOM test cases --- _rules/SC1-3-1-aria-required-context-role.md | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/_rules/SC1-3-1-aria-required-context-role.md b/_rules/SC1-3-1-aria-required-context-role.md index 5290ed9c75d..296c05dcb4c 100644 --- a/_rules/SC1-3-1-aria-required-context-role.md +++ b/_rules/SC1-3-1-aria-required-context-role.md @@ -106,11 +106,10 @@ Element contained within its required context role even though it is not a direc #### Passed Example 6 -Implicit ownership that crosses shadow boundary. +Since implicit ownership can cross shadow boundaries, the element with the semantic role of `listitem` is contained within its required context role `list`. ```html
      -
      List item 1
      ``` @@ -196,11 +195,10 @@ The element with the semantic role of `listitem` is [owned by](#owned-by) the fi #### Failed Example 7 -Explicit ownership that crosses shadow boundary. +Since explicit ownership cannot cross shadow boundaries, the element with the semantic role of `listitem` does not have a context role. ```html
      -
      List item 1
      @@ -210,7 +208,7 @@ Explicit ownership that crosses shadow boundary. const root = host.attachShadow({ mode: "open" }); root.innerHTML = ` -
      List item 2
      +
      List item 1
      `; ``` From 9a6da41d9fc7a0eb1b5866e671f8d697d8c8dccb Mon Sep 17 00:00:00 2001 From: Brynanders <37368581+Brynanders@users.noreply.github.com> Date: Wed, 3 Jul 2019 09:12:06 +0100 Subject: [PATCH 43/64] Update SC1-3-1-aria-required-context-role.md --- _rules/SC1-3-1-aria-required-context-role.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_rules/SC1-3-1-aria-required-context-role.md b/_rules/SC1-3-1-aria-required-context-role.md index 296c05dcb4c..353b93e27ba 100644 --- a/_rules/SC1-3-1-aria-required-context-role.md +++ b/_rules/SC1-3-1-aria-required-context-role.md @@ -181,7 +181,7 @@ Element with role `listitem` has a closer ancestor, that is included in the acce #### Failed Example 6 -The element with the semantic role of `listitem` is [owned by](#owned-by) the first element that references it element through `aria-owns`, which results in the wrong context role. +The element with the semantic role of `listitem` is [owned by](#owned-by) the first element that references it through `aria-owns`, which results in the wrong context role. ```html
      From 376ce5f06fdb78925386634c9f0c8ae000b07569 Mon Sep 17 00:00:00 2001 From: Anne Thyme Date: Wed, 10 Jul 2019 10:06:27 +0200 Subject: [PATCH 44/64] Editorials --- _rules/SC1-3-1-aria-required-context-role.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/_rules/SC1-3-1-aria-required-context-role.md b/_rules/SC1-3-1-aria-required-context-role.md index 353b93e27ba..254615211b6 100644 --- a/_rules/SC1-3-1-aria-required-context-role.md +++ b/_rules/SC1-3-1-aria-required-context-role.md @@ -21,7 +21,7 @@ authors: The rule applies to any HTML or SVG element that is [included in the accessibility tree](#included-in-the-accessibility-tree) and has an explicit [semantic role](#semantic-role) with a [WAI-ARIA required context role](https://www.w3.org/TR/wai-aria-1.1/#scope), except if the element has an implicit semantic role that is identical to its explicit semantic role. -**Note:** An example of an element that has an implicit semantic role that is identical to its explicit semantic role is an `
    • `element that has `role="listitem"`. Elements like these are not applicable to this rule. +**Note:** An example of an element that has an implicit semantic role that is identical to its explicit semantic role is an `
    • ` element that has `role="listitem"`. This rule is not applicable to elements like this. ## Expectation @@ -37,7 +37,7 @@ This rule assumes that the explicit [semantic role](#semantic-role) on the targe - This rule relies on assistive technologies to recognize which elements are [owned by](#owned-by) each other. This includes when the element is owned by another element that is an ancestor, but not a parent of the target element. Some assistive technologies do not accept these owned by relationships, unless workarounds are used. Furthermore, `aria-owns` has limited support in some user agents. -- Some user agents and assistive technologies ignore empty elements, which means they are not presented to all users. However, since this is handled inconsitently across user agents and assistive technologies, empty elements are applicable to this rule. +- Some user agents and assistive technologies ignore empty elements, which means they are not presented to all users. However, since this is handled inconsitently across user agents and assistive technologies, this rule is applicable to empty elements. ## Background @@ -241,7 +241,7 @@ Role does not have any required context roles listed in WAI-ARIA spec. #### Inapplicable Example 4 -Element is not exposed to assistive technologies, since decendant has `aria-hidden` attribute with value set to `true`. +Element is not exposed to assistive technologies, since descendant has `aria-hidden` attribute with value set to `true`. ```html
    • ` element that has `role="listitem"`. This rule is not applicable to elements like this. +**Note:** An exampple of an element that has a [WAI-ARIA required context role](https://www.w3.org/TR/wai-aria-1.1/#scope) is `tab` that has `tablist` as a [required context role](https://www.w3.org/TR/wai-aria-1.1/#scope). + +**Note:** An example of an element that has an [implicit semantic role](#implicit-role) that is identical to its [explicit semantic role](#explicit-role) is an `
    • ` element that has `role="listitem"`. This rule is not applicable to elements like this. ## Expectation From 78169f89d99b6bbce7131e4955b006c89080d7e8 Mon Sep 17 00:00:00 2001 From: Anne Thyme Date: Fri, 26 Jul 2019 15:21:00 +0200 Subject: [PATCH 50/64] Remove `slot` element from Passed Example 6 --- _rules/aria-required-context-role-ff89c9.md | 1 - 1 file changed, 1 deletion(-) diff --git a/_rules/aria-required-context-role-ff89c9.md b/_rules/aria-required-context-role-ff89c9.md index f04dcee407a..5415f8ef966 100644 --- a/_rules/aria-required-context-role-ff89c9.md +++ b/_rules/aria-required-context-role-ff89c9.md @@ -120,7 +120,6 @@ Since implicit ownership can cross shadow boundaries, the element with the seman const root = host.attachShadow({ mode: "open" }); root.innerHTML = ` -
      List item 1
      `; From ee977ac68c8514f72921514a05c47d8cf4a85bb2 Mon Sep 17 00:00:00 2001 From: Anne Thyme Date: Fri, 26 Jul 2019 15:30:42 +0200 Subject: [PATCH 51/64] Add content to elements + Add new test case To make it easier for testers to inspect the test cases, content has been added to applicable elements. A test case "Passed Example 7" has been added with an empty element, to ensure that empty elements are also considered applicable by the implementations. --- _rules/aria-required-context-role-ff89c9.md | 41 +++++++++++++-------- 1 file changed, 25 insertions(+), 16 deletions(-) diff --git a/_rules/aria-required-context-role-ff89c9.md b/_rules/aria-required-context-role-ff89c9.md index 5415f8ef966..93a96c683bd 100644 --- a/_rules/aria-required-context-role-ff89c9.md +++ b/_rules/aria-required-context-role-ff89c9.md @@ -56,7 +56,7 @@ Element with role `listitem` is contained within its required context role `list ```html
      -
      +
      List item 1
      ``` @@ -66,7 +66,7 @@ Element with role `listitem` is contained within its required context role `list ```html
        -
        +
        List item 1
      ``` @@ -79,7 +79,7 @@ Element contained within its required context role even though it is not a direc
      -
      +
      List item 1
      @@ -92,7 +92,7 @@ Element contained within its required context role even though it is not a direc ```html
      -
      +
      List item 1
      ``` #### Passed Example 5 @@ -102,7 +102,7 @@ Element contained within its required context role even though it is not a direc ```html
      -
      +
      List item 1
      ``` @@ -124,6 +124,15 @@ Since implicit ownership can cross shadow boundaries, the element with the seman `; ``` +#### Passed Example 7 + +Element with role `listitem` is contained within its required context role `list`, expressed as an explicit role. Even though the element with role `listitem` is empty, it is still applicable to this rule. + +```html +
      +
      +
      +``` ### Failed @@ -132,7 +141,7 @@ Since implicit ownership can cross shadow boundaries, the element with the seman No context role. ```html -
      +
      List item 1
      ``` #### Failed Example 2 @@ -141,7 +150,7 @@ Wrong context role. ```html
      -
      +
      List item 1
      ``` @@ -151,7 +160,7 @@ Element not contained within its required context role. ```html
      -
      +
      List item 1
      ``` #### Failed Example 4 @@ -161,7 +170,7 @@ Element with role `listitem` has a closer ancestor, that is included in the acce ```html
      -
      +
      List item 1
      ``` @@ -176,7 +185,7 @@ Element with role `listitem` has a closer ancestor, that is included in the acce ```html
      -
      +
      List item 1
      ``` @@ -188,7 +197,7 @@ The element with the semantic role of `listitem` is [owned by](#owned-by) the fi ```html
      -
      +
      List item 1
      ``` @@ -222,7 +231,7 @@ Since explicit ownership cannot cross shadow boundaries, the element with the se Element does not have an explicit semantic role. ```html -
        +
          List item 1
        ``` #### Inapplicable example 2 @@ -230,7 +239,7 @@ Element does not have an explicit semantic role. Element is not exposed to assistive technologies. ```html - + ``` #### Inapplicable Example 3 @@ -238,7 +247,7 @@ Element is not exposed to assistive technologies. Role does not have any required context roles listed in WAI-ARIA spec. ```html -
        +
        Radio button 1
        ``` #### Inapplicable Example 4 @@ -247,7 +256,7 @@ Element is not exposed to assistive technologies, since ancestor has `aria-hidde ```html ``` #### Inapplicable Example 5 @@ -255,5 +264,5 @@ Element is not exposed to assistive technologies, since ancestor has `aria-hidde Element has an explicit semantic role, but it is identical to the implicit semantic role, making the element inapplicable. ```html -
      • +
      • List item 1
      • ``` From c41dfe316a8855d14cdc071cf81bf00c8105f5a6 Mon Sep 17 00:00:00 2001 From: Anne Thyme Date: Mon, 5 Aug 2019 13:50:29 +0200 Subject: [PATCH 52/64] More links to "explicit-role" def. + fix typo --- _rules/aria-required-context-role-ff89c9.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/_rules/aria-required-context-role-ff89c9.md b/_rules/aria-required-context-role-ff89c9.md index 93a96c683bd..7dea898b8ab 100644 --- a/_rules/aria-required-context-role-ff89c9.md +++ b/_rules/aria-required-context-role-ff89c9.md @@ -19,9 +19,9 @@ authors: ## Applicability -The rule applies to any HTML or SVG element that is [included in the accessibility tree](#included-in-the-accessibility-tree) and has an explicit [semantic role](#semantic-role) with a [WAI-ARIA required context role](https://www.w3.org/TR/wai-aria-1.1/#scope), except if the element has an [implicit semantic role](#implicit-role) that is identical to its [explicit semantic role](#explicit-role). +The rule applies to any HTML or SVG element that is [included in the accessibility tree](#included-in-the-accessibility-tree) and has an [explicit semantic role](#explicit-role) with a [WAI-ARIA required context role](https://www.w3.org/TR/wai-aria-1.1/#scope), except if the element has an [implicit semantic role](#implicit-role) that is identical to its [explicit semantic role](#explicit-role). -**Note:** An exampple of an element that has a [WAI-ARIA required context role](https://www.w3.org/TR/wai-aria-1.1/#scope) is `tab` that has `tablist` as a [required context role](https://www.w3.org/TR/wai-aria-1.1/#scope). +**Note:** An example of an element that has a [WAI-ARIA required context role](https://www.w3.org/TR/wai-aria-1.1/#scope) is `tab` that has `tablist` as a [required context role](https://www.w3.org/TR/wai-aria-1.1/#scope). **Note:** An example of an element that has an [implicit semantic role](#implicit-role) that is identical to its [explicit semantic role](#explicit-role) is an `
      • ` element that has `role="listitem"`. This rule is not applicable to elements like this. @@ -33,7 +33,7 @@ The target element is [owned by](#owned-by) an element that has a [semantic role ## Assumptions -This rule assumes that the explicit [semantic role](#semantic-role) on the target element is used with the intention to comply to WCAG. If the explicit semantic role on the target element is incorrectly used, and any relationships between elements are already programmatically determinable, failing this rule might not result in accessibility issues for users of assistive technologies, and it should then not be considered a failure under WCAG success criterion 1.3.1 Info and Relationships. +This rule assumes that the [explicit semantic role](#explicit-role) on the target element is used with the intention to comply to WCAG. If the [explicit semantic role](#explicit-role) on the target element is incorrectly used, and any relationships between elements are already programmatically determinable, failing this rule might not result in accessibility issues for users of assistive technologies, and it should then not be considered a failure under WCAG success criterion 1.3.1 Info and Relationships. ## Accessibility Support From 8f62229d9040ca2dc4fc550041328136c0647bc3 Mon Sep 17 00:00:00 2001 From: Anne Thyme Date: Tue, 6 Aug 2019 10:56:19 +0200 Subject: [PATCH 53/64] Expectation: Note on superclass/subclass roles --- _rules/aria-required-context-role-ff89c9.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/_rules/aria-required-context-role-ff89c9.md b/_rules/aria-required-context-role-ff89c9.md index 7dea898b8ab..9a91ad1ec22 100644 --- a/_rules/aria-required-context-role-ff89c9.md +++ b/_rules/aria-required-context-role-ff89c9.md @@ -31,6 +31,8 @@ The target element is [owned by](#owned-by) an element that has a [semantic role **Note:** The definition of [owned by](#owned-by) used in this rule is diverging from the definition of ["owned element" in WAI-ARIA](https://www.w3.org/TR/wai-aria-1.1/#dfn-owned-element). See more in the [owned by](#owned-by) definition. +**Note:** Both [superclass roles](https://www.w3.org/TR/wai-aria-1.1/#superclassrole) and [subclass roles](https://www.w3.org/TR/wai-aria-1.1/#subclassroles) will be listed as possible [WAI-ARIA required context roles](https://www.w3.org/TR/wai-aria-1.1/#scope) for a role, e.g. the [`row` (role)](https://www.w3.org/TR/wai-aria-1.1/#row) lists both [`grid` (role)](https://www.w3.org/TR/wai-aria-1.1/#grid) and [`table` (role)](https://www.w3.org/TR/wai-aria-1.1/#table) as [required context roles](https://www.w3.org/TR/wai-aria-1.1/#scope), even though `grid` is a subclass of the `table` role. + ## Assumptions This rule assumes that the [explicit semantic role](#explicit-role) on the target element is used with the intention to comply to WCAG. If the [explicit semantic role](#explicit-role) on the target element is incorrectly used, and any relationships between elements are already programmatically determinable, failing this rule might not result in accessibility issues for users of assistive technologies, and it should then not be considered a failure under WCAG success criterion 1.3.1 Info and Relationships. From 32b92de285da981d93cdb87da2f4b54dcad56485 Mon Sep 17 00:00:00 2001 From: Anne Thyme Date: Tue, 13 Aug 2019 11:32:37 +0200 Subject: [PATCH 54/64] Edit subclass inclusion in required context roles Per discussion on https://github.com/act-rules/act-rules.github.io/pull/255#discussion_r304862411 --- _rules/aria-required-context-role-ff89c9.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/_rules/aria-required-context-role-ff89c9.md b/_rules/aria-required-context-role-ff89c9.md index 9a91ad1ec22..ee178325612 100644 --- a/_rules/aria-required-context-role-ff89c9.md +++ b/_rules/aria-required-context-role-ff89c9.md @@ -19,7 +19,7 @@ authors: ## Applicability -The rule applies to any HTML or SVG element that is [included in the accessibility tree](#included-in-the-accessibility-tree) and has an [explicit semantic role](#explicit-role) with a [WAI-ARIA required context role](https://www.w3.org/TR/wai-aria-1.1/#scope), except if the element has an [implicit semantic role](#implicit-role) that is identical to its [explicit semantic role](#explicit-role). +The rule applies to any HTML or SVG element that is [included in the accessibility tree](#included-in-the-accessibility-tree) and has a [WAI-ARIA 1.1](https://www.w3.org/TR/wai-aria-1.1/) [explicit semantic role](#explicit-role) with a [WAI-ARIA required context role](https://www.w3.org/TR/wai-aria-1.1/#scope), except if the element has an [implicit semantic role](#implicit-role) that is identical to its [explicit semantic role](#explicit-role). **Note:** An example of an element that has a [WAI-ARIA required context role](https://www.w3.org/TR/wai-aria-1.1/#scope) is `tab` that has `tablist` as a [required context role](https://www.w3.org/TR/wai-aria-1.1/#scope). @@ -31,7 +31,11 @@ The target element is [owned by](#owned-by) an element that has a [semantic role **Note:** The definition of [owned by](#owned-by) used in this rule is diverging from the definition of ["owned element" in WAI-ARIA](https://www.w3.org/TR/wai-aria-1.1/#dfn-owned-element). See more in the [owned by](#owned-by) definition. -**Note:** Both [superclass roles](https://www.w3.org/TR/wai-aria-1.1/#superclassrole) and [subclass roles](https://www.w3.org/TR/wai-aria-1.1/#subclassroles) will be listed as possible [WAI-ARIA required context roles](https://www.w3.org/TR/wai-aria-1.1/#scope) for a role, e.g. the [`row` (role)](https://www.w3.org/TR/wai-aria-1.1/#row) lists both [`grid` (role)](https://www.w3.org/TR/wai-aria-1.1/#grid) and [`table` (role)](https://www.w3.org/TR/wai-aria-1.1/#table) as [required context roles](https://www.w3.org/TR/wai-aria-1.1/#scope), even though `grid` is a subclass of the `table` role. +**Note:** [Subclass roles](https://www.w3.org/TR/wai-aria-1.1/#subclassroles) of [WAI-ARIA required context roles](https://www.w3.org/TR/wai-aria-1.1/#scope) are not automatically included as possible [required context roles](https://www.w3.org/TR/wai-aria-1.1/#scope). E.g. [`feed` (role)](https://www.w3.org/TR/wai-aria-1.1/#feed) is not a possible [required context role](https://www.w3.org/TR/wai-aria-1.1/#scope) for [`listitem` (role)](https://www.w3.org/TR/wai-aria-1.1/#listitem), even though [`feed` (role)](https://www.w3.org/TR/wai-aria-1.1/#feed) is a [subclass role](https://www.w3.org/TR/wai-aria-1.1/#subclassroles) of [`list` (role)](https://www.w3.org/TR/wai-aria-1.1/#list), and [`list` (role)](https://www.w3.org/TR/wai-aria-1.1/#list) is one of the [required context roles](https://www.w3.org/TR/wai-aria-1.1/#scope) for [`listitem` (role)](https://www.w3.org/TR/wai-aria-1.1/#listitem). +If a [subclass role](https://www.w3.org/TR/wai-aria-1.1/#subclassroles) is a possible [required context role](https://www.w3.org/TR/wai-aria-1.1/#scope), the [subclass role](https://www.w3.org/TR/wai-aria-1.1/#subclassroles) will be listed as a [required context role](https://www.w3.org/TR/wai-aria-1.1/#scope) as well as the [superclass role](https://www.w3.org/TR/wai-aria-1.1/#superclassrole), e.g. the [`row` (role)](https://www.w3.org/TR/wai-aria-1.1/#row) lists both [`grid` (role)](https://www.w3.org/TR/wai-aria-1.1/#grid) and [`table` (role)](https://www.w3.org/TR/wai-aria-1.1/#table) as [required context roles](https://www.w3.org/TR/wai-aria-1.1/#scope), even though [`grid` (role)](https://www.w3.org/TR/wai-aria-1.1/#grid) is a subclass of the [`table` (role)](https://www.w3.org/TR/wai-aria-1.1/#table). + +**Note:** For [`listitem` (role)](https://www.w3.org/TR/wai-aria-1.1/#listitem) the [`directory` (role)](https://www.w3.org/TR/wai-aria-1.1/#directory) seems to be missing as a [required context role](https://www.w3.org/TR/wai-aria-1.1/#scope) in the [WAI-ARIA 1.1 Recommendation](https://www.w3.org/TR/wai-aria-1.1). [An issue for this has been filed](https://github.com/w3c/aria/issues/1030) with the Accessible Rich Internet Applications Working Group. + ## Assumptions From 07ba91a687efd99668fb8f4e2ba684447959609c Mon Sep 17 00:00:00 2001 From: Anne Thyme Date: Tue, 13 Aug 2019 11:44:23 +0200 Subject: [PATCH 55/64] Add note about descoping DPUB from applicability --- _rules/aria-required-context-role-ff89c9.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/_rules/aria-required-context-role-ff89c9.md b/_rules/aria-required-context-role-ff89c9.md index ee178325612..baf57cf045e 100644 --- a/_rules/aria-required-context-role-ff89c9.md +++ b/_rules/aria-required-context-role-ff89c9.md @@ -25,14 +25,16 @@ The rule applies to any HTML or SVG element that is [included in the accessibili **Note:** An example of an element that has an [implicit semantic role](#implicit-role) that is identical to its [explicit semantic role](#explicit-role) is an `
      • ` element that has `role="listitem"`. This rule is not applicable to elements like this. +**Note:** The applicability of this rule is limited to only the [WAI-ARIA 1.1 Recommendation](https://www.w3.org/TR/wai-aria-1.1/), since inheritance of [required context roles](https://www.w3.org/TR/wai-aria-1.1/#scope) to [subclass roles](https://www.w3.org/TR/wai-aria-1.1/#subclassroles) seems to work differently within the [Digital Publishing WAI-ARIA Module 1.0](https://www.w3.org/TR/dpub-aria-1.0/) extension than within the [WAI-ARIA 1.1 Recommendation](https://www.w3.org/TR/wai-aria-1.1/) itself. The [WAI-ARIA Graphics Module](https://www.w3.org/TR/graphics-aria-1.0/) does not include any [required context roles](https://www.w3.org/TR/wai-aria-1.1/#scope). + ## Expectation The target element is [owned by](#owned-by) an element that has a [semantic role](#semantic-role) that is one of the [WAI-ARIA required context roles](https://www.w3.org/TR/wai-aria-1.1/#scope) of the target element. **Note:** The definition of [owned by](#owned-by) used in this rule is diverging from the definition of ["owned element" in WAI-ARIA](https://www.w3.org/TR/wai-aria-1.1/#dfn-owned-element). See more in the [owned by](#owned-by) definition. -**Note:** [Subclass roles](https://www.w3.org/TR/wai-aria-1.1/#subclassroles) of [WAI-ARIA required context roles](https://www.w3.org/TR/wai-aria-1.1/#scope) are not automatically included as possible [required context roles](https://www.w3.org/TR/wai-aria-1.1/#scope). E.g. [`feed` (role)](https://www.w3.org/TR/wai-aria-1.1/#feed) is not a possible [required context role](https://www.w3.org/TR/wai-aria-1.1/#scope) for [`listitem` (role)](https://www.w3.org/TR/wai-aria-1.1/#listitem), even though [`feed` (role)](https://www.w3.org/TR/wai-aria-1.1/#feed) is a [subclass role](https://www.w3.org/TR/wai-aria-1.1/#subclassroles) of [`list` (role)](https://www.w3.org/TR/wai-aria-1.1/#list), and [`list` (role)](https://www.w3.org/TR/wai-aria-1.1/#list) is one of the [required context roles](https://www.w3.org/TR/wai-aria-1.1/#scope) for [`listitem` (role)](https://www.w3.org/TR/wai-aria-1.1/#listitem). -If a [subclass role](https://www.w3.org/TR/wai-aria-1.1/#subclassroles) is a possible [required context role](https://www.w3.org/TR/wai-aria-1.1/#scope), the [subclass role](https://www.w3.org/TR/wai-aria-1.1/#subclassroles) will be listed as a [required context role](https://www.w3.org/TR/wai-aria-1.1/#scope) as well as the [superclass role](https://www.w3.org/TR/wai-aria-1.1/#superclassrole), e.g. the [`row` (role)](https://www.w3.org/TR/wai-aria-1.1/#row) lists both [`grid` (role)](https://www.w3.org/TR/wai-aria-1.1/#grid) and [`table` (role)](https://www.w3.org/TR/wai-aria-1.1/#table) as [required context roles](https://www.w3.org/TR/wai-aria-1.1/#scope), even though [`grid` (role)](https://www.w3.org/TR/wai-aria-1.1/#grid) is a subclass of the [`table` (role)](https://www.w3.org/TR/wai-aria-1.1/#table). +**Note:** [Subclass roles](https://www.w3.org/TR/wai-aria-1.1/#subclassroles) of [WAI-ARIA required context roles](https://www.w3.org/TR/wai-aria-1.1/#scope) are not automatically included as possible [required context roles](https://www.w3.org/TR/wai-aria-1.1/#scope). E.g. the [`feed`](https://www.w3.org/TR/wai-aria-1.1/#feed) role is not a possible [required context role](https://www.w3.org/TR/wai-aria-1.1/#scope) for [`listitem`](https://www.w3.org/TR/wai-aria-1.1/#listitem), even though [`feed`](https://www.w3.org/TR/wai-aria-1.1/#feed) is a [subclass role](https://www.w3.org/TR/wai-aria-1.1/#subclassroles) of the [`list`](https://www.w3.org/TR/wai-aria-1.1/#list) role, and [`list`](https://www.w3.org/TR/wai-aria-1.1/#list) is one of the [required context roles](https://www.w3.org/TR/wai-aria-1.1/#scope) for [`listitem`](https://www.w3.org/TR/wai-aria-1.1/#listitem). +If a [subclass role](https://www.w3.org/TR/wai-aria-1.1/#subclassroles) is a possible [required context role](https://www.w3.org/TR/wai-aria-1.1/#scope), the [subclass role](https://www.w3.org/TR/wai-aria-1.1/#subclassroles) will be listed as a [required context role](https://www.w3.org/TR/wai-aria-1.1/#scope) as well as the [superclass role](https://www.w3.org/TR/wai-aria-1.1/#superclassrole), e.g. the [`row`](https://www.w3.org/TR/wai-aria-1.1/#row) role lists both [`grid`](https://www.w3.org/TR/wai-aria-1.1/#grid) and [`table`](https://www.w3.org/TR/wai-aria-1.1/#table) as [required context roles](https://www.w3.org/TR/wai-aria-1.1/#scope), even though [`grid`](https://www.w3.org/TR/wai-aria-1.1/#grid) is a subclass of the [`table`](https://www.w3.org/TR/wai-aria-1.1/#table) role. **Note:** For [`listitem` (role)](https://www.w3.org/TR/wai-aria-1.1/#listitem) the [`directory` (role)](https://www.w3.org/TR/wai-aria-1.1/#directory) seems to be missing as a [required context role](https://www.w3.org/TR/wai-aria-1.1/#scope) in the [WAI-ARIA 1.1 Recommendation](https://www.w3.org/TR/wai-aria-1.1). [An issue for this has been filed](https://github.com/w3c/aria/issues/1030) with the Accessible Rich Internet Applications Working Group. From 191b5cc77062c13abd858241baf66547358b44f9 Mon Sep 17 00:00:00 2001 From: Anne Thyme Date: Wed, 14 Aug 2019 09:34:23 +0200 Subject: [PATCH 56/64] Adding inapplicable DPUB test case --- _rules/aria-required-context-role-ff89c9.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/_rules/aria-required-context-role-ff89c9.md b/_rules/aria-required-context-role-ff89c9.md index baf57cf045e..128807d5437 100644 --- a/_rules/aria-required-context-role-ff89c9.md +++ b/_rules/aria-required-context-role-ff89c9.md @@ -274,3 +274,11 @@ Element has an explicit semantic role, but it is identical to the implicit seman ```html
      • List item 1
      • ``` + +#### Inapplicable Example 6 + +Element has a role from the [Digital Publishing WAI-ARIA Module 1.0](https://www.w3.org/TR/dpub-aria-1.0/), not the [WAI-ARIA 1.1 Recommendation](https://www.w3.org/TR/wai-aria-1.1/), and it is therefore inapplicable. + +```html +
        Item 1
        +``` From 8262e3afd60a211697627222ac2b0a486b1fd05d Mon Sep 17 00:00:00 2001 From: Anne Thyme Date: Fri, 16 Aug 2019 10:14:51 +0200 Subject: [PATCH 57/64] Rename owner-element.md to owned-by.md --- pages/glossary/{owner-element.md => owned-by.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename pages/glossary/{owner-element.md => owned-by.md} (100%) diff --git a/pages/glossary/owner-element.md b/pages/glossary/owned-by.md similarity index 100% rename from pages/glossary/owner-element.md rename to pages/glossary/owned-by.md From 4efedbad4b3b0c7c0040e3438388694ba5ab6871 Mon Sep 17 00:00:00 2001 From: Anne Thyme Date: Fri, 16 Aug 2019 10:46:52 +0200 Subject: [PATCH 58/64] Remove note + inclusion i acc. tree for point 1 --- pages/glossary/owned-by.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pages/glossary/owned-by.md b/pages/glossary/owned-by.md index b6adc9f036f..c017ec323c1 100644 --- a/pages/glossary/owned-by.md +++ b/pages/glossary/owned-by.md @@ -3,13 +3,11 @@ title: Owned by key: owned-by --- -An element A is owned by element B if: +An element A is owned by element B if element B is [included in the accessibility tree](#included-in-the-accessibility-tree) and: 1. Both elements exist within the same [document tree](https://www.w3.org/TR/dom41/#document-trees) or [shadow tree](https://www.w3.org/TR/dom41/#shadow-trees), and element A is the first element within the tree, in [tree order](https://www.w3.org/TR/dom/#concept-tree-order), whose ID is included within the `aria-owns` attribute of element B, or -2. Element B is the closest [shadow including ancestor](https://www.w3.org/TR/dom41/#concept-shadow-including-ancestor) of element A that is [included in the accessibility tree](#included-in-the-accessibility-tree). +2. Element B is the closest [shadow including ancestor](https://www.w3.org/TR/dom41/#concept-shadow-including-ancestor) of element A. Nodes that are not included in the accessibility tree cannot be owned by other elements. -> **Note:** When using `aria-owns`, hiding the owner element through WAI-ARIA (`aria-hidden="true"`) or CSS (`display:none` or `visibility:hidden`) will not change the ownership, but should instead hide all elements owned by the element. - > **Note:** This definition is diverging from the definition of ["owned element" in WAI-ARIA](https://www.w3.org/TR/wai-aria-1.1/#dfn-owned-element). The reason is that the WAI-ARIA definition was found to provide too little guidance on how to handle specific edge cases where several elements compete about the ownership, and it seem that browser implementations of this are diverging a lot. This definition seeks to find a reasonable middle ground, but will have to be updated if the WAI-ARIA definition changes. From 1af2679f63d96c951481b690a917fdcc8e374924 Mon Sep 17 00:00:00 2001 From: Anne Thyme Date: Fri, 16 Aug 2019 11:35:16 +0200 Subject: [PATCH 59/64] Editorials + change test cases Per Wilco's review --- _rules/aria-required-context-role-ff89c9.md | 83 +++++++++++---------- 1 file changed, 45 insertions(+), 38 deletions(-) diff --git a/_rules/aria-required-context-role-ff89c9.md b/_rules/aria-required-context-role-ff89c9.md index 128807d5437..1b6a143d0a1 100644 --- a/_rules/aria-required-context-role-ff89c9.md +++ b/_rules/aria-required-context-role-ff89c9.md @@ -3,7 +3,7 @@ id: ff89c9 name: ARIA required context role rule_type: atomic description: | - This rule checks that a role exists inside its required context. + This rule checks that an element with an explicit role exists inside its required context. accessibility_requirements: wcag20:1.3.1: # Info and Relationships (A) forConformance: true @@ -19,34 +19,32 @@ authors: ## Applicability -The rule applies to any HTML or SVG element that is [included in the accessibility tree](#included-in-the-accessibility-tree) and has a [WAI-ARIA 1.1](https://www.w3.org/TR/wai-aria-1.1/) [explicit semantic role](#explicit-role) with a [WAI-ARIA required context role](https://www.w3.org/TR/wai-aria-1.1/#scope), except if the element has an [implicit semantic role](#implicit-role) that is identical to its [explicit semantic role](#explicit-role). +The rule applies to any HTML or SVG element that is [included in the accessibility tree](#included-in-the-accessibility-tree) and has a [WAI-ARIA 1.1](https://www.w3.org/TR/wai-aria-1.1/) [explicit role](#explicit-role) with a [WAI-ARIA required context role](https://www.w3.org/TR/wai-aria-1.1/#scope), except if the element has an [implicit role](#implicit-role) that is identical to its [explicit role](#explicit-role). **Note:** An example of an element that has a [WAI-ARIA required context role](https://www.w3.org/TR/wai-aria-1.1/#scope) is `tab` that has `tablist` as a [required context role](https://www.w3.org/TR/wai-aria-1.1/#scope). -**Note:** An example of an element that has an [implicit semantic role](#implicit-role) that is identical to its [explicit semantic role](#explicit-role) is an `
      • ` element that has `role="listitem"`. This rule is not applicable to elements like this. +**Note:** An example of an element that has an [implicit role](#implicit-role) that is identical to its [explicit role](#explicit-role) is an `
      • ` element that has `role="listitem"`. This rule is not applicable to elements like this. -**Note:** The applicability of this rule is limited to only the [WAI-ARIA 1.1 Recommendation](https://www.w3.org/TR/wai-aria-1.1/), since inheritance of [required context roles](https://www.w3.org/TR/wai-aria-1.1/#scope) to [subclass roles](https://www.w3.org/TR/wai-aria-1.1/#subclassroles) seems to work differently within the [Digital Publishing WAI-ARIA Module 1.0](https://www.w3.org/TR/dpub-aria-1.0/) extension than within the [WAI-ARIA 1.1 Recommendation](https://www.w3.org/TR/wai-aria-1.1/) itself. The [WAI-ARIA Graphics Module](https://www.w3.org/TR/graphics-aria-1.0/) does not include any [required context roles](https://www.w3.org/TR/wai-aria-1.1/#scope). +**Note:** The applicability of this rule is limited to only the [WAI-ARIA 1.1 Recommendation](https://www.w3.org/TR/wai-aria-1.1/) roles, since there are unresolved issues with how [Digital Publishing WAI-ARIA Module (DPUB ARIA) 1.0](https://www.w3.org/TR/dpub-aria-1.0/) uses role inheritance to define the [required context roles](https://www.w3.org/TR/wai-aria-1.1/#scope), which makes it deviate from the model defined in [WAI-ARIA 1.1](https://www.w3.org/TR/wai-aria-1.1/). The [WAI-ARIA Graphics Module](https://www.w3.org/TR/graphics-aria-1.0/) does not include any [required context roles](https://www.w3.org/TR/wai-aria-1.1/#scope). ## Expectation The target element is [owned by](#owned-by) an element that has a [semantic role](#semantic-role) that is one of the [WAI-ARIA required context roles](https://www.w3.org/TR/wai-aria-1.1/#scope) of the target element. -**Note:** The definition of [owned by](#owned-by) used in this rule is diverging from the definition of ["owned element" in WAI-ARIA](https://www.w3.org/TR/wai-aria-1.1/#dfn-owned-element). See more in the [owned by](#owned-by) definition. +**Note:** The definition of [owned by](#owned-by) used in this rule is different than the definition of ["owned element" in WAI-ARIA](https://www.w3.org/TR/wai-aria-1.1/#dfn-owned-element). See more in the [owned by](#owned-by) definition. **Note:** [Subclass roles](https://www.w3.org/TR/wai-aria-1.1/#subclassroles) of [WAI-ARIA required context roles](https://www.w3.org/TR/wai-aria-1.1/#scope) are not automatically included as possible [required context roles](https://www.w3.org/TR/wai-aria-1.1/#scope). E.g. the [`feed`](https://www.w3.org/TR/wai-aria-1.1/#feed) role is not a possible [required context role](https://www.w3.org/TR/wai-aria-1.1/#scope) for [`listitem`](https://www.w3.org/TR/wai-aria-1.1/#listitem), even though [`feed`](https://www.w3.org/TR/wai-aria-1.1/#feed) is a [subclass role](https://www.w3.org/TR/wai-aria-1.1/#subclassroles) of the [`list`](https://www.w3.org/TR/wai-aria-1.1/#list) role, and [`list`](https://www.w3.org/TR/wai-aria-1.1/#list) is one of the [required context roles](https://www.w3.org/TR/wai-aria-1.1/#scope) for [`listitem`](https://www.w3.org/TR/wai-aria-1.1/#listitem). If a [subclass role](https://www.w3.org/TR/wai-aria-1.1/#subclassroles) is a possible [required context role](https://www.w3.org/TR/wai-aria-1.1/#scope), the [subclass role](https://www.w3.org/TR/wai-aria-1.1/#subclassroles) will be listed as a [required context role](https://www.w3.org/TR/wai-aria-1.1/#scope) as well as the [superclass role](https://www.w3.org/TR/wai-aria-1.1/#superclassrole), e.g. the [`row`](https://www.w3.org/TR/wai-aria-1.1/#row) role lists both [`grid`](https://www.w3.org/TR/wai-aria-1.1/#grid) and [`table`](https://www.w3.org/TR/wai-aria-1.1/#table) as [required context roles](https://www.w3.org/TR/wai-aria-1.1/#scope), even though [`grid`](https://www.w3.org/TR/wai-aria-1.1/#grid) is a subclass of the [`table`](https://www.w3.org/TR/wai-aria-1.1/#table) role. **Note:** For [`listitem` (role)](https://www.w3.org/TR/wai-aria-1.1/#listitem) the [`directory` (role)](https://www.w3.org/TR/wai-aria-1.1/#directory) seems to be missing as a [required context role](https://www.w3.org/TR/wai-aria-1.1/#scope) in the [WAI-ARIA 1.1 Recommendation](https://www.w3.org/TR/wai-aria-1.1). [An issue for this has been filed](https://github.com/w3c/aria/issues/1030) with the Accessible Rich Internet Applications Working Group. - ## Assumptions -This rule assumes that the [explicit semantic role](#explicit-role) on the target element is used with the intention to comply to WCAG. If the [explicit semantic role](#explicit-role) on the target element is incorrectly used, and any relationships between elements are already programmatically determinable, failing this rule might not result in accessibility issues for users of assistive technologies, and it should then not be considered a failure under WCAG success criterion 1.3.1 Info and Relationships. +If the [explicit role](#explicit-role) on the target element is incorrectly used, and any relationships between elements are already programmatically determinable, failing this rule might not result in accessibility issues for users of assistive technologies, and it should then not be considered a failure under WCAG success criterion 1.3.1 Info and Relationships. ## Accessibility Support -- This rule relies on assistive technologies to recognize which elements are [owned by](#owned-by) each other. This includes when the element is owned by another element that is an ancestor, but not a parent of the target element. Some assistive technologies do not accept these owned by relationships, unless workarounds are used. -Furthermore, `aria-owns` has limited support in some user agents. +- This rule relies on assistive technologies to consistently identify which element is [owned by](#owned-by) which other element. This includes when the element is [owned by](#owned-by) another element that is an ancestor, but not a parent of the target element. Some assistive technologies do not accept these [owned by](#owned-by) relationships, unless workarounds are used. Furthermore, `aria-owns` has limited support in some user agents. - Some user agents and assistive technologies ignore empty elements, which means they are not presented to all users. However, since this is handled inconsitently across user agents and assistive technologies, this rule is applicable to empty elements. ## Background @@ -60,7 +58,7 @@ Furthermore, `aria-owns` has limited support in some user agents. #### Passed Example 1 -Element with role `listitem` is contained within its required context role `list`, expressed as an explicit role. +Element with [explicit role](#explicit-role) `listitem` is contained within its [required context role](https://www.w3.org/TR/wai-aria-1.1/#scope) `list`, expressed as an [explicit role](#explicit-role). ```html
        @@ -70,7 +68,7 @@ Element with role `listitem` is contained within its required context role `list #### Passed Example 2 -Element with role `listitem` is contained within its required context role `list`, through the implicit role of `ul`. +Element with [explicit role](#explicit-role) `listitem` is contained within its [required context role](https://www.w3.org/TR/wai-aria-1.1/#scope) `list`, through the [implicit role](#implicit-role) of `ul`. ```html
          @@ -80,7 +78,7 @@ Element with role `listitem` is contained within its required context role `list #### Passed Example 3 -Element contained within its required context role even though it is not a direct child of the context role. +Element contained within its [required context role](https://www.w3.org/TR/wai-aria-1.1/#scope) even though it is not a direct child of the [context role](https://www.w3.org/TR/wai-aria-1.1/#scope). ```html
          @@ -96,7 +94,7 @@ Element contained within its required context role even though it is not a direc #### Passed Example 4 -`aria-owns` used to give the target element the right context role. +`aria-owns` used to give the target element the right [context role](https://www.w3.org/TR/wai-aria-1.1/#scope). ```html
          @@ -105,7 +103,7 @@ Element contained within its required context role even though it is not a direc #### Passed Example 5 -`aria-owns` trumps ownership by closest ancestor, giving the element with role of `listitem` the correct context role. +`aria-owns` trumps ownership by closest ancestor, giving the element with [explicit role](#explicit-role) of `listitem` the correct [context role](https://www.w3.org/TR/wai-aria-1.1/#scope). ```html
          @@ -117,7 +115,7 @@ Element contained within its required context role even though it is not a direc #### Passed Example 6 -Since implicit ownership can cross shadow boundaries, the element with the semantic role of `listitem` is contained within its required context role `list`. +Since implicit ownership can cross shadow boundaries, the element with the [explicit role](#explicit-role) of `listitem` is contained within its [required context role](https://www.w3.org/TR/wai-aria-1.1/#scope) `list`. ```html
          @@ -134,7 +132,7 @@ Since implicit ownership can cross shadow boundaries, the element with the seman ``` #### Passed Example 7 -Element with role `listitem` is contained within its required context role `list`, expressed as an explicit role. Even though the element with role `listitem` is empty, it is still applicable to this rule. +Element with [explicit role](#explicit-role) `listitem` is contained within its [required context role](https://www.w3.org/TR/wai-aria-1.1/#scope) `list`, expressed as an [explicit role](#explicit-role). Even though the element with role `listitem` is empty, it is still applicable to this rule. ```html
          @@ -146,7 +144,7 @@ Element with role `listitem` is contained within its required context role `list #### Failed Example 1 -No context role. +No [context role](https://www.w3.org/TR/wai-aria-1.1/#scope). ```html
          List item 1
          @@ -154,7 +152,7 @@ No context role. #### Failed Example 2 -Wrong context role. +Wrong [context role](https://www.w3.org/TR/wai-aria-1.1/#scope). ```html
          @@ -164,16 +162,16 @@ Wrong context role. #### Failed Example 3 -Element not contained within its required context role. +Element not contained within its [required context role](https://www.w3.org/TR/wai-aria-1.1/#scope). ```html
          -
          List item 1
          +
          List item 1
          ``` #### Failed Example 4 -Element with role `listitem` has a closer ancestor, that is included in the accessibility tree, than the role `list` that should have been its context role. +Element with [explicit role](#explicit-role) `listitem` has a closer ancestor, that is [included in the accessibility tree](#included-in-the-accessibility-tree), than the role `list` that should have been its [context role](https://www.w3.org/TR/wai-aria-1.1/#scope). ```html
          @@ -188,25 +186,25 @@ Element with role `listitem` has a closer ancestor, that is included in the acce #### Failed Example 5 -Element with role `listitem` has a closer ancestor, that is included in the accessibility tree, than the role `list` that should have been its context role. +`listitem` is owned by the `tabpanel`, because it is the closest ancestor, but `tabpanel` is not the correct [context](https://www.w3.org/TR/wai-aria-1.1/#scope) for `listitem`. ```html
          -
          -
          List item 1
          -
          +
          +
          List item 1
          +
          ``` #### Failed Example 6 -The element with the semantic role of `listitem` is [owned by](#owned-by) the first element that references it through `aria-owns`, which results in the wrong context role. +The element with the [explicit role](#explicit-role) of `listitem` is [owned by](#owned-by) the first element that references it through `aria-owns`, which results in the wrong [context role](https://www.w3.org/TR/wai-aria-1.1/#scope). ```html
          -
          -
          List item 1
          -
          +
          +
          List item 1
          +
          ``` @@ -214,7 +212,7 @@ The element with the semantic role of `listitem` is [owned by](#owned-by) the fi #### Failed Example 7 -Since explicit ownership cannot cross shadow boundaries, the element with the semantic role of `listitem` does not have a context role. +Since explicit ownership cannot cross shadow boundaries, the element with the [explicit role](#explicit-role) of `listitem` does not have a [context role](https://www.w3.org/TR/wai-aria-1.1/#scope). ```html
          @@ -236,15 +234,17 @@ Since explicit ownership cannot cross shadow boundaries, the element with the se #### Inapplicable Example 1 -Element does not have an explicit semantic role. +No element with an [explicit role](#explicit-role). ```html -
            List item 1
          +
            +
          • List item 1
          +
        ``` #### Inapplicable example 2 -Element is not exposed to assistive technologies. +Element is not [included in the accessibility tree](#included-in-the-accessibility-tree). ```html @@ -252,7 +252,7 @@ Element is not exposed to assistive technologies. #### Inapplicable Example 3 -Role does not have any required context roles listed in WAI-ARIA spec. +[Semantic role](#semantic-role) of element does not have any [required context roles](https://www.w3.org/TR/wai-aria-1.1/#scope) listed in WAI-ARIA 1.1. ```html
        Radio button 1
        @@ -260,7 +260,7 @@ Role does not have any required context roles listed in WAI-ARIA spec. #### Inapplicable Example 4 -Element is not exposed to assistive technologies, since ancestor has `aria-hidden` attribute with value set to `true`. +Element is not [included in the accessibility tree](#included-in-accessibility-tree), since ancestor has an `aria-hidden` attribute with value set to `true`. ```html
      • List item 1
      • @@ -277,8 +277,15 @@ Element has an explicit semantic role, but it is identical to the implicit seman #### Inapplicable Example 6 -Element has a role from the [Digital Publishing WAI-ARIA Module 1.0](https://www.w3.org/TR/dpub-aria-1.0/), not the [WAI-ARIA 1.1 Recommendation](https://www.w3.org/TR/wai-aria-1.1/), and it is therefore inapplicable. +Element has an [explicit role](#explicit-role) from the [Digital Publishing WAI-ARIA Module (DPUB ARIA) 1.0](https://www.w3.org/TR/dpub-aria-1.0/), not the [WAI-ARIA 1.1 Recommendation](https://www.w3.org/TR/wai-aria-1.1/), and it is therefore inapplicable. ```html -
        Item 1
        +
        +

        Cited Works

        +
        +

        + John Steinbeck, The Grapes of Wrath (New York: The Viking Press, 1939) +

        +
        +
        ``` From 45f564851926ef2a41a36a717f8f8fbf0b29b3f0 Mon Sep 17 00:00:00 2001 From: Anne Thyme Date: Wed, 21 Aug 2019 09:45:22 +0200 Subject: [PATCH 60/64] Changing Passed Example 5 to pass SC 1.3.1 --- _rules/aria-required-context-role-ff89c9.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_rules/aria-required-context-role-ff89c9.md b/_rules/aria-required-context-role-ff89c9.md index 1b6a143d0a1..50c2e57b3d7 100644 --- a/_rules/aria-required-context-role-ff89c9.md +++ b/_rules/aria-required-context-role-ff89c9.md @@ -107,7 +107,7 @@ Element contained within its [required context role](https://www.w3.org/TR/wai-a ```html
        -
        +
        List item 1
        From f4f5188b93b132ff3654b7ea6adf2de966692113 Mon Sep 17 00:00:00 2001 From: Wilco Fiers Date: Fri, 1 Nov 2019 12:16:31 +0100 Subject: [PATCH 61/64] chore: update rule to use accessibility tree as input --- _rules/aria-required-context-role-ff89c9.md | 198 +++++++------------- pages/glossary/owned-by.md | 9 +- 2 files changed, 70 insertions(+), 137 deletions(-) diff --git a/_rules/aria-required-context-role-ff89c9.md b/_rules/aria-required-context-role-ff89c9.md index 50c2e57b3d7..a55d1a1e63e 100644 --- a/_rules/aria-required-context-role-ff89c9.md +++ b/_rules/aria-required-context-role-ff89c9.md @@ -2,50 +2,51 @@ id: ff89c9 name: ARIA required context role rule_type: atomic -description: | - This rule checks that an element with an explicit role exists inside its required context. +description: | + This rule checks that an element with an explicit semantic role exists inside its required context. accessibility_requirements: wcag20:1.3.1: # Info and Relationships (A) forConformance: true failed: not satisfied passed: further testing needed inapplicable: further testing needed -input_aspects: -- DOM Tree -- CSS Styling -authors: -- Anne Thyme Nørregaard +input_aspects: + - Accessibility tree + - DOM Tree +acknowledgements: + authors: + - Wilco Fiers + - Brian Bors + previous_authros: + - Anne Thyme Nørregaard --- ## Applicability -The rule applies to any HTML or SVG element that is [included in the accessibility tree](#included-in-the-accessibility-tree) and has a [WAI-ARIA 1.1](https://www.w3.org/TR/wai-aria-1.1/) [explicit role](#explicit-role) with a [WAI-ARIA required context role](https://www.w3.org/TR/wai-aria-1.1/#scope), except if the element has an [implicit role](#implicit-role) that is identical to its [explicit role](#explicit-role). +The rule applies to any HTML or SVG element that is [included in the accessibility tree](#included-in-the-accessibility-tree) and has a [WAI-ARIA 1.1](https://www.w3.org/TR/wai-aria-1.1/) [explicit semantic role](#explicit-role) with a [WAI-ARIA required context role](https://www.w3.org/TR/wai-aria-1.1/#scope), except if the element has an [implicit semantic role](#implicit-role) that is identical to its [explicit semantic role](#explicit-role). **Note:** An example of an element that has a [WAI-ARIA required context role](https://www.w3.org/TR/wai-aria-1.1/#scope) is `tab` that has `tablist` as a [required context role](https://www.w3.org/TR/wai-aria-1.1/#scope). -**Note:** An example of an element that has an [implicit role](#implicit-role) that is identical to its [explicit role](#explicit-role) is an `
      • ` element that has `role="listitem"`. This rule is not applicable to elements like this. +**Note:** An example of an element that has an [implicit semantic role](#implicit-role) that is identical to its [explicit semantic role](#explicit-role) is an `li` element that has `role="listitem"`. These elements are not applicable **Note:** The applicability of this rule is limited to only the [WAI-ARIA 1.1 Recommendation](https://www.w3.org/TR/wai-aria-1.1/) roles, since there are unresolved issues with how [Digital Publishing WAI-ARIA Module (DPUB ARIA) 1.0](https://www.w3.org/TR/dpub-aria-1.0/) uses role inheritance to define the [required context roles](https://www.w3.org/TR/wai-aria-1.1/#scope), which makes it deviate from the model defined in [WAI-ARIA 1.1](https://www.w3.org/TR/wai-aria-1.1/). The [WAI-ARIA Graphics Module](https://www.w3.org/TR/graphics-aria-1.0/) does not include any [required context roles](https://www.w3.org/TR/wai-aria-1.1/#scope). ## Expectation -The target element is [owned by](#owned-by) an element that has a [semantic role](#semantic-role) that is one of the [WAI-ARIA required context roles](https://www.w3.org/TR/wai-aria-1.1/#scope) of the target element. +Each test target is [owned by](#owned-by) an element that has a [semantic role](#semantic-role) that is one of the [WAI-ARIA required context roles](https://www.w3.org/TR/wai-aria-1.1/#scope) of the target element. **Note:** The definition of [owned by](#owned-by) used in this rule is different than the definition of ["owned element" in WAI-ARIA](https://www.w3.org/TR/wai-aria-1.1/#dfn-owned-element). See more in the [owned by](#owned-by) definition. -**Note:** [Subclass roles](https://www.w3.org/TR/wai-aria-1.1/#subclassroles) of [WAI-ARIA required context roles](https://www.w3.org/TR/wai-aria-1.1/#scope) are not automatically included as possible [required context roles](https://www.w3.org/TR/wai-aria-1.1/#scope). E.g. the [`feed`](https://www.w3.org/TR/wai-aria-1.1/#feed) role is not a possible [required context role](https://www.w3.org/TR/wai-aria-1.1/#scope) for [`listitem`](https://www.w3.org/TR/wai-aria-1.1/#listitem), even though [`feed`](https://www.w3.org/TR/wai-aria-1.1/#feed) is a [subclass role](https://www.w3.org/TR/wai-aria-1.1/#subclassroles) of the [`list`](https://www.w3.org/TR/wai-aria-1.1/#list) role, and [`list`](https://www.w3.org/TR/wai-aria-1.1/#list) is one of the [required context roles](https://www.w3.org/TR/wai-aria-1.1/#scope) for [`listitem`](https://www.w3.org/TR/wai-aria-1.1/#listitem). -If a [subclass role](https://www.w3.org/TR/wai-aria-1.1/#subclassroles) is a possible [required context role](https://www.w3.org/TR/wai-aria-1.1/#scope), the [subclass role](https://www.w3.org/TR/wai-aria-1.1/#subclassroles) will be listed as a [required context role](https://www.w3.org/TR/wai-aria-1.1/#scope) as well as the [superclass role](https://www.w3.org/TR/wai-aria-1.1/#superclassrole), e.g. the [`row`](https://www.w3.org/TR/wai-aria-1.1/#row) role lists both [`grid`](https://www.w3.org/TR/wai-aria-1.1/#grid) and [`table`](https://www.w3.org/TR/wai-aria-1.1/#table) as [required context roles](https://www.w3.org/TR/wai-aria-1.1/#scope), even though [`grid`](https://www.w3.org/TR/wai-aria-1.1/#grid) is a subclass of the [`table`](https://www.w3.org/TR/wai-aria-1.1/#table) role. - -**Note:** For [`listitem` (role)](https://www.w3.org/TR/wai-aria-1.1/#listitem) the [`directory` (role)](https://www.w3.org/TR/wai-aria-1.1/#directory) seems to be missing as a [required context role](https://www.w3.org/TR/wai-aria-1.1/#scope) in the [WAI-ARIA 1.1 Recommendation](https://www.w3.org/TR/wai-aria-1.1). [An issue for this has been filed](https://github.com/w3c/aria/issues/1030) with the Accessible Rich Internet Applications Working Group. +**Note:** [Subclass roles](https://www.w3.org/TR/wai-aria-1.1/#subclassroles) of [WAI-ARIA required context roles](https://www.w3.org/TR/wai-aria-1.1/#scope) are not automatically included as possible [required context roles](https://www.w3.org/TR/wai-aria-1.1/#scope). E.g. the [`feed`](https://www.w3.org/TR/wai-aria-1.1/#feed) role is not a possible [required context role](https://www.w3.org/TR/wai-aria-1.1/#scope) for [`listitem`](https://www.w3.org/TR/wai-aria-1.1/#listitem), even though [`feed`](https://www.w3.org/TR/wai-aria-1.1/#feed) is a [subclass role](https://www.w3.org/TR/wai-aria-1.1/#subclassroles) of the [`list`](https://www.w3.org/TR/wai-aria-1.1/#list) role. ## Assumptions -If the [explicit role](#explicit-role) on the target element is incorrectly used, and any relationships between elements are already programmatically determinable, failing this rule might not result in accessibility issues for users of assistive technologies, and it should then not be considered a failure under WCAG success criterion 1.3.1 Info and Relationships. +If the [explicit semantic role](#explicit-role) on the target element is incorrectly used, and any relationships between elements are already programmatically determinable, failing this rule may not result in accessibility issues for users of assistive technologies, and it should then not be considered a failure under WCAG success criterion 1.3.1 Info and Relationships. ## Accessibility Support -- This rule relies on assistive technologies to consistently identify which element is [owned by](#owned-by) which other element. This includes when the element is [owned by](#owned-by) another element that is an ancestor, but not a parent of the target element. Some assistive technologies do not accept these [owned by](#owned-by) relationships, unless workarounds are used. Furthermore, `aria-owns` has limited support in some user agents. -- Some user agents and assistive technologies ignore empty elements, which means they are not presented to all users. However, since this is handled inconsitently across user agents and assistive technologies, this rule is applicable to empty elements. +- User agents do not all have the same accessibility tree. Particularly the method of deriving which element owns which other elements varies between browsers. This can lead to different results from this rule, depending on which accessibility tree is used as input. +- `aria-owns` has limited support in some user agents. ## Background @@ -58,21 +59,21 @@ If the [explicit role](#explicit-role) on the target element is incorrectly used #### Passed Example 1 -Element with [explicit role](#explicit-role) `listitem` is contained within its [required context role](https://www.w3.org/TR/wai-aria-1.1/#scope) `list`, expressed as an [explicit role](#explicit-role). +Element with [explicit semantic role](#explicit-role) `listitem` is contained within its [required context role](https://www.w3.org/TR/wai-aria-1.1/#scope) `list`, expressed as an [explicit semantic role](#explicit-role). ```html
        -
        List item 1
        +
        List item 1
        ``` #### Passed Example 2 -Element with [explicit role](#explicit-role) `listitem` is contained within its [required context role](https://www.w3.org/TR/wai-aria-1.1/#scope) `list`, through the [implicit role](#implicit-role) of `ul`. +Element with [explicit semantic role](#explicit-role) `listitem` is contained within its [required context role](https://www.w3.org/TR/wai-aria-1.1/#scope) `list`, through the [implicit semantic role](#implicit-role) of `ul`. ```html
          -
          List item 1
          +
          List item 1
        ``` @@ -82,13 +83,9 @@ Element contained within its [required context role](https://www.w3.org/TR/wai-a ```html
        -
        -
        -
        -
        List item 1
        -
        -
        -
        +
        +
        List item 1
        +
        ``` @@ -103,48 +100,35 @@ Element contained within its [required context role](https://www.w3.org/TR/wai-a #### Passed Example 5 -`aria-owns` trumps ownership by closest ancestor, giving the element with [explicit role](#explicit-role) of `listitem` the correct [context role](https://www.w3.org/TR/wai-aria-1.1/#scope). +`aria-owns` trumps ownership by closest ancestor, giving the element with [explicit semantic role](#explicit-role) of `listitem` the correct [context role](https://www.w3.org/TR/wai-aria-1.1/#scope). ```html
        -
        -
        List item 1
        -
        +
        +
        List item 1
        +
        ``` #### Passed Example 6 -Since implicit ownership can cross shadow boundaries, the element with the [explicit role](#explicit-role) of `listitem` is contained within its [required context role](https://www.w3.org/TR/wai-aria-1.1/#scope) `list`. +Since implicit ownership can cross shadow boundaries, the element with the [explicit semantic role](#explicit-role) of `listitem` is contained within its [required context role](https://www.w3.org/TR/wai-aria-1.1/#scope) `list`. ```html -
        -
        +
        ``` -#### Passed Example 7 - -Element with [explicit role](#explicit-role) `listitem` is contained within its [required context role](https://www.w3.org/TR/wai-aria-1.1/#scope) `list`, expressed as an [explicit role](#explicit-role). Even though the element with role `listitem` is empty, it is still applicable to this rule. - -```html -
        -
        -
        -``` ### Failed #### Failed Example 1 -No [context role](https://www.w3.org/TR/wai-aria-1.1/#scope). +The `listitem` has no [context role](https://www.w3.org/TR/wai-aria-1.1/#scope). ```html
        List item 1
        @@ -152,81 +136,41 @@ No [context role](https://www.w3.org/TR/wai-aria-1.1/#scope). #### Failed Example 2 -Wrong [context role](https://www.w3.org/TR/wai-aria-1.1/#scope). - -```html -
        -
        List item 1
        -
        -``` - -#### Failed Example 3 - -Element not contained within its [required context role](https://www.w3.org/TR/wai-aria-1.1/#scope). - -```html -
        -
        List item 1
        -``` - -#### Failed Example 4 - -Element with [explicit role](#explicit-role) `listitem` has a closer ancestor, that is [included in the accessibility tree](#included-in-the-accessibility-tree), than the role `list` that should have been its [context role](https://www.w3.org/TR/wai-aria-1.1/#scope). +The `listitem` is owned by the `tabpanel`, because it is the closest ancestor, but `tabpanel` is not the correct [context](https://www.w3.org/TR/wai-aria-1.1/#scope) for `listitem`. ```html
        -
        -
        List item 1
        -
        +
        +
        List item 1
        +
        ``` -**Note:** This test case follows the definition of [owned by](#owned-by) used in this rule. If implemented differently, this definition could cause differences in outcome for this test case. - - -#### Failed Example 5 +#### Failed Example 3 -`listitem` is owned by the `tabpanel`, because it is the closest ancestor, but `tabpanel` is not the correct [context](https://www.w3.org/TR/wai-aria-1.1/#scope) for `listitem`. +The `listitem` is owned by the `aria-label="menu"` div, rather than the `list`. ```html
        -
        -
        List item 1
        -
        +
        +
        List item 1
        +
        ``` -#### Failed Example 6 - -The element with the [explicit role](#explicit-role) of `listitem` is [owned by](#owned-by) the first element that references it through `aria-owns`, which results in the wrong [context role](https://www.w3.org/TR/wai-aria-1.1/#scope). - -```html -
        -
        -
        List item 1
        -
        -
        -``` - -**Note:** This test case follows the definition of [owned by](#owned-by) used in this rule. If implemented differently, this definition could cause differences in outcome for this test case. - -#### Failed Example 7 +#### Failed Example 4 -Since explicit ownership cannot cross shadow boundaries, the element with the [explicit role](#explicit-role) of `listitem` does not have a [context role](https://www.w3.org/TR/wai-aria-1.1/#scope). +Since explicit ownership cannot cross shadow boundaries, the element with the [explicit semantic role](#explicit-role) of `listitem` does not have a [context role](https://www.w3.org/TR/wai-aria-1.1/#scope). ```html -
        -
        +
        ``` @@ -234,7 +178,7 @@ Since explicit ownership cannot cross shadow boundaries, the element with the [e #### Inapplicable Example 1 -No element with an [explicit role](#explicit-role). +There is no element with an [explicit semantic role](#explicit-role). ```html
          @@ -244,48 +188,42 @@ No element with an [explicit role](#explicit-role). #### Inapplicable example 2 -Element is not [included in the accessibility tree](#included-in-the-accessibility-tree). +The `listitem` is not [included in the accessibility tree](#included-in-the-accessibility-tree). ```html - +
          List item 1
          ``` #### Inapplicable Example 3 -[Semantic role](#semantic-role) of element does not have any [required context roles](https://www.w3.org/TR/wai-aria-1.1/#scope) listed in WAI-ARIA 1.1. +The `header` does not have a [required context roles](https://www.w3.org/TR/wai-aria-1.1/#scope) listed in WAI-ARIA 1.1. ```html -
          Radio button 1
          +
          Hello!
          +

          Welcome to my homepage!

          ``` #### Inapplicable Example 4 -Element is not [included in the accessibility tree](#included-in-accessibility-tree), since ancestor has an `aria-hidden` attribute with value set to `true`. +The `listitem` has an [explicit semantic role](#explicit-role), but it is identical to the [implicit semantic role](#implicit-role), making the element inapplicable. ```html - -``` -#### Inapplicable Example 5 - -Element has an [explicit role](#explicit-role), but it is identical to the [implicit role](#implicit-role), making the element inapplicable. - -```html -
        • List item 1
        • +
            +
          • List item 1
          • +
          ``` -#### Inapplicable Example 6 +#### Inapplicable Example 5 -Element has an [explicit role](#explicit-role) from the [Digital Publishing WAI-ARIA Module (DPUB ARIA) 1.0](https://www.w3.org/TR/dpub-aria-1.0/), not the [WAI-ARIA 1.1 Recommendation](https://www.w3.org/TR/wai-aria-1.1/), and it is therefore inapplicable. +The `doc-biblioentry` has a role from the [Digital Publishing WAI-ARIA Module (DPUB ARIA) 1.0](https://www.w3.org/TR/dpub-aria-1.0/), not the [WAI-ARIA 1.1 Recommendation](https://www.w3.org/TR/wai-aria-1.1/), and it is therefore inapplicable. ```html
          -

          Cited Works

          -
          -

          - John Steinbeck, The Grapes of Wrath (New York: The Viking Press, 1939) -

          -
          +

          Cited Works

          +
          +

          + John Steinbeck, The Grapes of Wrath (New York: The Viking Press, 1939) +

          +
          ``` diff --git a/pages/glossary/owned-by.md b/pages/glossary/owned-by.md index c017ec323c1..f60ad0cc598 100644 --- a/pages/glossary/owned-by.md +++ b/pages/glossary/owned-by.md @@ -3,11 +3,6 @@ title: Owned by key: owned-by --- -An element A is owned by element B if element B is [included in the accessibility tree](#included-in-the-accessibility-tree) and: +An element A is owned by element B if element A is a child of element B in the [accessibility tree](https://www.w3.org/TR/act-rules-aspects/#input-aspects-accessibility). -1. Both elements exist within the same [document tree](https://www.w3.org/TR/dom41/#document-trees) or [shadow tree](https://www.w3.org/TR/dom41/#shadow-trees), and element A is the first element within the tree, in [tree order](https://www.w3.org/TR/dom/#concept-tree-order), whose ID is included within the `aria-owns` attribute of element B, or -2. Element B is the closest [shadow including ancestor](https://www.w3.org/TR/dom41/#concept-shadow-including-ancestor) of element A. - -Nodes that are not included in the accessibility tree cannot be owned by other elements. - -> **Note:** This definition is diverging from the definition of ["owned element" in WAI-ARIA](https://www.w3.org/TR/wai-aria-1.1/#dfn-owned-element). The reason is that the WAI-ARIA definition was found to provide too little guidance on how to handle specific edge cases where several elements compete about the ownership, and it seem that browser implementations of this are diverging a lot. This definition seeks to find a reasonable middle ground, but will have to be updated if the WAI-ARIA definition changes. +> **Note:** This definition is different from the definition of ["owned element" in WAI-ARIA](https://www.w3.org/TR/wai-aria-1.1/#dfn-owned-element). Because browsers have different accessibility trees, which element owns which other elements can vary between browsers. Until there is a standard accessibility tree, testing with multiple accessibility trees may be necessary. From e3db62e432b571e3aebaf6ad00cba39e600eef18 Mon Sep 17 00:00:00 2001 From: Wilco Fiers Date: Fri, 1 Nov 2019 13:13:08 +0100 Subject: [PATCH 62/64] chore: fix failing tests --- __tests__/spelling-ignore.yml | 155 +++++++++++--------- _rules/aria-required-context-role-ff89c9.md | 4 +- 2 files changed, 85 insertions(+), 74 deletions(-) diff --git a/__tests__/spelling-ignore.yml b/__tests__/spelling-ignore.yml index 2bbf83ed3ea..dfe4c878bc1 100644 --- a/__tests__/spelling-ignore.yml +++ b/__tests__/spelling-ignore.yml @@ -1,25 +1,31 @@ # List of spelling to be ignored by spellcheck tests in `__tests__/spelling.js` # Project specific words -- WAI +- WAI - W3C # Generic HTML tag(s) - html - iframe - img +- ul +- ol +- dl +- li +- dd +- dt - frameset -- h1 +- h1 - h1-h6 - svg # Domain-specific words, Definitions & other allowed terms -- URI -- UA/AT +- URI +- UA/AT - WCAG -- WCAG2 -- CSS3 -- UA +- WCAG2 +- CSS3 +- UA - UI - APIs - MDN @@ -31,32 +37,33 @@ - DOM - SVG - PDFs +- DPUB - url - voiceover - subtag - subtags - testrunner - color -- focusable -- unfocusable -- tabindex -- whitespace -- namespaces +- focusable +- unfocusable +- tabindex +- whitespace +- namespaces - webpage - wai-aria-specifications - autoplay - autoplays # spell checker checks against strict casing & hence some repeated words here -- Autocomplete +- Autocomplete - Focusable # Parts of url -- http -- https -- github.com -- www.w3.org -- eval +- http +- https +- github.com +- www.w3.org +- eval - html52 - whatwg - dom @@ -67,7 +74,7 @@ - alfa - RGAA - wcag-em-report-tool -- ozplayer +- ozplayer # Test case anamolies - level2-frame1 @@ -79,32 +86,36 @@ - href - src - aria-labelled -- aria-labelledby +- aria-labelledby - autofill-field -- combobox +- combobox - spinbutton -- gridcell -- menuitem -- menuitemcheckbox -- menuitemradio -- searchbox -- treeitem -- listbox -- textbox -- autocomplete +- gridcell +- menuitem +- menuitemcheckbox +- menuitemradio +- searchbox +- treeitem +- listbox +- listitem +- tablist +- tabpanel +- doc-biblioentry +- textbox +- autocomplete - textarea -- autoplay +- autoplay - tristate - scrollbar - viewport - figcaption -- aria-errormessage -- aria-rowindex -- aria-valuemin -- aria-valuemax -- aria-valuenow +- aria-errormessage +- aria-rowindex +- aria-valuemin +- aria-valuemax +- aria-valuenow - aria-dropeffect -- lang +- lang - xml:lang - http-equiv - user-scalable @@ -115,61 +126,61 @@ - matrix3d # ARIA Techniques (https://www.w3.org/WAI/WCAG21/Techniques/#aria) -- ARIA1 -- ARIA5 -- ARIA6 -- ARIA7 +- ARIA1 +- ARIA5 +- ARIA6 +- ARIA7 - ARIA8 -- ARIA10 +- ARIA10 - ARIA12 -- ARIA14 +- ARIA14 - ARIA16 # Common Failures (https://www.w3.org/WAI/WCAG21/Techniques/#failures) - F10 - F23 -- F30 -- F38 -- F40 -- F41 -- F65 +- F30 +- F38 +- F40 +- F41 +- F65 - F89 # General Techniques (https://www.w3.org/WAI/WCAG21/Techniques/#general) -- G8 -- G21 -- G78 -- G87 -- G88 -- G93 -- G95 -- G108 -- G130 -- G131 -- G158 -- G159 -- G162 -- G166 +- G8 +- G21 +- G78 +- G87 +- G88 +- G93 +- G95 +- G108 +- G130 +- G131 +- G158 +- G159 +- G162 +- G166 - G170 - G171 -- G173 +- G173 - G203 # HTMl Techniques (https://www.w3.org/WAI/WCAG21/Techniques/#html) -- H25 -- H36 -- H37 -- H42 +- H25 +- H36 +- H37 +- H42 - H44 - H58 -- H67 -- H93 -- H94 -- H95 +- H67 +- H93 +- H94 +- H95 - H96 # Unsure why the dictionary does not have these words - programmatically - Programmatically - personalization -- Autofill \ No newline at end of file +- Autofill diff --git a/_rules/aria-required-context-role-ff89c9.md b/_rules/aria-required-context-role-ff89c9.md index a55d1a1e63e..b5451f2489a 100644 --- a/_rules/aria-required-context-role-ff89c9.md +++ b/_rules/aria-required-context-role-ff89c9.md @@ -182,11 +182,11 @@ There is no element with an [explicit semantic role](#explicit-role). ```html
            -
          • List item 1
          +
        • List item 1
        ``` -#### Inapplicable example 2 +#### Inapplicable Example 2 The `listitem` is not [included in the accessibility tree](#included-in-the-accessibility-tree). From 5cbc373d987b1d3c21d3359404e3758494d4b6d0 Mon Sep 17 00:00:00 2001 From: Wilco Fiers Date: Wed, 13 Nov 2019 11:37:39 +0100 Subject: [PATCH 63/64] Apply suggestions from code review Co-Authored-By: Jean-Yves Moyen --- _rules/aria-required-context-role-ff89c9.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/_rules/aria-required-context-role-ff89c9.md b/_rules/aria-required-context-role-ff89c9.md index b5451f2489a..3bcf136dc7b 100644 --- a/_rules/aria-required-context-role-ff89c9.md +++ b/_rules/aria-required-context-role-ff89c9.md @@ -27,7 +27,7 @@ The rule applies to any HTML or SVG element that is [included in the accessibili **Note:** An example of an element that has a [WAI-ARIA required context role](https://www.w3.org/TR/wai-aria-1.1/#scope) is `tab` that has `tablist` as a [required context role](https://www.w3.org/TR/wai-aria-1.1/#scope). -**Note:** An example of an element that has an [implicit semantic role](#implicit-role) that is identical to its [explicit semantic role](#explicit-role) is an `li` element that has `role="listitem"`. These elements are not applicable +**Note:** An example of an element that has an [implicit semantic role](#implicit-role) that is identical to its [explicit semantic role](#explicit-role) is an `li` element that has `role="listitem"`. These elements are not applicable. **Note:** The applicability of this rule is limited to only the [WAI-ARIA 1.1 Recommendation](https://www.w3.org/TR/wai-aria-1.1/) roles, since there are unresolved issues with how [Digital Publishing WAI-ARIA Module (DPUB ARIA) 1.0](https://www.w3.org/TR/dpub-aria-1.0/) uses role inheritance to define the [required context roles](https://www.w3.org/TR/wai-aria-1.1/#scope), which makes it deviate from the model defined in [WAI-ARIA 1.1](https://www.w3.org/TR/wai-aria-1.1/). The [WAI-ARIA Graphics Module](https://www.w3.org/TR/graphics-aria-1.0/) does not include any [required context roles](https://www.w3.org/TR/wai-aria-1.1/#scope). @@ -45,7 +45,7 @@ If the [explicit semantic role](#explicit-role) on the target element is incorre ## Accessibility Support -- User agents do not all have the same accessibility tree. Particularly the method of deriving which element owns which other elements varies between browsers. This can lead to different results from this rule, depending on which accessibility tree is used as input. +- User agents do not all have the same accessibility tree. Particularly the method of deriving which element owns which other elements varies between browsers. This can lead to different results for this rule, depending on which accessibility tree is used as input. - `aria-owns` has limited support in some user agents. ## Background @@ -94,25 +94,25 @@ Element contained within its [required context role](https://www.w3.org/TR/wai-a `aria-owns` used to give the target element the right [context role](https://www.w3.org/TR/wai-aria-1.1/#scope). ```html -
        -
        List item 1
        +
        +
        List item 1
        ``` #### Passed Example 5 -`aria-owns` trumps ownership by closest ancestor, giving the element with [explicit semantic role](#explicit-role) of `listitem` the correct [context role](https://www.w3.org/TR/wai-aria-1.1/#scope). +The `aria-owns` attribute override normal DOM tree relationship. Thus, the innermost `div` element (`item`) is not owned by the intermediate one (with a `role="navigation"`) and has the correct [context role](https://www.w3.org/TR/wai-aria-1.1/#scope). ```html -
        +
        -
        List item 1
        +
        List item 1
        ``` #### Passed Example 6 -Since implicit ownership can cross shadow boundaries, the element with the [explicit semantic role](#explicit-role) of `listitem` is contained within its [required context role](https://www.w3.org/TR/wai-aria-1.1/#scope) `list`. +Since implicit ownership can cross shadow boundaries, the element with the [explicit semantic role](#explicit-role) of `listitem` is contained within its [required context role](https://www.w3.org/TR/wai-aria-1.1/#scope) of `list`. ```html
        @@ -196,7 +196,7 @@ The `listitem` is not [included in the accessibility tree](#included-in-the-acce #### Inapplicable Example 3 -The `header` does not have a [required context roles](https://www.w3.org/TR/wai-aria-1.1/#scope) listed in WAI-ARIA 1.1. +The `header` role does not have a [required context role](https://www.w3.org/TR/wai-aria-1.1/#scope). ```html
        Hello!
        From 5db02eb85a3ce8f98f6d38dda0be29ed66cb1e6f Mon Sep 17 00:00:00 2001 From: Wilco Fiers Date: Wed, 13 Nov 2019 11:41:41 +0100 Subject: [PATCH 64/64] Update aria-required-context-role-ff89c9.md --- _rules/aria-required-context-role-ff89c9.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_rules/aria-required-context-role-ff89c9.md b/_rules/aria-required-context-role-ff89c9.md index 3bcf136dc7b..2bfd0b32929 100644 --- a/_rules/aria-required-context-role-ff89c9.md +++ b/_rules/aria-required-context-role-ff89c9.md @@ -41,7 +41,7 @@ Each test target is [owned by](#owned-by) an element that has a [semantic role]( ## Assumptions -If the [explicit semantic role](#explicit-role) on the target element is incorrectly used, and any relationships between elements are already programmatically determinable, failing this rule may not result in accessibility issues for users of assistive technologies, and it should then not be considered a failure under WCAG success criterion 1.3.1 Info and Relationships. +If the [explicit semantic role](#explicit-role) on the target element is incorrectly used, and any relationships between elements are already programmatically determinable, failing this rule may not result in accessibility issues for users of assistive technologies, and it should then not be considered a failure under [WCAG success criterion 1.3.1 Info and Relationships](https://www.w3.org/TR/WCAG21/#info-and-relationships). ## Accessibility Support