From c336ff76de9da75b934047930b8d7127857797a9 Mon Sep 17 00:00:00 2001 From: ajanec01 Date: Tue, 27 Apr 2021 18:59:56 +0100 Subject: [PATCH 1/7] initial take --- ...resented-without-receiving-focus-mogq50.md | 73 +++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 _rules/non-sequential-status-text-presented-without-receiving-focus-mogq50.md diff --git a/_rules/non-sequential-status-text-presented-without-receiving-focus-mogq50.md b/_rules/non-sequential-status-text-presented-without-receiving-focus-mogq50.md new file mode 100644 index 00000000000..edbc9e93bfb --- /dev/null +++ b/_rules/non-sequential-status-text-presented-without-receiving-focus-mogq50.md @@ -0,0 +1,73 @@ +--- +id: mogq50 +name: 'Status text update has `aria-live` property' +rule_type: atomic +description: | + This rule checks that any text update that meets the definition of a [status message][] has `aria-live` property. +accessibility_requirements: + wcag21:4.1.3: # Status Messages (AA) + forConformance: true + failed: not satisfied + passed: further testing needed + inapplicable: further testing needed + wcag-technique:ARIA22: # Using role=status to present status messages + forConformance: false + failed: not satisfied + passed: further testing needed + inapplicable: further testing needed + wcag-technique:ARIA19: # Using ARIA role=alert or Live Regions to Identify Errors + forConformance: false + failed: not satisfied + passed: further testing needed + inapplicable: further testing needed +input_aspects: + - DOM Tree + - CSS Styling + - Accessibility Tree +acknowledgments: + authors: + - Aron Janecki + - Jean-Yves Moyen +--- + +## Applicability + +This rule applies to any [HTML element][] that has a [text node][] as a [descendant][] in the [flat tree][] if: + +- **changed**: the `innerText` property of the element changes; and +- **available**: the [text node][] is [included in the accessibility tree][]. + +## Expectation + +Each test target has an implicit or explicit `aria-live` property value that is [ASCII lowercase][] match for string "assertive", "polite", or "off". + +## Assumptions + +The text changes meet the definition of [status message][]. If this is not the case, success criterion 4.1.3 Status Messages may be satisfied even if this rule failed. + +This rule assumes that the [explicit role][] of the elements does not need to be appropriate to satisfy success criterion 4.1.3 Status Messages. For example, a status message can be programmatically determined when it's' using `role="alert"` on elements with score updates even though the `role="status"` appears to be more appropriate. + +## Accessibility Support + +## Background + +## Test Cases + +### Passed + +#### Passed Example 1 + +[alert]: https://www.w3.org/TR/wai-aria-1.1/#alert 'Definition of alert' +[ascii lowercase]: https://infra.spec.whatwg.org/#ascii-lowercase 'Definition of ASCII lowercase' + +[timer][https://www.w3.org/tr/wai-aria-1.1/#timer] +[descendant]: https://dom.spec.whatwg.org/#concept-tree-descendant +[flat tree]: https://drafts.csswg.org/css-scoping/#flat-tree 'Definition of flat tree' +[HTML element]: https://html.spec.whatwg.org/multipage/dom.html#htmlelement +[included in the accessibility tree]: #included-in-the-accessibility-tree 'Definition of included in the accessibility tree' +[semantic role]: #semantic-role 'Definition of semantic role' +[status]: https://www.w3.org/TR/wai-aria-1.1/#status 'Definition of status' +[status message]: https://www.w3.org/TR/WCAG21/#dfn-status-messages +[text node]: https://dom.spec.whatwg.org/#text +[timer]: https://www.w3.org/TR/wai-aria-1.1/#timer 'Definition of timer' +[valid time string]: https://html.spec.whatwg.org/#valid-time-string 'Definition of valid time string' From 36627690a541e253d06fb6097daa8bca968c480e Mon Sep 17 00:00:00 2001 From: ajanec01 Date: Tue, 27 Apr 2021 19:05:49 +0100 Subject: [PATCH 2/7] changing file name --- ...iving-focus-mogq50.md => status-text-has-aria-live--mogq50.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename _rules/{non-sequential-status-text-presented-without-receiving-focus-mogq50.md => status-text-has-aria-live--mogq50.md} (100%) diff --git a/_rules/non-sequential-status-text-presented-without-receiving-focus-mogq50.md b/_rules/status-text-has-aria-live--mogq50.md similarity index 100% rename from _rules/non-sequential-status-text-presented-without-receiving-focus-mogq50.md rename to _rules/status-text-has-aria-live--mogq50.md From 5bb231f80d3e2d6fdb21893b6670f0fa1bf4fbd7 Mon Sep 17 00:00:00 2001 From: ajanec01 Date: Sun, 9 May 2021 12:15:24 +0100 Subject: [PATCH 3/7] changing file name --- ...ve--mogq50.md => status-text-has-aria-live-mogq50.md} | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) rename _rules/{status-text-has-aria-live--mogq50.md => status-text-has-aria-live-mogq50.md} (88%) diff --git a/_rules/status-text-has-aria-live--mogq50.md b/_rules/status-text-has-aria-live-mogq50.md similarity index 88% rename from _rules/status-text-has-aria-live--mogq50.md rename to _rules/status-text-has-aria-live-mogq50.md index edbc9e93bfb..f8cafa5afdf 100644 --- a/_rules/status-text-has-aria-live--mogq50.md +++ b/_rules/status-text-has-aria-live-mogq50.md @@ -10,12 +10,17 @@ accessibility_requirements: failed: not satisfied passed: further testing needed inapplicable: further testing needed + wcag-technique:ARIA19: # Using ARIA role=alert or Live Regions to Identify Errors + forConformance: false + failed: not satisfied + passed: further testing needed + inapplicable: further testing needed wcag-technique:ARIA22: # Using role=status to present status messages forConformance: false failed: not satisfied passed: further testing needed inapplicable: further testing needed - wcag-technique:ARIA19: # Using ARIA role=alert or Live Regions to Identify Errors + wcag-technique:ARIA23: # Using role=log to identify sequential information updates forConformance: false failed: not satisfied passed: further testing needed @@ -45,7 +50,7 @@ Each test target has an implicit or explicit `aria-live` property value that is The text changes meet the definition of [status message][]. If this is not the case, success criterion 4.1.3 Status Messages may be satisfied even if this rule failed. -This rule assumes that the [explicit role][] of the elements does not need to be appropriate to satisfy success criterion 4.1.3 Status Messages. For example, a status message can be programmatically determined when it's' using `role="alert"` on elements with score updates even though the `role="status"` appears to be more appropriate. +This rule assumes that the [explicit role][] of the elements does not need to be appropriate to satisfy success criterion 4.1.3 Status Messages. For example, a status message can be programmatically determined when it's using `role="alert"` on elements with score updates even though the `role="status"` appears to be more appropriate. ## Accessibility Support From c584cc82009e7f0ff8eb37c149995c4e69fb0e7f Mon Sep 17 00:00:00 2001 From: ajanec01 Date: Sun, 9 May 2021 21:25:40 +0100 Subject: [PATCH 4/7] Still a draft rule but with test cases --- _rules/status-text-has-aria-live-mogq50.md | 155 ++++++++++++++++++++- 1 file changed, 150 insertions(+), 5 deletions(-) diff --git a/_rules/status-text-has-aria-live-mogq50.md b/_rules/status-text-has-aria-live-mogq50.md index f8cafa5afdf..6860a3246bd 100644 --- a/_rules/status-text-has-aria-live-mogq50.md +++ b/_rules/status-text-has-aria-live-mogq50.md @@ -3,7 +3,7 @@ id: mogq50 name: 'Status text update has `aria-live` property' rule_type: atomic description: | - This rule checks that any text update that meets the definition of a [status message][] has `aria-live` property. + This rule checks that any text update that meets the definition of a status message has `aria-live` property. accessibility_requirements: wcag21:4.1.3: # Status Messages (AA) forConformance: true @@ -37,31 +37,174 @@ acknowledgments: ## Applicability -This rule applies to any [HTML element][] that has a [text node][] as a [descendant][] in the [flat tree][] if: +This rule applies to any [HTML element][] that has a [text node][] as a direct [descendant][] in the [flat tree][] if: - **changed**: the `innerText` property of the element changes; and - **available**: the [text node][] is [included in the accessibility tree][]. ## Expectation -Each test target has an implicit or explicit `aria-live` property value that is [ASCII lowercase][] match for string "assertive", "polite", or "off". +Each test target has an implicit or explicit `aria-live` value of "assertive" or "polite". ## Assumptions -The text changes meet the definition of [status message][]. If this is not the case, success criterion 4.1.3 Status Messages may be satisfied even if this rule failed. +The text changes meet the definition of [status message][]. If this is not the case, success criterion [4.1.3 Status Messages][success criterion 4.1.3 status messages] may be satisfied even if this rule failed. -This rule assumes that the [explicit role][] of the elements does not need to be appropriate to satisfy success criterion 4.1.3 Status Messages. For example, a status message can be programmatically determined when it's using `role="alert"` on elements with score updates even though the `role="status"` appears to be more appropriate. +This rule assumes that the [explicit role][] of the elements does not need to be appropriate to satisfy success criterion [4.1.3 Status Messages][success criterion 4.1.3 status messages]. For example, using `role="alert"` on elements with score updates may be of concern for success criterion [1.3.1 Info and Relationships][success criterion 1.3.1 info and relationships] because the `role="status"` appears to be more appropriate in such a context. However, the inappropriate role does not prevent the `aria-live` property from being programmatically identifiable . ## Accessibility Support +There exists a known combination of operating system and browsers that do not specify the implicit `aria-live` property. + ## Background +- [ARIA19: Using ARIA role=alert or Live Regions to Identify Errors](https://www.w3.org/WAI/WCAG21/Techniques/aria/ARIA19.html) +- [ARIA21: Using role=status to present status messages](https://www.w3.org/WAI/WCAG21/Techniques/aria/ARIA22.html) +- [ARIA23: Using role=log to identify sequential information updates](https://www.w3.org/WAI/WCAG21/Techniques/aria/ARIA23.html) + ## Test Cases ### Passed #### Passed Example 1 +This `div` element with `role="alert"` has an implicit `aria-live` value of "assertive". + +```html + +
Error: First name field must not be blank
+``` + +#### Passed Example 2 + +This `div` element with `role="status"` has an implicit `aria-live` value of "polite". + +```html +
10 results out of 20
+``` + +#### Passed Example 3 + +This `div` element with `role="timer"` has an explicit `aria-live` value of "polite". The `aria-live="polite"` overwrites the implicit value of "off" for elements with `role="timer"`. + +```html +

