Skip to content

Commit d26794c

Browse files
Merge branch 'develop' into giacomo-petri-patch-5c01ea-inapplicable-1
2 parents 66fda53 + 4a3a75d commit d26794c

12 files changed

+198
-29
lines changed
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
---
2+
name: Accessibility support template
3+
about: Issue for tracking accessibility support on ACT Rules
4+
title: ''
5+
labels: ['accessibility support']
6+
assignees: ''
7+
---
8+
9+
## Accessibility support
10+
11+
(( Put the accessibility support item here ))
12+
13+
## ACT Rules
14+
15+
- ... List the rules here, link to its acc support section
16+
17+
## Test cases
18+
19+
### Test case 1 ...
20+
21+
(( Add test case here ))
22+
23+
```html
24+
code snippet here
25+
```
26+
27+
[Open this test case]()
28+
29+
(( Add a link to a code pen or other hosted test case. Keep in mind this test case needs to be accessible and persistent. ))
30+
31+
#### Preconditions
32+
33+
Before running the test, check your settings. In many cases default settings aren't strictly required and will not impact the results. Use common sense here. If non-default settings are necessary for you, record the settings used in the reported results.
34+
35+
- Ensure browsers are in the default settings, turn off unnecessary extensions
36+
- Ensure ATs are in the default settings
37+
- Ensure operating system are in default settings
38+
- Ensure software uses the correct version (usually the latest version)
39+
40+
#### Test instructions
41+
42+
(( Provide instructions on how to test the test case, this should include: ))
43+
44+
- Which technologies to use
45+
- Any setting changes necessary to run the test
46+
- Any variation in how to operate the different assistive technologies
47+
- Step by step instructions on how to check the test case
48+
- What the expected results are
49+
50+
### External links
51+
52+
(( List any external links to bugs in browsers & AT, WPT, or spec issues. Be sure to open issues in the appropriate repositories. ))
53+
54+
<!--
55+
Links to external resources to look for / raise issues
56+
- Web platform tests: https://github.com/web-platform-tests/wpt
57+
- JAWS issues: https://github.com/FreedomScientific/VFO-standards-support/issues
58+
- NVDA issues: https://github.com/nvaccess/nvda/issues
59+
- Firefox issues: https://bugzilla.mozilla.org/
60+
- Chromium issues: https://issues.chromium.org/issues?q=componentid:1363614+
61+
- Safari issues: https://github.com/WebKit/webkit/issues
62+
- ARIA: https://github.com/w3c/aria/issues
63+
- HTML: https://github.com/whatwg/html/issues
64+
- CSS: https://github.com/w3c/csswg-drafts/issues
65+
- AccName: https://github.com/w3c/accname/issues
66+
- HTML AAM: https://github.com/w3c/html-aam/issues
67+
- ARIA in HTML: https://github.com/w3c/html-aria/issues
68+
- PowerMapper tests: https://www.powermapper.com/tests/
69+
- Accessibility support: https://www.a11ysupport.io/
70+
-->
71+
72+
## Test results
73+
74+
Please report test results in a comment below. Please use the following format:
75+
76+
```md
77+
## Test case X
78+
79+
- Date: ...
80+
- Operating system: ..., version ...
81+
- Browser: ..., version ...
82+
- Assistive technology: ..., version ...
83+
- Test result: Passed / Failed (if failed, how was it different from expected?)
84+
```

.github/ISSUE_TEMPLATE.md renamed to .github/ISSUE_TEMPLATE/rules-issue-template.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
---
2+
name: Rules issue template
3+
about: issues related with ACT Rules
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
110
Please describe the issue with references and relevant examples where necessary.
211

312
--- or ---

