Skip to content

Commit 2928be6

Browse files
Merge remote-tracking branch 'upstream/develop' into develop
2 parents 75a9878 + e26b1a4 commit 2928be6

62 files changed

Lines changed: 1744 additions & 615 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/scripts/approve-rule.mjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,11 @@ await updateRuleVersionsYaml(config, argv.ruleId);
2727
await approveTestCaseJson(config, argv.ruleId);
2828
await commitAndPush(config, `Set ${argv.ruleId} to approved`);
2929

30-
async function generateApprovedRulePages({ tmpDir, rulesDir, glossaryDir }, ruleId) {
30+
async function generateApprovedRulePages({ tmpDir, rulesDir, glossaryDir, testAssetsDir }, ruleId) {
3131
await $`node ./node_modules/act-tools/dist/cli/rule-transform.js \
3232
--rulesDir "${rulesDir}" \
3333
--glossaryDir "${glossaryDir}" \
34+
--testAssetsDir "${testAssetsDir}" \
3435
--outDir "${tmpDir}" \
3536
--ruleIds "${ruleId}"
3637
`;

.github/scripts/wai-build.mjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@ await generateTestCases(config);
88
const commitMessage = (await $`git log -1 --pretty=%B`).stdout;
99
await commitAndPush(config, commitMessage);
1010

11-
async function generateProposedRulePages({ tmpDir, rulesDir, glossaryDir }) {
11+
async function generateProposedRulePages({ tmpDir, rulesDir, glossaryDir, testAssetsDir }) {
1212
await $`node ./node_modules/act-tools/dist/cli/rule-transform.js \
1313
--rulesDir "${rulesDir}" \
1414
--glossaryDir "${glossaryDir}" \
15+
--testAssetsDir "${testAssetsDir}" \
1516
--outDir "${tmpDir}" \
1617
--proposed
1718
`;

.github/workflows/approve-rule.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Sets a rule to "approved" in the wcag-act-rules repository in a given branch.
1+
# Sets a rule to "approved" in the wcag-act-rules repository in a given branch.
22
name: Set a rule to approved
33
on:
44
workflow_dispatch:
@@ -14,12 +14,11 @@ jobs:
1414
dispatch:
1515
runs-on: ubuntu-latest
1616
steps:
17+
- uses: actions/checkout@v3
1718
- name: Check user permission
1819
uses: 74th/workflow-permission-action@1.0.0
1920
with:
2021
listfile: .github/workflows/chair-accounts.md
21-
22-
- uses: actions/checkout@v3
2322
- uses: actions/setup-node@v3
2423
with:
2524
node-version: '16'
@@ -39,4 +38,4 @@ jobs:
3938
git config --global user.name "${{ secrets.WAI_GIT_NAME }}"
4039
git config --global user.email "${{ secrets.WAI_GIT_EMAIL }}"
4140
- name: Set rule to approved
42-
run: npx zx .github/scripts/wai-build.mjs --ruleId ${{ github.event.inputs.ruleId }}" --branch ${{ github.event.inputs.branch }}"
41+
run: npx zx .github/scripts/approve-rule.mjs --ruleId "${{ github.event.inputs.ruleId }}" --branch "${{ github.event.inputs.branch }}"

__tests__/frontmatter.js

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -95,14 +95,17 @@ function validateRuleFrontmatter({ frontmatter }, metaData) {
9595
*/
9696
const accRequirementValues = Object.values(accessibility_requirements)
9797
test.each(accRequirementValues)('has expected keys for accessibility requirement: `%p`', accReq => {
98-
if (accReq.secondary) {
99-
expect(accReq.secondary).toBeTrue()
100-
return
101-
}
102-
98+
expect(accReq).not.toBeNull()
99+
expect(typeof accReq).toBe('object')
103100
const keys = Object.keys(accReq).sort()
104-
expect(keys.length).toBeGreaterThanOrEqual(4)
105-
expect(keys).toIncludeAllMembers(['failed', 'forConformance', 'inapplicable', 'passed'])
101+
102+
if (keys.includes('secondary')) {
103+
expect(keys.length).toBe(1)
104+
expect(typeof accReq.secondary).toBe('string')
105+
} else {
106+
expect(keys.length).toBeGreaterThanOrEqual(4)
107+
expect(keys).toIncludeAllMembers(['failed', 'forConformance', 'inapplicable', 'passed'])
108+
}
106109
})
107110
}
108111
}

__tests__/link-to-glossary-term-valid.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ const whitelist = [
1414
/^#expectation(-[1-9][0-9]*)?$/,
1515
/^#assumptions$/,
1616
/^#accessibility-support$/,
17+
/^#accessibility-requirements-mapping$/,
1718
/^#background$/,
1819
/^#test-cases$/,
1920
/^#passed(-example-[1-9][0-9]*)?$/,

__tests__/spelling-ignore.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@
8686
- RFC
8787
- rfc
8888
- webauthn
89+
- customizable
8990

9091
# spell checker checks against strict casing & hence some repeated words here
9192
- Autocomplete
@@ -204,6 +205,7 @@
204205
- reflow
205206
- Viewport
206207
- dom-meta-content
208+
- showModal
207209

208210
# Unsure why the dictionary does not have these words
209211
- programmatically
@@ -259,6 +261,8 @@
259261
- 2px
260262
- 3px
261263
- 4px
264+
- 10px
265+
- 15px
262266
- 16px
263267
- 20px
264268
- 24px

_rules/aria-attr-defined-5f99a7.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ description: |
66
This rule checks that each `aria-` attribute specified is defined in ARIA 1.2.
77
accessibility_requirements:
88
wcag20:1.3.1: # Info and Relationships (A)
9-
secondary: true
9+
secondary: This success criterion is **less strict** than this rule. This is because the rule does not ignore irrelevant ARIA properties. Some of the failed examples satisfy this success criterion.
1010
wcag20:4.1.2: # Name, Role, Value (A)
11-
secondary: true
11+
secondary: This success criterion is **less strict** than this rule. This is because the rule does not ignore irrelevant ARIA properties. Some of the failed examples satisfy this success criterion.
1212
input_aspects:
1313
- DOM Tree
1414
acknowledgments:
@@ -36,7 +36,7 @@ There are no accessibility support issues known.
3636

3737
## Background
3838

39-
The presence of unknown ARIA attributes is often the result of a typo or other developer error. These attributes are ignored by browsers and other assistive technologies. This often means that a state or property which should exist is missing. This can cause issues under [success criterion 1.3.1 Info and Relationships][sc131] or [4.1.2 Name, Rule Value][sc412].
39+
The presence of unknown ARIA attributes is often the result of a typo or other developer error. These attributes are ignored by browsers and other assistive technologies. This often means that a state or property which should exist is missing.
4040

4141
### Bibliography
4242

@@ -122,5 +122,3 @@ This `canvas` element does not have an `aria-` attribute specified.
122122
```
123123

124124
[wai-aria specifications]: #wai-aria-specifications 'Definition of WAI-ARIA specifications'
125-
[sc131]: https://www.w3.org/TR/WCAG21/#info-and-relationships
126-
[sc412]: https://www.w3.org/TR/WCAG21/#name-role-value

_rules/aria-hidden-no-focusable-content-6cfa84.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ The 1 second time span introduced in the exception of the definition of [focusab
5454

5555
### Related rules
5656

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

5959
### Bibliography
6060

_rules/aria-required-id-references-in6db8.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ accessibility_requirements:
1212
passed: satisfied
1313
inapplicable: satisfied
1414
wcag20:1.3.1: # Info and Relationships (A)
15-
secondary: true
15+
secondary: This success criterion is **less strict** than this rule. This is because the rule does not check for alternatives which may be accessible. Some of the failed examples satisfy this success criterion.
1616
wcag20:4.1.2: # Name, Role, Value (A)
17-
secondary: true
17+
secondary: This success criterion is **less strict** than this rule. This is because the rule does not check for alternatives which may be accessible. Some of the failed examples satisfy this success criterion.
1818
input_aspects:
1919
- DOM Tree
2020
- CSS Styling
@@ -32,7 +32,7 @@ This rule applies to any `aria-controls` attribute defined on an [HTML element][
3232

3333
## Expectation
3434

35-
Each test target's [attribute value][] is a space-separated list of one or more IDs. At least one of those IDs must match an `id` [attribute value][] in the same [shadow tree][] or, if not within a [shadow tree][], within the same [document][document tree]
35+
Each test target's [attribute value][] is a space-separated list of one or more IDs. At least one of those IDs must match an `id` [attribute value][] in the same [shadow tree][] or, if not within a [shadow tree][], within the same [document][document tree].
3636

3737
## Assumptions
3838

_rules/aria-state-or-property-permitted-5c01ea.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ accessibility_requirements:
1717
passed: satisfied
1818
inapplicable: satisfied
1919
wcag20:1.3.1: # Info and Relationships (A)
20-
secondary: true
20+
secondary: This success criterion is **less strict** than this rule. This is because the rule does not ignore irrelevant ARIA properties. Some of the failed examples satisfy this success criterion.
2121
wcag20:4.1.2: # Name, Role, Value (A)
22-
secondary: true
22+
secondary: This success criterion is **less strict** than this rule. This is because the rule does not ignore irrelevant ARIA properties. Some of the failed examples satisfy this success criterion.
2323
input_aspects:
2424
- Accessibility Tree
2525
- CSS styling
@@ -60,15 +60,15 @@ Implementation of [Presentational Roles Conflict Resolution][] varies from one b
6060

6161
## Background
6262

63-
The presence of prohibited ARIA attributes is often the result of a developer using an incorrect role, or a misunderstanding of the attribute. These attributes are ignored by browsers and other assistive technologies. This often means that a state or property which should exist is missing. This can cause issues under [success criterion 1.3.1 Info and Relationships][sc131] or [4.1.2 Name, Rule Value][sc412].
63+
The presence of prohibited ARIA attributes is often the result of a developer using an incorrect role, or a misunderstanding of the attribute. These attributes are ignored by browsers and other assistive technologies. This often means that a state or property which should exist is missing.
6464

6565
In HTML, there are language features that do not have corresponding implicit WAI-ARIA semantics. As per [ARIA in HTML](https://www.w3.org/TR/html-aria/), those elements can have [global states or properties][global]. Some of those elements can also have [inherited][], [supported][], or [required][] [states][state] or [properties][property] that correspond to a [WAI-ARIA role](https://www.w3.org/TR/wai-aria-1.2/#introroles). For example, the `audio` element has no corresponding ARIA semantics but it can have [inherited][], [supported][], or [required][] [states][state] or [properties][property] of the [`application` role](https://www.w3.org/TR/wai-aria-1.2/#application).
6666

6767
Assessing the value of the attribute is out of scope for this rule.
6868

6969
### Related rules
7070

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

7373
### Bibliography
7474

@@ -233,5 +233,3 @@ This `div` element is not [included in the accessibility tree][], hence its [WAI
233233
[wai-aria state or property]: https://www.w3.org/TR/wai-aria-1.2/#state_prop_def 'Definition of ARIA States and Properties'
234234
[namespaced element]: #namespaced-element
235235
[prohibited]: https://www.w3.org/TR/wai-aria-1.2/#prohibitedattributes 'WAI-ARIA 1.2 Definition of Prohibited States and Properties'
236-
[sc131]: https://www.w3.org/TR/WCAG21/#info-and-relationships
237-
[sc412]: https://www.w3.org/TR/WCAG21/#name-role-value

0 commit comments

Comments
 (0)