Download time in seconds

+10 +``` + +#### Passed Example 4 + +This `div` element with `role="log"` has an implicit `aria-live` value of "polite". The `aria-live="polite"` overwrites the implicit value of "off" for elements with `role="timer"`. + +```html +
+

Notifications panel

+ +
    +
  • Notification 2 out of 2
  • +
  • Notification 1 out of 2
  • +
+
+``` + +#### Passed Example 5 + +This `div` element with `role="marquee"` has an implicit `aria-live` value of "off". Pressing the Activate Updates control changes the implicit value to "polite". + +```html +

Stock tickers website

+ +

Press Activate Updates to receive live updates of stock values

+ + +
+ + + + + + + + + + + + + + + + + +
Company symbolLast price
Comp10.675
Comp20.543
+
+``` + +#### Passed Example 6 + +This `p` element has explicit `aria-live` value of "polite". + +```html +

Press Receive update to see if the button works

+ +

The button works!

+``` + +### Failed + +#### Failed Example 1 + +This `div` element does not have implicit or explicit `aria-live` value of "polite" or "assertive" because the `role` attribute value is not a valid semantic role. + +```html + +
Error: First name field must not be blank
+``` + +#### Failed Example 2 + +This `p` element does not have an implicit or explicit `aria-live` value of "polite" or "assertive". + +```html +