.github/scripts/pr-preview.mjs

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/usr/bin/env zx
2+
import 'zx/globals';
3+
import { config, cloneWcagActRules, commitAndPush } from './commons.mjs'
4+
5+
await cloneWcagActRules(config);
6+
await generateProposedRulePages(config);
7+
await generateTestCases(config);
8+
// const commitMessage = (await $`git log -1 --pretty=%B`).stdout;
9+
// await commitAndPush(config, commitMessage);
10+
11+
async function generateProposedRulePages({ tmpDir, rulesDir, glossaryDir, testAssetsDir }) {
12+
await $`node ./node_modules/act-tools/dist/cli/rule-transform.js \
13+
--rulesDir "${rulesDir}" \
14+
--glossaryDir "${glossaryDir}" \
15+
--testAssetsDir "${testAssetsDir}" \
16+
--outDir "${tmpDir}" \
17+
--proposed
18+
`;
19+
}
20+
21+
async function generateTestCases({ tmpDir, rulesDir, testAssetsDir }) {
22+
await $`node ./node_modules/act-tools/dist/cli/build-examples.js \
23+
--rulesDir "${rulesDir}" \
24+
--testAssetsDir "${testAssetsDir}" \
25+
--outDir "${tmpDir}" \
26+
--proposed
27+
`;
28+
}

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,6 @@ yarn.lock
7272

7373
# Tmp build directory
7474
wcag-act-rules-tmp/
75+
76+
# Local Netlify folder
77+
.netlify

__tests__/spelling-ignore.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@
239239
- unitless
240240
- luminance
241241
- disambiguated
242+
- superclass
242243
- grey
243244

244245
# Parts of Unicode
@@ -294,3 +295,6 @@
294295
- A-lum-min
295296
- B-lum-max
296297
- B-lum-min
298+
299+
#Browsers Internal Roles
300+
- SvgRoot

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

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ The `aria-busy` [state][] is a [global][] [state][] that is [supported][] by all
110110

111111
#### Passed Example 4
112112

113-
The `aria-label` [property][] is a [global][] [property][]. It is allowed on any [semantic role][].
113+
The `aria-label` [property][] is a [global][] [property][]. It is allowed on any [semantic role][], except where specifically prohibited.
114114

115115
```html
116116
<div role="button" aria-label="OK">✓</div>
@@ -150,7 +150,7 @@ The `aria-controls` [property][] is [required][] for the [semantic][semantic rol
150150

151151
#### Passed Example 9
152152

153-
The `aria-label` [property][] is [global][]. It is allowed on any [semantic role][], including roles from the [WAI-ARIA Graphics Module](https://www.w3.org/TR/graphics-aria-1.0). This rule is applicable to SVG elements.
153+
The `aria-label` [property][] is [global][]. It is allowed on any [semantic role][], except where specifically prohibited, including roles from the [WAI-ARIA Graphics Module](https://www.w3.org/TR/graphics-aria-1.0). This rule is applicable to SVG elements.
154154

155155
```html
156156
<svg xmlns="http://www.w3.org/2000/svg" role="graphics-object" width="100" height="100" aria-label="yellow circle">
@@ -174,6 +174,29 @@ This `input` element does not have an [explicit role][] of `textbox`, but the `a
174174
<label>Password<input type="password" aria-required="true"/></label>
175175
```
176176

