Skip to content

Commit

Permalink
Merge branch 'develop' into giacomo-petri-cjk-languages
Browse files Browse the repository at this point in the history
  • Loading branch information
Jym77 authored Nov 30, 2023
2 parents 8b1c88a + d703022 commit 03cf3d3
Show file tree
Hide file tree
Showing 38 changed files with 605 additions and 332 deletions.
3 changes: 3 additions & 0 deletions __tests__/spelling-ignore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@
- reflow
- Viewport
- dom-meta-content
- showModal

# Unsure why the dictionary does not have these words
- programmatically
Expand Down Expand Up @@ -267,6 +268,8 @@
- 2px
- 3px
- 4px
- 10px
- 15px
- 16px
- 20px
- 24px
Expand Down
2 changes: 1 addition & 1 deletion _rules/aria-hidden-no-focusable-content-6cfa84.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ The 1 second time span introduced in the exception of the definition of [focusab

### Related rules

- [Element with presentational children has no focusable content](https://www.w3.org/WAI/standards-guidelines/act/rules/307n5z/proposed/)
- [Element with presentational children has no focusable content](https://www.w3.org/WAI/standards-guidelines/act/rules/307n5z/)

### Bibliography

Expand Down
2 changes: 1 addition & 1 deletion _rules/aria-state-or-property-permitted-5c01ea.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Assessing the value of the attribute is out of scope for this rule.

### Related rules

- [ARIA state or property has valid value](https://www.w3.org/WAI/standards-guidelines/act/rules/6a7281/proposed/)
- [ARIA state or property has valid value](https://www.w3.org/WAI/standards-guidelines/act/rules/6a7281/)

### Bibliography

Expand Down
4 changes: 3 additions & 1 deletion _rules/aria-state-or-property-valid-value-6a7281.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ This rule does not require the target of an `ID Reference` to exist. This is bec

### Related rules

- [ARIA state or property is permitted](https://www.w3.org/WAI/standards-guidelines/act/rules/5c01ea/proposed/)
- [ARIA state or property is permitted](https://www.w3.org/WAI/standards-guidelines/act/rules/5c01ea/)
- [ARIA required ID references exist](https://www.w3.org/WAI/standards-guidelines/act/rules/in6db8/)

### Bibliography

Expand Down Expand Up @@ -244,3 +245,4 @@ The `aria-hidden` attribute is not on an [HTML or SVG element][].
[html or svg element]: #namespaced-element
[value type]: https://www.w3.org/TR/wai-aria-1.2/#propcharacteristic_value
[wai-aria state or property]: https://www.w3.org/TR/wai-aria-1.2/#state_prop_def
[attribute value]: #attribute-value
4 changes: 4 additions & 0 deletions _rules/attr-not-duplicated-e6952f.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ htmlHintIgnore:
# https://www.npmjs.com/package/htmlhint
# (used with `npm test` to ensure validity of code snippets)
- 'attr-no-duplication'
deprecated: |
This rule has been deprecated because success criterion 4.1.1 has
been removed in WCAG 2.2 and for WCAG 2.1 and 2.0 should be
considered to always pass.
---

## Applicability
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ This rule applies to any `audio` or `video` element for which all the following

For each test target, the [outcome](#outcome) of at least one of the following rules is passed:

- [Audio Or Video That Plays Automatically Has A Control Mechanism](https://www.w3.org/WAI/standards-guidelines/act/rules/4c31df/proposed/)
- [Audio Or Video That Plays Automatically Has No Audio That Lasts More Than 3 Seconds](https://www.w3.org/WAI/standards-guidelines/act/rules/aaa1bf/proposed/)
- [Audio Or Video That Plays Automatically Has A Control Mechanism](https://www.w3.org/WAI/standards-guidelines/act/rules/4c31df/)
- [Audio Or Video That Plays Automatically Has No Audio That Lasts More Than 3 Seconds](https://www.w3.org/WAI/standards-guidelines/act/rules/aaa1bf/)

## Assumptions

Expand Down
4 changes: 2 additions & 2 deletions _rules/audio-text-alternative-e7aa44.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ This rule applies to any [non-streaming](#non-streaming-media-element) `audio` e

For each test target, the [outcome](#outcome) of at least one of the following rules is passed:

- [`Audio` Element Content Has Transcript](https://www.w3.org/WAI/standards-guidelines/act/rules/2eb176/proposed/)
- [`Audio` Element Content Is Media Alternative For Text](https://www.w3.org/WAI/standards-guidelines/act/rules/afb423/proposed/)
- [`Audio` Element Content Has Transcript](https://www.w3.org/WAI/standards-guidelines/act/rules/2eb176/)
- [`Audio` Element Content Is Media Alternative For Text](https://www.w3.org/WAI/standards-guidelines/act/rules/afb423/)

## Assumptions

Expand Down
8 changes: 4 additions & 4 deletions _rules/bypass-blocks-cf77f2.md
Original file line number Diff line number Diff line change
Expand Up @@ -506,12 +506,12 @@ This [document][] is not an [HTML web page][].
```

[block of content]: #block-of-content 'Definition of Block of Content'
[block collapsible]: https://www.w3.org/WAI/standards-guidelines/act/rules/3e12e1/proposed/ 'Rule Block of Repeated Content is Collapsible'
[block collapsible]: https://www.w3.org/WAI/standards-guidelines/act/rules/3e12e1/ 'Rule Block of Repeated Content is Collapsible'
[block of repeated content]: #block-of-repeated-content 'Definition of Block of Repeated Content'
[document]: https://dom.spec.whatwg.org/#concept-document 'DOM definition of Document'
[document has landmark]: https://www.w3.org/WAI/standards-guidelines/act/rules/b40fd1/proposed/ 'Rule Document Has a Landmark with Non-Repeated Content'
[document has instrument to main]: https://www.w3.org/WAI/standards-guidelines/act/rules/ye5d6e/proposed/ 'Rule Document Has an Instrument to Move Focus to Non-Repeated Content'
[document has heading for main]: https://www.w3.org/WAI/standards-guidelines/act/rules/047fe0/proposed/ 'Rule Document Has Heading for Non-Repeated Content'
[document has landmark]: https://www.w3.org/WAI/standards-guidelines/act/rules/b40fd1/ 'Rule Document Has a Landmark with Non-Repeated Content'
[document has instrument to main]: https://www.w3.org/WAI/standards-guidelines/act/rules/ye5d6e/ 'Rule Document Has an Instrument to Move Focus to Non-Repeated Content'
[document has heading for main]: https://www.w3.org/WAI/standards-guidelines/act/rules/047fe0/ 'Rule Document Has Heading for Non-Repeated Content'
[focusable]: #focusable 'Definition of Focusable'
[html web page]: #web-page-html 'Definition of Web Page (HTML)'
[included in the accessibility tree]: #included-in-the-accessibility-tree 'Definition of Included in the Accessibility Tree'
Expand Down
4 changes: 2 additions & 2 deletions _rules/focusable-no-keyboard-trap-80af7b.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ This rule applies to any [HTML or SVG element][] that is [focusable][].

For each test target, the [outcome](#outcome) of at least one of the following rules is "passed":

- [Focusable Element Has No Keyboard Trap Via Standard Navigation](https://www.w3.org/WAI/standards-guidelines/act/rules/a1b64e/proposed/)
- [Focusable Element Has No Keyboard Trap Via Non-Standard Navigation](https://www.w3.org/WAI/standards-guidelines/act/rules/ebe86a/proposed/)
- [Focusable Element Has No Keyboard Trap Via Standard Navigation](https://www.w3.org/WAI/standards-guidelines/act/rules/a1b64e/)
- [Focusable Element Has No Keyboard Trap Via Non-Standard Navigation](https://www.w3.org/WAI/standards-guidelines/act/rules/ebe86a/)

## Assumptions

Expand Down
32 changes: 15 additions & 17 deletions _rules/heading-descriptive-b49b2e.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,15 @@ This rule applies to any [semantic][semantic role] `heading` element that is [in

## Expectation

Each target element describes the topic or purpose of the first [perceivable content][] after the test target that is not [decorative][].
Each target element describes the topic or purpose of the first [perceivable content][] after the test target that is not [decorative][]. The order of elements is determined by the [flat tree][].

The order of elements is determined by the [flat tree][].

**Note:** Headings do not need to be lengthy. A word, or even a single character, may suffice.
**Note:** Headings do not need to be lengthy. A word, or even a single character, may be sufficient.

## Assumptions

This rule assumes that the [flat tree][] order is close to the reading order, as elements are rendered on the page. Due to positioning, it is possible to render a document in an order that greatly differs from the tree order, in which case the content which is visually associated with a heading might not be the content following it in tree order and this rule might fail while [Success Criterion 2.4.6 Headings and Label][sc246] is still satisfied.
This rule assumes that the [flat tree][] order is close to the reading order as elements are rendered on the page. Due to positioning, it is possible to render a document in an order that greatly differs from the tree order, in which case the content which is visually associated with a heading might not be the content following it in tree order and this rule might fail while [Success Criterion 2.4.6 Headings and Label][sc246] is still satisfied.

This rule also assumes that the content the heading is intended to describe is [visible][] and not hidden from AT. Otherwise, cases such as expandable content using a heading might fail this rule while [Success Criterion 2.4.6 Headings and Label][sc246] is still satisfied.
This rule also assumes that the content the heading is intended to describe is [visible][] and not hidden from assistive technologies. Otherwise, cases such as expandable content using a heading might fail this rule while [Success Criterion 2.4.6 Headings and Label][sc246] is still satisfied.

## Accessibility Support

Expand All @@ -66,7 +64,7 @@ Headings that are visible but not in the accessibility tree are a failure of [Su

#### Passed Example 1

Heading marked up with `h1` element that describes the topic or purpose of the following [perceivable content][].
This `h1` heading element describes the topic of the following paragraph.

```html
<html lang="en">
Expand All @@ -77,7 +75,7 @@ Heading marked up with `h1` element that describes the topic or purpose of the f

#### Passed Example 2

Heading marked up with `role="heading"` that describes the topic or purpose of the following [perceivable content][].
This heading marked up with an [explicit role][] of `heading` describes the topic of the following paragraph.

```html
<html lang="en">
Expand All @@ -88,7 +86,7 @@ Heading marked up with `role="heading"` that describes the topic or purpose of t

#### Passed Example 3

Heading marked up with `h1` element with an image that describes the topic or purpose of the following [perceivable content][].
This `h1` heading element with an image describes the topic of the following paragraph.

```html
<html lang="en">
Expand All @@ -101,7 +99,7 @@ Heading marked up with `h1` element with an image that describes the topic or pu

#### Passed Example 4

Heading marked up with `h1` element that is a single character that describes the topic or purpose of the following [perceivable content][].
This `h1` heading element has a single character text that describes the topic of the following description list.

```html
<html lang="en">
Expand All @@ -121,7 +119,7 @@ Heading marked up with `h1` element that is a single character that describes th

#### Passed Example 5

Heading marked up with `role="heading"` that describes the topic or purpose of the following [perceivable content][]. The heading is positioned off screen but is [included in the accessibility tree][].
This heading marked up with an [explicit role][] of `heading` describes the topic of the following paragraph. The heading is positioned off screen but is [included in the accessibility tree][].

```html
<html lang="en">
Expand All @@ -148,7 +146,7 @@ This heading describes the first [perceivable content][] after it (the first `p`

#### Failed Example 1

Heading marked up with `h1` element that does not describe the topic or purpose of the following [perceivable content][].
This `h1` heading element does not describes the topic of the following paragraph.

```html
<html lang="en">
Expand All @@ -159,7 +157,7 @@ Heading marked up with `h1` element that does not describe the topic or purpose

#### Failed Example 2

Heading marked up with `role="heading"` that does not describe the topic or purpose of the following [perceivable content][].
This heading marked up with an [explicit role][] of `heading` does not describe the topic of the following paragraph.

```html
<html lang="en">
Expand All @@ -170,7 +168,7 @@ Heading marked up with `role="heading"` that does not describe the topic or purp

#### Failed Example 3

Heading marked up with `role="heading"` that does not describe the topic or purpose of the following [perceivable content][]. The heading is positioned off screen but is [included in the accessibility tree][].
This heading marked up with an [explicit role][] of `heading` does not describe the topic of the following paragraph. The heading is positioned off screen but is [included in the accessibility tree][].

```html
<html lang="en">
Expand All @@ -183,7 +181,7 @@ Heading marked up with `role="heading"` that does not describe the topic or purp

#### Failed Example 4

This heading does not describe the first [perceivable content][] after it (the first `p` element). The next [perceivable content][] (the second `p` element) is not considered by this rule.
This `h1` heading element does not describe the first [perceivable content][] after it (the first `p` element). The next [perceivable content][] (the second `p` element) is not considered by this rule.

```html
<html lang="en">
Expand All @@ -207,7 +205,7 @@ There is no heading.

#### Inapplicable Example 2

Heading is not [included in the accessibility tree][].
This `h1` heading element is not [included in the accessibility tree][].

```html
<html lang="en">
Expand All @@ -218,7 +216,7 @@ Heading is not [included in the accessibility tree][].

#### Inapplicable Example 3

`h1` element has an empty [accessible name][].
This `h1` heading element has an empty [accessible name][].

```html
<html lang="en">
Expand Down
9 changes: 3 additions & 6 deletions _rules/heading-non-empty-accessible-name-ffd0e9.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,20 @@ rule_type: atomic
description: |
This rule checks that each heading has a non-empty accessible name.
accessibility_requirements:
wcag20:1.3.1: # Info and Relationships (A)
aria12:namecalculation:
title: ARIA 1.2,5.2.8 Accessible Name Calculation
forConformance: true
failed: not satisfied
passed: further testing needed
inapplicable: further testing needed
wcag-technique:H42: # Using h1-h6 to identify headings
forConformance: false
failed: not satisfied
passed: further testing needed
inapplicable: further testing needed
input_aspects:
- Accessibility Tree
- DOM Tree
- CSS Styling
acknowledgments:
authors:
- Jean-Yves Moyen
- Wilco Fiers
funding:
- WAI-Tools
---
Expand Down
2 changes: 1 addition & 1 deletion _rules/html-page-lang-b5c3f8.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ There are no accessibility support issues known.
### Related rules

- [HTML page `lang` attribute has valid language tag](https://www.w3.org/WAI/standards-guidelines/act/rules/bf051a/)
- [HTML page language subtag matches default language](https://www.w3.org/WAI/standards-guidelines/act/rules/ucwvc8/proposed/)
- [HTML page language subtag matches default language](https://www.w3.org/WAI/standards-guidelines/act/rules/ucwvc8/)

### Bibliography

Expand Down
2 changes: 1 addition & 1 deletion _rules/html-page-lang-matches-default-ucwvc8.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ There are no accessibility support issues known.
### Related rules

- [HTML page has `lang` attribute](https://www.w3.org/WAI/standards-guidelines/act/rules/b5c3f8/)
- [HTML page `lang` attribute has valid language tag](https://www.w3.org/WAI/standards-guidelines/act/rules/bf051a/proposed/)
- [HTML page `lang` attribute has valid language tag](https://www.w3.org/WAI/standards-guidelines/act/rules/bf051a/)

### Bibliography

Expand Down
2 changes: 1 addition & 1 deletion _rules/html-page-lang-valid-bf051a.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ This rule is only applicable to non-embedded HTML pages. HTML pages embedded int
### Related rules

- [HTML page has `lang` attribute](https://www.w3.org/WAI/standards-guidelines/act/rules/b5c3f8/)
- [HTML page language subtag matches default language](https://www.w3.org/WAI/standards-guidelines/act/rules/ucwvc8/proposed/)
- [HTML page language subtag matches default language](https://www.w3.org/WAI/standards-guidelines/act/rules/ucwvc8/)

### Bibliography

Expand Down
2 changes: 1 addition & 1 deletion _rules/html-page-lang-xml-lang-match-5b7ae0.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
id: 5b7ae0
name: DEPRECATED — HTML page lang and xml:lang attributes have matching values
name: HTML page lang and xml:lang attributes have matching values
rule_type: atomic
description: |
This rule checks that both `lang` and `xml:lang` attributes on the root element of a non-embedded HTML page, have the same primary language subtag.
Expand Down
2 changes: 1 addition & 1 deletion _rules/html-page-non-empty-title-2779a5.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ This rule is only applicable to non-embedded HTML pages. HTML pages embedded int

### Related rules

- [HTML page title is descriptive](https://www.w3.org/WAI/standards-guidelines/act/rules/c4a8a4/proposed/)
- [HTML page title is descriptive](https://www.w3.org/WAI/standards-guidelines/act/rules/c4a8a4/)

### Bibliography

Expand Down
4 changes: 4 additions & 0 deletions _rules/id-value-unique-3ea0c8.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ htmlHintIgnore:
# https://www.npmjs.com/package/htmlhint
# (used with `npm test` to ensure validity of code snippets)
- 'id-unique'
deprecated: |
This rule has been deprecated because success criterion 4.1.1 has
been removed in WCAG 2.2 and for WCAG 2.1 and 2.0 should be
considered to always pass.
---

## Applicability
Expand Down
1 change: 1 addition & 0 deletions _rules/iframe-non-empty-accessible-name-cae760.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,3 +162,4 @@ This `iframe` element has an [explicit semantic role][] of `none`.
[sequential focus navigation]: https://html.spec.whatwg.org/multipage/interaction.html#sequential-focus-navigation
[user interface component]: https://www.w3.org/TR/WCAG21/#dfn-user-interface-components
[whitespace]: #whitespace 'Definition of whitespace'
[explicit semantic role]: #explicit-role 'Definition of explicit semantic role'
36 changes: 35 additions & 1 deletion _rules/iframe-with-interactive-content-in-tab-order-akn7bn.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ acknowledgments:

## Applicability

This rule applies to any `iframe` element that [contains](#akn7bn:contain) at least one element for which all the following are true:
This rule applies to any `iframe` element that is not [inert][] and that [contains](#akn7bn:contain) at least one element for which all the following are true:

- the element is [visible][]; and
- the element is part of the [sequential focus navigation order][] of the `iframe`'s [document][].
Expand Down Expand Up @@ -122,10 +122,44 @@ This `iframe` element contains a link that is not part of its [sequential focus
<iframe tabindex="-1" srcdoc="<a href='/' tabindex='-1'>Home</a>"></iframe>
```

#### Inapplicable Example 5

This `iframe` element is [inert][] because of its own `inert` [attribute value][].

```html
<iframe tabindex="-1" inert srcdoc="<a href='/'>Home</a>"></iframe>
```

#### Inapplicable Example 6

Once the "Privacy policy details" button is activated, the `iframe` element becomes [inert][] because of the showModal() method, which causes the `iframe` to be [blocked by a modal].

```html
<iframe id="myFrame" title="Links" srcdoc="<a href='/'>Home</a>"></iframe>
<div>
<button id="ppButton" onclick="openDialog()">Privacy policy details</button>
</div>
<dialog id="ppDialog" aria-labelledby="dialogLabel">
<h2 id="dialogLabel">Privacy Policy</h2>
<p>We store no data.</p>
<button id="cancel" onclick="ppDialog.close()">Cancel</button>
</dialog>
<script>
const openDialog = () => {
ppDialog.showModal();
myFrame.tabIndex = '-1'
}
ppDialog.addEventListener('close', () => myFrame.tabIndex = 0)
window.addEventListener('DOMContentLoaded', openDialog);
</script>
```

[attribute value]: #attribute-value 'Definition of Attribute Value'
[blocked by a modal]: https://html.spec.whatwg.org/multipage/interaction.html#blocked-by-a-modal-dialog
[container document]: https://html.spec.whatwg.org/#bc-container-document 'HTML browsing context container document, 2020/12/18'
[document]: https://html.spec.whatwg.org/multipage/dom.html#document 'HTML definition of document'
[flattened tabindex-ordered focus navigation scope]: https://html.spec.whatwg.org/multipage/interaction.html#flattened-tabindex-ordered-focus-navigation-scope 'HTML - Living Standard, 2022/07/08'
[inert]: #inert 'Definition of Inert'
[nested browsing context]: https://html.spec.whatwg.org/#nested-browsing-context 'HTML nested browsing context, 2020/12/18'
[owner document]: https://dom.spec.whatwg.org/#dom-node-ownerdocument 'DOM node owner document property, 2020/12/18'
[sc211]: https://www.w3.org/TR/WCAG21/#keyboard 'WCAG 2.1 Success criterion 2.1.1 Keyboard'
Expand Down
2 changes: 0 additions & 2 deletions _rules/image-button-non-empty-accessible-name-59796f.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ Each target element has an [accessible name][] that is neither empty (`""`), nor

## Accessibility Support

_There are no major accessibility support issues known for this rule._

The [input type="image" Accessible Name Computation algorithm](https://www.w3.org/TR/html-aam/#input-type-image-accessible-name-computation) uses the first non-empty name, but some user agents and assistive technologies combinations stop at the first existing one, even if empty.

## Background
Expand Down
Loading

0 comments on commit 03cf3d3

Please sign in to comment.