10 results out of 20

+``` + +#### Failed Example 3 + +This `div` element with `role="timer"` has an implicit `aria-live` value of "off". The `aria-live="politeness"` is not a valid ARIA attribute which means that `aria-live` value of the test target defaults to "off". + +```html +

Download time in seconds

+10 +``` + +#### Failed Example 4 + +This `p` element does not have an implicit or explicit `aria-live` value of "polite" or "assertive". + +```html +

Press Receive update to see if the button works

+ +

The button works!

+``` + +### Inapplicable + +#### Inapplicable Example 1 + +The `innerText` property of this `p` element does not change. + +```html +

This is static text

+``` + +#### Inapplicable Example 2 + +This `p` element is not included in the accessibility tree through the `display: none` property. + +```html +

10 results out of 20

+``` + [alert]: https://www.w3.org/TR/wai-aria-1.1/#alert 'Definition of alert' [ascii lowercase]: https://infra.spec.whatwg.org/#ascii-lowercase 'Definition of ASCII lowercase' @@ -73,6 +216,8 @@ This rule assumes that the [explicit role][] of the elements does not need to be [semantic role]: #semantic-role 'Definition of semantic role' [status]: https://www.w3.org/TR/wai-aria-1.1/#status 'Definition of status' [status message]: https://www.w3.org/TR/WCAG21/#dfn-status-messages +[success criterion 1.3.1 Info and Relationships]: https://www.w3.org/TR/WCAG21/#info-and-relationships +[success criterion 4.1.3 Status Messages]: https://www.w3.org/TR/WCAG21/#status-messages [text node]: https://dom.spec.whatwg.org/#text [timer]: https://www.w3.org/TR/wai-aria-1.1/#timer 'Definition of timer' [valid time string]: https://html.spec.whatwg.org/#valid-time-string 'Definition of valid time string' From 2b7ae9c84f49581ae31126f3df9913c1f57ce544 Mon Sep 17 00:00:00 2001 From: ajanec01 Date: Wed, 19 May 2021 16:47:41 +0100 Subject: [PATCH 5/7] updating examples --- _rules/status-text-has-aria-live-mogq50.md | 455 +++++++++++++++++---- 1 file changed, 376 insertions(+), 79 deletions(-) diff --git a/_rules/status-text-has-aria-live-mogq50.md b/_rules/status-text-has-aria-live-mogq50.md index 6860a3246bd..597e54138e4 100644 --- a/_rules/status-text-has-aria-live-mogq50.md +++ b/_rules/status-text-has-aria-live-mogq50.md @@ -3,7 +3,7 @@ id: mogq50 name: 'Status text update has `aria-live` property' rule_type: atomic description: | - This rule checks that any text update that meets the definition of a status message has `aria-live` property. + This rule checks that any text update that meets the definition of a status message has either "polite" or "assertive" `aria-live` property. accessibility_requirements: wcag21:4.1.3: # Status Messages (AA) forConformance: true @@ -31,26 +31,28 @@ input_aspects: - Accessibility Tree acknowledgments: authors: - - Aron Janecki - - Jean-Yves Moyen + - aron janecki + - jean-yves moyen --- ## Applicability -This rule applies to any [HTML element][] that has a [text node][] as a direct [descendant][] in the [flat tree][] if: +This rule applies to any [HTML element][] that has a [text node][] as a [descendant][] in the [flat tree][] if all of the following are true: -- **changed**: the `innerText` property of the element changes; and -- **available**: the [text node][] is [included in the accessibility tree][]. +- **available**: the element is [included in the accessibility tree][]; and +- **change**: the element or its [text node][] value is an [event originated change in the content][]. ## Expectation -Each test target has an implicit or explicit `aria-live` value of "assertive" or "polite". +There exists at least one test target with an implicit or explicit `aria-live` value of "assertive" or "polite" for [event originated changes in the content][event originated change in the content] that communicate the same message. ## Assumptions The text changes meet the definition of [status message][]. If this is not the case, success criterion [4.1.3 Status Messages][success criterion 4.1.3 status messages] may be satisfied even if this rule failed. -This rule assumes that the [explicit role][] of the elements does not need to be appropriate to satisfy success criterion [4.1.3 Status Messages][success criterion 4.1.3 status messages]. For example, using `role="alert"` on elements with score updates may be of concern for success criterion [1.3.1 Info and Relationships][success criterion 1.3.1 info and relationships] because the `role="status"` appears to be more appropriate in such a context. However, the inappropriate role does not prevent the `aria-live` property from being programmatically identifiable . +This rule assumes that the [explicit role][] of the elements does not need to be appropriate to satisfy success criterion [4.1.3 Status Messages][success criterion 4.1.3 status messages]. For example, using `role="alert"` on elements with score updates may be of concern for success criterion [1.3.1 Info and Relationships][success criterion 1.3.1 info and relationships] because the `role="status"` appears to be more appropriate in such a context. + +This rule assumes that the changes happen within a 1 minute time span after the event firing and therefore the comparison between the page before and after the [event](https://dom.spec.whatwg.org/#concept-event) [firing](https://dom.spec.whatwg.org/#concept-event-fire) can be made at any time after that time span elapses. If there are changes after this time span, they may not be detected as [changes in content][event originated change in the content] and the rule may pass but [success criterion 4.1.3 Status Messages][] is not satisfied. The arbitrary 1 minute time span, selected so that testing this rule would not be impractical, is not included in WCAG. ## Accessibility Support @@ -68,130 +70,431 @@ There exists a known combination of operating system and browsers that do not sp #### Passed Example 1 -This `div` element with `role="alert"` has an implicit `aria-live` value of "assertive". +The `p` element that appears after activating submit button with no value for the first name field has `role="alert"`. `role="alert"` has an implicit `aria-live` value of "assertive". ```html - -
Error: First name field must not be blank
+ + + + + + ``` #### Passed Example 2 -This `div` element with `role="status"` has an implicit `aria-live` value of "polite". +This `p` element with `role="status"` has an implicit `aria-live` value of "polite". ```html -
10 results out of 20
+ + +

