Skip to content

Commit

Permalink
Merge branch 'act-rules:develop' into issue-1910
Browse files Browse the repository at this point in the history
  • Loading branch information
tombrunet authored Nov 21, 2024
2 parents bae682a + c5cb1ad commit c356b12
Show file tree
Hide file tree
Showing 27 changed files with 930 additions and 2,981 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/chair-accounts.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
WilcoFiers
daniel-montalvo
tbostic32
kengdoj
kengdoj
6 changes: 6 additions & 0 deletions __tests__/spelling-ignore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@
# Notes and acronyms
- TODO
- TBD
- CJK

# Tool and library names
- axe-core
Expand Down Expand Up @@ -237,12 +238,17 @@
- focusability
- unitless
- luminance
- disambiguated
- grey

# Parts of Unicode
- 000A
- 000B
- 000C
- 000D
- 4E00
- 9FFF
- 4E00–9FFF

# JSON attributes/ metadata/ methods
- testcases
Expand Down
2 changes: 1 addition & 1 deletion __tests__/spelling.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ function getCuratedMarkdownBody(body, options = {}) {
* @returns {String[]}
*/
function getSpellIgnored() {
const ignoreConfigured = yaml.safeLoad(fs.readFileSync('./__tests__/spelling-ignore.yml', 'utf8'))
const ignoreConfigured = yaml.safeLoad(fs.readFileSync('./__tests__/spelling-ignore.yml', 'utf8'), {schema: yaml.FAILSAFE_SCHEMA}) //added schema due to entries starting with a non-zero digit

/*
Building spelling exception in the shape FOOxxx where xxx is a number.
Expand Down
4 changes: 2 additions & 2 deletions _rules/auto-play-audio-has-control-mechanism-4c31df.md
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,8 @@ The `src` file of this `video` element has no audio output.

```html
<video autoplay>
<source src="/test-assets/rabbit-video/video-with-incorrect-voiceover.mp4" type="video/mp4" />
<source src="/test-assets/rabbit-video/video-with-incorrect-voiceover.webm" type="video/webm" />
<source src="/test-assets/rabbit-video/silent.mp4" type="video/mp4" />
<source src="/test-assets/rabbit-video/silent.webm" type="video/webm" />
</video>
```

Expand Down
16 changes: 4 additions & 12 deletions _rules/autocomplete-valid-value-73f2c2.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Each test target's `autocomplete` [attribute value][] is a [space separated][] l

The `autocomplete` attribute is used on form fields that correspond to [Input Purposes for User Interface Components](https://www.w3.org/TR/WCAG22/#input-purposes) and collect information about the user.

If the `autocomplete` attribute is used to describe "custom" taxonomy, for example using the custom autocomplete value "banner" (`<input type="text" autocomplete="banner" />`), success Criterion [1.3.5 Identify Input Purpose][sc135] may be satisfied even if this rule failed.
If the `autocomplete` attribute is used to describe "custom" taxonomy, for example using the custom autocomplete value "banner" (`<input type="text" autocomplete="banner" />`), success criterion [1.3.5 Identify Input Purpose][sc135] may be satisfied even if this rule failed.

The `aria-disabled` state is used on `input` elements which are not part of [sequential focus navigation][] and are not otherwise [operable](https://www.w3.org/TR/wai-aria-1.2/#dfn-operable). If this is not the case, this rule may be inapplicable on elements that are still operable and require a valid `autocomplete` attribute to satisfy success criterion [1.3.5 Identify Input Purpose][sc135].

Expand All @@ -56,18 +56,18 @@ The purpose of a control is programmatically identifiable even when its `autocom

- While `autocomplete` is a promising technique for supporting personalization in HTML, support for this in assistive technologies is fairly limited.
- Implementation of [Presentational Roles Conflict Resolution][] varies from one browser or assistive technology to another. Depending on this, some elements can have a [semantic role][] of `none` and fail this rule with some technology but users of other technologies would not experience any accessibility issue.
- Some user agents treat the value of the `aria-disabled` attribute as case-sensitive.
- In some user agents, querying the value of the `autocomplete` property returns an empty string ("") even when the attribute was set according to the rule's expectations. It affects assistive technologies which rely on this property to personalize input fields collecting information about the user.
- Authors may assign inappropriate `autocomplete` attribute values. Moreover, HTML specifications restrict certain `autocomplete` attribute values to specific form controls. Mismatches between `autocomplete` attribute values and form control types may or may not lead to a failure of [success criterion 1.3.5 Identify Input Purpose](https://www.w3.org/TR/WCAG22/#identify-input-purpose). However, this rule focuses exclusively on validating valid `autocomplete` attribute values, disregarding their contextual appropriateness.

## Background

The intent of this rule is to ensure that the `autocomplete` attribute can be used to support personalization. Many users may find it easier to fill out forms if those can be styled or laid out in a way that is familiar to them. Assistive technologies can do this when a form control is marked up in such a way that its purpose can be understood. For instance, assistive technologies could add familiar icons and colors to different fields, making it easier for the user to understand what the form does.

Many browsers provide auto-filling suggestions even when the control's `type` [attribute value][] is not [appropriate][appropriate field name for the form control] for its `autocomplete` [attribute value][]. The same happens when the `autocomplete` property is queried. However, the `autocomplete` property is not programmatically identifiable if the requirements for the optional tokens are not met.

The auto-completing feature of the `autocomplete` attribute benefits many users, but it is not required to satisfy success Criterion [1.3.5 Identify Input Purpose][sc135]. Setting `autocomplete="off"` on the element's [form owner](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#form-owner) prevents the user agent from completing it, but it does not prevent the `autocomplete` [attribute value][] from being programmatically identifiable.
The auto-completing feature of the `autocomplete` attribute benefits many users, but it is not required to satisfy success criterion [1.3.5 Identify Input Purpose][sc135]. Setting `autocomplete="off"` on the element's [form owner](https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#form-owner) prevents the user agent from completing it, but it does not prevent the `autocomplete` [attribute value][] from being programmatically identifiable.

The [fixed value](#73f2c2:fixed-value) condition in the Applicability is excluding `input` elements who do not consider the `autocomplete` attribute, based on their `type` [attribute value][]; `input` elements with a `type` [attribute value][] of `hidden` are excluded by the [hidden](#73f2c2:hidden) condition.
The [fixed value](#73f2c2:fixed-value) condition in the Applicability is excluding `input` elements that do not consider the `autocomplete` attribute, based on their `type` [attribute value][]; `input` elements with a `type` [attribute value][] of `hidden` are excluded by the [hidden](#73f2c2:hidden) condition.

On an `input` element with a `type` [attribute value][] of `hidden`, the autocomplete attribute wears the [autofill anchor mantle](https://html.spec.whatwg.org/#autofill-anchor-mantle), describing the meaning of the given value. In all other cases, it wears the [autofill expectation mantle](https://html.spec.whatwg.org/#autofill-expectation-mantle).

Expand Down Expand Up @@ -147,14 +147,6 @@ This `autocomplete` [attribute value][] list includes all allowed types of token

#### Passed Example 8

This `autocomplete` [attribute value][] only has the required token "bday-day". It remains programmatically identifiable even though it is inappropriate for the control's `type` [attribute value][] "tel".

```html
<label>Birthday day<input name="bdayday" type="tel" autocomplete="bday-day"/></label>
```

#### Passed Example 9

This `autocomplete` [attribute value][] has the required token "current-password", followed by the optional "webauthn" token.

```html
Expand Down
4 changes: 4 additions & 0 deletions _rules/form-field-non-empty-accessible-name-e086e5.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ accessibility_requirements:
failed: not satisfied
passed: further testing needed
inapplicable: further testing needed
wcag20:1.3.1: # Info and Relationships (A)
secondary: This success criterion is **more strict** than this rule. This is because 1.3.1 Info and Relationship requires that information, structure, and relationships conveyed through presentation can be programmatically determined or are available in text, while 4.1.2 Name, Role, Value only requires an accessible name.
wcag20:2.5.3: # Label in Name (A)
secondary: This success criterion is **more strict** than this rule. This is because 2.5.3 Label in Name requires that if a label is visible, the accessible name contains the label that is presented visually, while 4.1.2 Name, Role, Value only requires an accessible name.
input_aspects:
- Accessibility Tree
- CSS styling
Expand Down
33 changes: 29 additions & 4 deletions _rules/html-page-non-empty-title-2779a5.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ For each target element, the first [HTML][] `title` element that is a [descendan

## Assumptions

This rule assumes that [Success Criterion 2.4.2 Page Titled](https://www.w3.org/TR/WCAG22/#page-titled) does not require that a document only has one `title` element, nor that it is a child of the `head` element of a document. While this is invalid in HTML, the HTML 5.2 specification describes what should happen in case of multiple titles, and titles outside the `head` element. Because of this, neither of these validation issues causes a conformance problem for WCAG. Regardless of whether this is required by 2.4.2 Page Titled, failing this rule means the success criterion is not satisfied.
This rule assumes that [Success Criterion 2.4.2 Page Titled](https://www.w3.org/TR/WCAG22/#page-titled) does not require that a document only has one `title` element, nor that it is a child of the `head` element of a document. While this is invalid in HTML, the [HTML specification](https://html.spec.whatwg.org/multipage/dom.html#the-title-element-2) describes what should happen in case of multiple titles, and titles outside the `head` element. Because of this, neither of these validation issues causes a conformance problem for WCAG. Regardless of whether this is required by 2.4.2 Page Titled, failing this rule means the success criterion is not satisfied.

This rule assumes that the title of the page is not provided by a higher-level protocol. For example, the subject field of an email authored in HTML can provide a title without requiring a `title` element. In such a case, this rule will fail while [Success Criterion 2.4.2 Page Titled](https://www.w3.org/TR/WCAG22/#page-titled) may still be satisfied.

Expand Down Expand Up @@ -90,12 +90,16 @@ This page has a `title` element with content.

#### Passed Example 2

This page has a `title` element that serves as the title for the page and the `iframe` since the `iframe` does not have its own.
This page has a `title` element that serves as the title for the page. This rule doesn't take into account HTML pages embedded into the target document.

```html
<html>
<title>This page gives a title to an iframe</title>
<iframe src="/test-assets/sc2-4-2-title-page-without-title.html"></iframe>
<head>
<title>This page gives a title to an iframe</title>
</head>
<body>
<iframe src="/test-assets/sc2-4-2-title-page-without-title.html"></iframe>
</body>
</html>
```

Expand Down Expand Up @@ -198,6 +202,27 @@ This page has a `title` element that only contains a separator character.
</html>
```

#### Failed Example 6

This page does not have a title because the shadow root is not a [descendant](https://dom.spec.whatwg.org/#concept-tree-descendant) of the [document element](https://dom.spec.whatwg.org/#document-element).

```html
<html>
<body>
<template id="shadow-element">
<title>This is the page title</title>
</template>
<script>
const host = document.querySelector("body");
const shadow = host.attachShadow({ mode: "open" });
const template = document.getElementById("shadow-element");
shadow.appendChild(template.content);
</script>
</body>
</html>
```

### Inapplicable

#### Inapplicable Example 1
Expand Down
2 changes: 1 addition & 1 deletion _rules/image-no-text-0va7u6.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Each test target has no [visible][] [text][human language], except if at least o

## Assumptions

- This rule assumes that there is no mechanism to change the rendering of text within image resources on the page. For pages that *do* provide such a mechanism, this rule might fail even if [SC 1.4.5 Images of Text][sc1.4.5] is satisfied.
- This rule assumes that there is no mechanism to change the rendering of text within image resources on the page. For pages that _do_ provide such a mechanism, this rule might fail even if [SC 1.4.5 Images of Text][sc1.4.5] is satisfied.
- When used in HTML, the SVG `<text>` element is not considered to be an image of text. This is because like any other element in HTML, SVG `<text>` can be adjusted through custom style sheets. This does not apply for SVG text that is in a separate file, and displayed through, for example, the `img` element.

## Accessibility Support
Expand Down
Loading

0 comments on commit c356b12

Please sign in to comment.