177+
#### Passed Example 12
178+
179+
This `div` element has an [explicit role][] of `switch`; the `aria-required` [property][] is [inherited][] from the `checkbox` [superclass role](https://www.w3.org/TR/wai-aria-1.2/#superclassrole).
180+
181+
```html
182+
<div role="switch" aria-checked="false" tabindex="0" aria-required="true">
183+
<span class="label">Notifications</span>
184+
<span class="switch" style="position: relative; display: inline-block; top: 6px; border: 2px solid black; border-radius: 12px; height: 20px; width: 40px;">
185+
<span style="position: absolute; top: 2px; left: 2px; display: inline-block; border: 2px solid black; border-radius: 8px; height: 12px; width: 12px; background: black;"></span>
186+
</span>
187+
<span class="on" aria-hidden="true" style="display: none;">On</span>
188+
<span class="off" aria-hidden="true">Off</span>
189+
</div>
190+
```
191+
192+
#### Passed Example 13
193+
194+
This `div` element has an [explicit role][] of `separator`. The `aria-valuemin`, `aria-valuemax` and `aria-valuenow` [properties][property] are [supported][] for the `separator` role when the element is [focusable][].
195+
196+
```html
197+
<div role="separator" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" tabindex="0">My separator</div>
198+
```
199+
177200
### Failed
178201

179202
#### Failed Example 1
@@ -200,6 +223,14 @@ The `aria-label` property is [prohibited][] for an element with a `generic` role
200223
<div aria-label="Bananas"></div>
201224
```
202225

226+
#### Failed Example 4
227+
228+
The `aria-label` property is [prohibited][] for an element with a `paragraph` role.
229+
230+
```html
231+
<div role="paragraph" aria-label="Bananas"></div>
232+
```
233+
203234
### Inapplicable
204235

205236
#### Inapplicable Example 1

_rules/element-marked-decorative-is-not-exposed-46ca7f.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ rule_type: atomic
66
description: |
77
This rule checks that elements marked as decorative either are not included in the accessibility tree, or have a presentational role.
88
accessibility_requirements:
9+
wcag20:1.1.1: # Non-text content (A)
10+
secondary: This success criterion is **less strict** than this rule. Only when this rule is applied to decorative content does a failure of 1.1.1 occur.
911
input_aspects:
1012
- Accessibility tree
1113
- CSS styling
@@ -35,7 +37,7 @@ Elements are normally [marked as decorative][] to convey the intention of the au
3537

3638
Whenever such a conflict occurs, this indicates at the very least mismatching intentions. Such a conflict should be avoided.
3739

38-
When these conflicts arise on [decorative][] [non-text content][], this is also a failure of [Success Criterion 1.1.1: Non-text Content][sc111] because [decorative][] [non-text content][] must be implemented in a way that allows assistive technologies to ignore it. When these conflicts arise on text content, or on content which is not [decorative][], this is not a failure of WCAG. Therefore this rule is not mapping to any specific WCAG Success Criterion, and is not an accessibility requirement for WCAG.
40+
When these conflicts arise on [decorative][] [non-text content][], this is also a failure of [Success Criterion 1.1.1: Non-text Content][sc111] because [decorative][] [non-text content][] must be implemented in a way that allows assistive technologies to ignore it. When these conflicts arise on text content, or on content which is not [decorative][], this is not a failure of WCAG. Therefore this rule maps to Non-text Content as a secondary requirement.
3941

4042
### Assumptions
4143

_rules/image-non-empty-accessible-name-23a2a8.md

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ There are no assumptions.
5858
- There are several popular browsers that do not treat images with an empty `alt` attribute (`alt=""`) as having a role of `presentation` but instead add the `img` element to the accessibility tree with a [semantic role][] of either `img` or `graphic`.
5959
- Implementation of [Presentational Roles Conflict Resolution][] varies from one browser or assistive technology to another. Depending on this, some [semantic][semantic role] `img` elements can fail this rule with some technology but users of other technologies would not experience any accessibility issue.
6060
- Images can have their role set to `presentation` through an empty `alt` attribute. [Presentational Roles Conflict Resolution][] does not specify what to do if such an image is [focusable][] (it only specifies what to do in case of explicit `role="none"` or `role="presentation"`). Some browsers expose these images and some don't. Thus, this rule may fail for technologies that expose these without creating an accessibility issue for users of other technologies.
61+
- `svg` elements have an [implicit role][] of `graphics-document` in [svg-aam](https://www.w3.org/TR/svg-aam-1.0/#details-id-66). There are popular browsers that do not follow [svg-aam](https://www.w3.org/TR/svg-aam-1.0/#details-id-66) and instead expose SVG elements with a different [semantic role][], such as `image`, `generic` or `SvgRoot`.
6162

6263
### Bibliography
6364

@@ -196,16 +197,6 @@ This `img` element has an [explicit role][] of `none`. However, it is [focusable
196197

197198
#### Inapplicable Example 1
198199

199-
This `svg` element has an [implicit role][] of `graphics-document`.
200-
201-
```html
202-
<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100">
203-
<circle cx="50" cy="50" r="40" stroke="green" stroke-width="4" fill="yellow" />
204-
</svg>
205-
```
206-
207-
#### Inapplicable Example 2
208-
209200
This [semantic][semantic role] `img` element is hidden with `aria-hidden` set to "true".
210201

211202
```html
@@ -216,15 +207,15 @@ This [semantic][semantic role] `img` element is hidden with `aria-hidden` set to
216207
></div>
217208
```
218209

219-
#### Inapplicable Example 3
210+
#### Inapplicable Example 2
220211

221212
This `img` element is hidden with `aria-hidden` set to "true".
222213

223214
```html
224215
<img src="/test-assets/shared/w3c-logo.png" aria-hidden="true" />
225216
```
226217

227-
#### Inapplicable Example 4
218+
#### Inapplicable Example 3
228219

229220
This `img` element is hidden because its parent has `display: none`.
230221

@@ -234,7 +225,7 @@ This `img` element is hidden because its parent has `display: none`.
234225
</div>
235226
```
236227

237-
#### Inapplicable Example 5
228+
#### Inapplicable Example 4
238229

239230
This `img` element is hidden with `visibility: hidden`.
240231

_rules/meta-refresh-no-delay-bc659a.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ This page will not refresh because it lacks a `http-equiv` attribute.
198198

199199
#### Inapplicable Example 3
200200

201-
This 'meta' element contains an invalid `content` attribute and will not refresh the page.
201+
This `meta` element contains an invalid `content` attribute and will not refresh the page.
202202

203203
```html
204204
<head>
@@ -211,7 +211,7 @@ This 'meta' element contains an invalid `content` attribute and will not refresh
211211

212212
#### Inapplicable Example 4
213213

214-
This 'meta' element contains an invalid `content` attribute and will not refresh the page.
214+
This `meta` element contains an invalid `content` attribute and will not refresh the page.
215215

216216
```html
217217
<head>
@@ -224,7 +224,7 @@ This 'meta' element contains an invalid `content` attribute and will not refresh
224224

225225
#### Inapplicable Example 5
226226

227-
This 'meta' element contains an invalid `content` attribute and will not refresh the page.
227+
This `meta` element contains an invalid `content` attribute and will not refresh the page.
228228

229229
```html
230230
<head>
@@ -237,7 +237,7 @@ This 'meta' element contains an invalid `content` attribute and will not refresh
237237

238238
#### Inapplicable Example 6
239239

240-
This 'meta' element contains an invalid `content` attribute and will not refresh the page.
240+
This `meta` element contains an invalid `content` attribute and will not refresh the page.
241241

242242
```html
243243
<head>
@@ -250,7 +250,7 @@ This 'meta' element contains an invalid `content` attribute and will not refresh
250250

251251
#### Inapplicable Example 7
252252

253-
This 'meta' element contains an invalid `content` attribute and will not refresh the page.
253+
This `meta` element contains an invalid `content` attribute and will not refresh the page.
254254

255255
```html
256256
<head>
@@ -263,7 +263,7 @@ This 'meta' element contains an invalid `content` attribute and will not refresh
263263

264264
#### Inapplicable Example 8
265265

266-
This 'meta' element contains an invalid `content` attribute and will not refresh the page.
266+
This `meta` element contains an invalid `content` attribute and will not refresh the page.
267267

268268
```html
269269
<head>

netlify.toml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[build]
2+
command = "npm run pr:preview && cd wcag-act-rules-tmp && git submodule update --init --remote && bundle install && bundle exec jekyll build --config '_config.yml,_config_staging.yml'"
3+
# base = "wcag-act-rules-tmp"
4+
publish = "wcag-act-rules-tmp/_site"
5+
6+
[build.environment]
7+
RUBY_VERSION = "3.3.3"
8+
9+
[[redirects]]
10+
from = "/"
11+
to = "/standards-guidelines/act/rules/"
12+
13+
[[redirects]]
14+
from = "/standards-guidelines/act/rules/*"
15+
to = "/standards-guidelines/at/rules/:splat/proposed"

package-lock.json

Lines changed: 7 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,8 @@
177177
"formatRulesDir": "prettier --write './_rules/**/*.md'",
178178
"format": "prettier --write *.{json,md,js,html,css,yml} './{__tests__,_rules,.github,pages,test-assets,test-utils,utils}/**/*.{json,md,js,html,css,yml}'",
179179
"test": "jest --coverage",
180-
"build:wai": "zx .github/scripts/wai-build.mjs"
180+
"build:wai": "zx .github/scripts/wai-build.mjs",
181+
"pr:preview": "zx .github/scripts/pr-preview.mjs"
181182
},
182183
"homepage": "https://github.com/act-rules/act-rules.github.io",
183184
"repository": {

0 commit comments

Comments
 (0)