Found phrases: 0

+ + + +
+

+ "When appropriate roles or properties are assigned to status messages, the new content is spoken by screen readers + in such a way as to assist blind and low vision users. Most sighted users can observe text peripherally added to the + viewport. Such content provides additional information without affecting the user's current point of regard. The + ability of an assistive technology to announce such new important text content allows more users to benefit from an + awareness of the information in an equivalent manner." +

+
+ + ``` #### Passed Example 3 -This `div` element with `role="timer"` has an explicit `aria-live` value of "polite". The `aria-live="polite"` overwrites the implicit value of "off" for elements with `role="timer"`. +The `p` element with `role="timer"` that appears after activating the "Download" `button` has an explicit `aria-live` value of "polite". `aria-live="polite"` overwrites the implicit value of "off" for elements with `role="timer"`. ```html -

Download time in seconds

-10 + + + + + ``` #### Passed Example 4 -This `div` element with `role="log"` has an implicit `aria-live` value of "polite". The `aria-live="polite"` overwrites the implicit value of "off" for elements with `role="timer"`. +This `div` element with `role="log"` has an implicit `aria-live` value of "polite". ```html -
-

Notifications panel

- -
    -
  • Notification 2 out of 2
  • -
  • Notification 1 out of 2
  • -
-
+ +
+

Notifications panel

+
+ + + ``` #### Passed Example 5 -This `div` element with `role="marquee"` has an implicit `aria-live` value of "off". Pressing the Activate Updates control changes the implicit value to "polite". +This `div` element with `role="marquee"` has an implicit `aria-live` value of "off". Pressing the Activate Updates control gives the element the explicit value of "polite". ```html -

Stock tickers website

- -

Press Activate Updates to receive live updates of stock values

- - -
- - - - - - - - - - - - - - - - - -
Company symbolLast price
Comp10.675
Comp20.543
-
+ + + +

Stock tickers website

+ +

Press Activate Updates to receive live updates of stock values

+ + + +
+ + + + + + + + + + + + + + + + + +
Company symbolLast price
Comp10.675
Comp20.543
+
+ + + + ``` #### Passed Example 6 -This `p` element has explicit `aria-live` value of "polite". +This `div` element has explicit `aria-live` value of "assertive". ```html -

Press Receive update to see if the button works

- -

The button works!

+ +
+ + ``` ### Failed #### Failed Example 1 -This `div` element does not have implicit or explicit `aria-live` value of "polite" or "assertive" because the `role` attribute value is not a valid semantic role. +The `p` element that appears after activating submit button with no value for the first name field does not have implicit or explicit `aria-live` value of "polite" or "assertive". `role="alert"` is not a valid ARIA attribute. ```html -
Error: First name field must not be blank
+ + + ``` #### Failed Example 2 -This `p` element does not have an implicit or explicit `aria-live` value of "polite" or "assertive". +This `p` element, that changes its value in response to a search query, does not have an implicit or explicit `aria-live` value of "polite" or "assertive". ```html -

10 results out of 20

+ + + +

Found phrases: 0

+ +
+

+ "When appropriate roles or properties are assigned to status messages, the new content is spoken by screen readers + in such a way as to assist blind and low vision users. Most sighted users can observe text peripherally added to the + viewport. Such content provides additional information without affecting the user's current point of regard. The + ability of an assistive technology to announce such new important text content allows more users to benefit from an + awareness of the information in an equivalent manner." +

+
+ + ``` #### Failed Example 3 -This `div` element with `role="timer"` has an implicit `aria-live` value of "off". The `aria-live="politeness"` is not a valid ARIA attribute which means that `aria-live` value of the test target defaults to "off". +The `p` element with `role="timer"` that appears after activating the "Download" `button` has an implicit `aria-live` value of "off". The `aria-live="politeness"` is not a valid ARIA attribute which means that `aria-live` value of the test target defaults to "off". ```html -

Download time in seconds

-10 + + + ``` #### Failed Example 4 -This `p` element does not have an implicit or explicit `aria-live` value of "polite" or "assertive". +This `div` element does not have an implicit or explicit `aria-live` value of "polite" or "assertive". ```html -

Press Receive update to see if the button works

- -

The button works!

+ +
+ + ``` ### Inapplicable #### Inapplicable Example 1 -The `innerText` property of this `p` element does not change. +This `p` element is not an [event originated change in the content][]. ```html

This is static text

@@ -202,22 +505,16 @@ The `innerText` property of this `p` element does not change. This `p` element is not included in the accessibility tree through the `display: none` property. ```html -

10 results out of 20

+

10 results out of 20

``` -[alert]: https://www.w3.org/TR/wai-aria-1.1/#alert 'Definition of alert' -[ascii lowercase]: https://infra.spec.whatwg.org/#ascii-lowercase 'Definition of ASCII lowercase' - -[timer][https://www.w3.org/tr/wai-aria-1.1/#timer] +[event originated change in the content]: https://act-rules.github.io/glossary/#changes-in-content 'Definition of changes in content' +[explicit role]: https://act-rules.github.io/glossary/#explicit-role 'Definition of explicit semantic role' [descendant]: https://dom.spec.whatwg.org/#concept-tree-descendant [flat tree]: https://drafts.csswg.org/css-scoping/#flat-tree 'Definition of flat tree' -[HTML element]: https://html.spec.whatwg.org/multipage/dom.html#htmlelement +[html element]: https://html.spec.whatwg.org/multipage/dom.html#htmlelement [included in the accessibility tree]: #included-in-the-accessibility-tree 'Definition of included in the accessibility tree' -[semantic role]: #semantic-role 'Definition of semantic role' -[status]: https://www.w3.org/TR/wai-aria-1.1/#status 'Definition of status' [status message]: https://www.w3.org/TR/WCAG21/#dfn-status-messages -[success criterion 1.3.1 Info and Relationships]: https://www.w3.org/TR/WCAG21/#info-and-relationships -[success criterion 4.1.3 Status Messages]: https://www.w3.org/TR/WCAG21/#status-messages +[success criterion 1.3.1 info and relationships]: https://www.w3.org/TR/WCAG21/#info-and-relationships +[success criterion 4.1.3 status messages]: https://www.w3.org/TR/WCAG21/#status-messages [text node]: https://dom.spec.whatwg.org/#text -[timer]: https://www.w3.org/TR/wai-aria-1.1/#timer 'Definition of timer' -[valid time string]: https://html.spec.whatwg.org/#valid-time-string 'Definition of valid time string' From 8c7321847dca7dc56bba93321ff26fe28365dd92 Mon Sep 17 00:00:00 2001 From: ajanec01 Date: Thu, 20 May 2021 09:36:46 +0100 Subject: [PATCH 6/7] expanding expectation --- _rules/status-text-has-aria-live-mogq50.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/_rules/status-text-has-aria-live-mogq50.md b/_rules/status-text-has-aria-live-mogq50.md index 597e54138e4..f440fe9fdfb 100644 --- a/_rules/status-text-has-aria-live-mogq50.md +++ b/_rules/status-text-has-aria-live-mogq50.md @@ -40,12 +40,16 @@ acknowledgments: This rule applies to any [HTML element][] that has a [text node][] as a [descendant][] in the [flat tree][] if all of the following are true: - **available**: the element is [included in the accessibility tree][]; and -- **change**: the element or its [text node][] value is an [event originated change in the content][]. +- **change**: the element or its [descendant][] [text node][] value is an [event originated change in the content][]. -## Expectation +## Expectation 1 There exists at least one test target with an implicit or explicit `aria-live` value of "assertive" or "polite" for [event originated changes in the content][event originated change in the content] that communicate the same message. +## Expectation 2 + +The [HTML element][] with an implicit or explicit `aria-live` value of "assertive" or "polite" is an [ancestor][] in the [flat tree][] of the [HTML element][] or [text node][] that [changes][event originated change in the content]. + ## Assumptions The text changes meet the definition of [status message][]. If this is not the case, success criterion [4.1.3 Status Messages][success criterion 4.1.3 status messages] may be satisfied even if this rule failed. @@ -508,6 +512,7 @@ This `p` element is not included in the accessibility tree through the `display:

10 results out of 20

``` +[ancestor]: https://dom.spec.whatwg.org/#concept-tree-ancestor 'Definition of ancestor' [event originated change in the content]: https://act-rules.github.io/glossary/#changes-in-content 'Definition of changes in content' [explicit role]: https://act-rules.github.io/glossary/#explicit-role 'Definition of explicit semantic role' [descendant]: https://dom.spec.whatwg.org/#concept-tree-descendant From 7a33ec5281829ee9b8f0714fd53ccdadbedb3644 Mon Sep 17 00:00:00 2001 From: ajanec01 Date: Tue, 15 Jun 2021 15:08:37 +0100 Subject: [PATCH 7/7] changing applicability and expectation --- _rules/status-text-has-aria-live-mogq50.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/_rules/status-text-has-aria-live-mogq50.md b/_rules/status-text-has-aria-live-mogq50.md index f440fe9fdfb..87f1b7e5144 100644 --- a/_rules/status-text-has-aria-live-mogq50.md +++ b/_rules/status-text-has-aria-live-mogq50.md @@ -3,7 +3,7 @@ id: mogq50 name: 'Status text update has `aria-live` property' rule_type: atomic description: | - This rule checks that any text update that meets the definition of a status message has either "polite" or "assertive" `aria-live` property. + This rule checks that any status message update has either "polite" or "assertive" `aria-live` property. accessibility_requirements: wcag21:4.1.3: # Status Messages (AA) forConformance: true @@ -37,18 +37,18 @@ acknowledgments: ## Applicability -This rule applies to any [HTML element][] that has a [text node][] as a [descendant][] in the [flat tree][] if all of the following are true: +This rule applies to any [text node][] that is a [descendant][] of the [HTML element][] in the [flat tree][] if the [text node][] is [included in the accessibility tree][] and at least one of the following is true: -- **available**: the element is [included in the accessibility tree][]; and -- **change**: the element or its [descendant][] [text node][] value is an [event originated change in the content][]. +- **change**: the [text node][]'s [ancestor][]'s `innerText` property is changing; or +- **create**: the [text node][]'s [ancestor][] is either [appended](https://dom.spec.whatwg.org/#concept-node-append) or [inserted](https://dom.spec.whatwg.org/#concept-node-insert); or +- **replaced**: the [text node][]'s [ancestor][] was [replaced](https://dom.spec.whatwg.org/#concept-node-replace). -## Expectation 1 +## Expectation -There exists at least one test target with an implicit or explicit `aria-live` value of "assertive" or "polite" for [event originated changes in the content][event originated change in the content] that communicate the same message. +For each test target at least one of the following is true: -## Expectation 2 - -The [HTML element][] with an implicit or explicit `aria-live` value of "assertive" or "polite" is an [ancestor][] in the [flat tree][] of the [HTML element][] or [text node][] that [changes][event originated change in the content]. +- the test target has an accessible object as an ancestor in the accessibility tree with an implicit or explicit `aria-live` value of "assertive" or "polite"; or +- there is a text node with an equivalent message that has an accessible object as an ancestor in the accessibility tree with an implicit or explicit `aria-live` value of "assertive" or "polite". ## Assumptions @@ -513,9 +513,9 @@ This `p` element is not included in the accessibility tree through the `display: ``` [ancestor]: https://dom.spec.whatwg.org/#concept-tree-ancestor 'Definition of ancestor' +[descendant]: https://dom.spec.whatwg.org/#concept-tree-descendant [event originated change in the content]: https://act-rules.github.io/glossary/#changes-in-content 'Definition of changes in content' [explicit role]: https://act-rules.github.io/glossary/#explicit-role 'Definition of explicit semantic role' -[descendant]: https://dom.spec.whatwg.org/#concept-tree-descendant [flat tree]: https://drafts.csswg.org/css-scoping/#flat-tree 'Definition of flat tree' [html element]: https://html.spec.whatwg.org/multipage/dom.html#htmlelement [included in the accessibility tree]: #included-in-the-accessibility-tree 'Definition of included in the accessibility tree'