Skip to content
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/ISSUE_TEMPLATE/ACCESSIBILITY_SUPPORT.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ assignees: ''

- ... List the rules here, link to its acc support section

## Test cases
## Examples

### Test case 1 ...
### Example 1 ...

(( Add test case here ))
(( Add example here ))

```html
code snippet here
```

[Open this test case]()
[Open this example]()

(( Add a link to a code pen or other hosted test case. Keep in mind this test case needs to be accessible and persistent. ))
(( Add a link to a code pen or other hosted example. Keep in mind this example needs to be accessible and persistent. ))

#### Preconditions

Expand All @@ -39,12 +39,12 @@ Before running the test, check your settings. In many cases default settings are

#### Test instructions

(( Provide instructions on how to test the test case, this should include: ))
(( Provide instructions on how to test the example, this should include: ))

- Which technologies to use
- Any setting changes necessary to run the test
- Any variation in how to operate the different assistive technologies
- Step by step instructions on how to check the test case
- Step by step instructions on how to check the example
- What the expected results are

### External links
Expand Down
4 changes: 2 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ Need for Call for Review:
<< check [Process Document on Call for Review](https://act-rules.github.io/pages/design/process/#call-for-review) >>
This can be merged with 1 approval << choose reason: editorial changes to website/test code, adding new contributor, other (explain). >>
This will not require a Call for Review << choose reason(s): editorial changes (including to the applicability, expectation or examples section), changes to assumptions, background, accessibility support, change to website/test code (not rule), other (explain). >>
This will require a 1 week Call for Review << small changes affecting a small number of test cases, if in doubt do not use this. >>
This will require a 2 weeks Call for Review << new rule, or substantial changes affecting a large number of test cases, if in doubt, use this. >>
This will require a 1 week Call for Review << small changes affecting a small number of examples, if in doubt do not use this. >>
This will require a 2 weeks Call for Review << new rule, or substantial changes affecting a large number of examples, if in doubt, use this. >>

---

Expand Down
18 changes: 9 additions & 9 deletions .github/scripts/approve-rule.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -68,16 +68,16 @@ async function updateRuleVersionsYaml({ tmpDir }, ruleId) {
}

async function approveTestCaseJson({ tmpDir }, ruleId) {
let testCaseCount = 0;
const testCaseJsonPath = `${tmpDir}content-assets/wcag-act-rules/testcases.json`;
const testCaseJson = JSON.parse(fs.readFileSync(testCaseJsonPath, 'utf8'));
testCaseJson.testcases.forEach((testCase, index) => {
if (testCase.ruleId === ruleId) {
let exampleCount = 0;
const exampleJsonPath = `${tmpDir}content-assets/wcag-act-rules/testcases.json`;
const exampleJson = JSON.parse(fs.readFileSync(exampleJsonPath, 'utf8'));
exampleJson.testcases.forEach((example, index) => {
if (example.ruleId === ruleId) {
// Override rather than update so that `approved` isn't at the bottom
testCaseJson.testcases[index] = { ruleId, approved: true, ...testCase }
testCaseCount++
exampleJson.testcases[index] = { ruleId, approved: true, ...example }
exampleCount++
}
});
console.log(`Set ${testCaseCount} test cases of rule ${ruleId} to be approved in testcases.json`);
fs.writeFileSync(testCaseJsonPath, JSON.stringify(testCaseJson, null, 2), 'utf8');
console.log(`Set ${exampleCount} examples of rule ${ruleId} to be approved in testcases.json`);
fs.writeFileSync(exampleJsonPath, JSON.stringify(exampleJson, null, 2), 'utf8');
}
2 changes: 1 addition & 1 deletion __deprecated__/pages/contribute/rule-feedback.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ To start giving feedback and doing reviews for draft rules:

We also welcome any feedback and suggestions for changes to already published rules. The published rules should be as precise as possible, limiting the number of potential false positives and false negatives. For this, it is important to draw on as many tool and methodology implementations and expert opinions as possible.

Feedback and corrections for existing rules can target any of the sections of the rule itself (Applicability, Expectations, Accessibility Support, etc.), as well as the test cases, for example to expand the edge case coverage.
Feedback and corrections for existing rules can target any of the sections of the rule itself (Applicability, Expectations, Accessibility Support, etc.), as well as the examples, for instance to expand the edge case coverage.

You have several options for correcting existing rules:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const getMarkdownAstNodesOfType = require('../../utils/get-markdown-ast-nodes-of

describeRule('testcase has heading', ({ filename, markdownAST }) => {
/**
* get all headings of test case examples (eg: #### Failed Example 1)
* get all headings of examples (eg: #### Failed Example 1)
*/
const testcaseHeadings = getMarkdownAstNodesOfType(markdownAST, 'heading')
.filter(({ depth, children }) => {
Expand All @@ -23,7 +23,7 @@ describeRule('testcase has heading', ({ filename, markdownAST }) => {
* Check if filename has `id` as a part of the name
*/
test('each testcase has a heading', () => {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are we also changing testcase (with no space) to example?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@daniel-montalvo can you look at this. Discussed on the call, we can do this in a separate PR too if you prefer.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@WilcoFiers @zlayaAvocado I miss this one. Yes, I will update this os that tecase is also changed to example

const msg = `Not all test cases have headings in ${filename}.`
const msg = `Not all examples have headings in ${filename}.`
expect(testcaseHeadings.length, msg).toBe(testcaseCodeSnippets.length)
})
})
2 changes: 1 addition & 1 deletion _rules/__tests__/headings.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ describeRule('headings', ruleData => {
/**
* Check for `required` `h2` headings
*/
const requiredH2 = [`Applicability`, `Background`, `Test Cases`]
const requiredH2 = [`Applicability`, `Background`, `Examples`]
const h2Headings = getHeadingOfDepth(headings, 2)
test.each(requiredH2)('has required `h2` - `%s`', heading => {
expect(h2Headings).toContain(heading)
Expand Down
2 changes: 1 addition & 1 deletion _rules/aria-attr-defined-5f99a7.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ There are no accessibility support issues known.
- [Understanding Success Criterion 4.1.2: Name, Role, Value](https://www.w3.org/WAI/WCAG22/Understanding/name-role-value)
- [Semantics and ARIA](https://developers.google.com/web/fundamentals/accessibility/semantics-aria/)

## Test Cases
## Examples

### Passed

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 @@ -66,7 +66,7 @@ Some user agents treat the value of `aria-hidden` attribute as case-sensitive.
- [Fourth rule of ARIA use](https://www.w3.org/TR/using-aria/#fourth)
- [Element with presentational children has no focusable content](presentational-children-no-focusable-content-307n5z.md)

## Test Cases
## Examples

### Passed

Expand Down
6 changes: 3 additions & 3 deletions _rules/aria-required-context-role-ff89c9.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ This rule is restricted to direct parent-child relation in the [accessibility tr

[Subclass roles][subclass role] of [required context roles][] are not automatically included as possible [required context roles][]. For example, the [`feed`](https://www.w3.org/TR/wai-aria-1.2/#feed) role is not a possible [required context role][] for [`listitem`](https://www.w3.org/TR/wai-aria-1.2/#listitem), even though [`feed`](https://www.w3.org/TR/wai-aria-1.2/#feed) is a [subclass role][] of the [`list`](https://www.w3.org/TR/wai-aria-1.2/#list) role.

Some user agents try to correct missing [required context roles][] or incorrect [content model][]. This often results, for example, in an isolated list item being presented as part of a one-item list containing only itself. Therefore, most test cases contain several targets to try and circumvent these corrections in order to better demonstrate the issue.
Some user agents try to correct missing [required context roles][] or incorrect [content model][]. This often results, for example, in an isolated list item being presented as part of a one-item list containing only itself. Therefore, most examples contain several targets to try and circumvent these corrections in order to better demonstrate the issue.

### Assumptions

Expand All @@ -63,7 +63,7 @@ The rule assumes that the [explicit role][] of the applicable elements is approp
- [Understanding Success Criterion 1.3.1: Info and Relationships](https://www.w3.org/WAI/WCAG22/Understanding/info-and-relationships.html)
- [Required Context Role][]

## Test Cases
## Examples

### Passed

Expand All @@ -80,7 +80,7 @@ These elements with an [explicit role][] of `listitem` are children in the [acce

#### Passed Example 2

These elements with an [explicit role][] of `listitem` are children in the [accessibility tree][] of an element with their [required context role][], `list`, expressed as an [implicit role][] of `ul`. Note that this test case does not satisfy [Success Criterion 4.1.1 Parsing][sc411] because the [`ul` element][ul] does not respect its [content model][].
These elements with an [explicit role][] of `listitem` are children in the [accessibility tree][] of an element with their [required context role][], `list`, expressed as an [implicit role][] of `ul`. Note that this example does not satisfy [Success Criterion 4.1.1 Parsing][sc411] because the [`ul` element][ul] does not respect its [content model][].

```html
<ul>
Expand Down
2 changes: 1 addition & 1 deletion _rules/aria-required-id-references-in6db8.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Some user agents treat the value of `aria-*` attribute as case-sensitive (even w
- [WAI-ARIA required states and properties](https://www.w3.org/TR/wai-aria-1.2/#requiredState)
- [RFC 3986](https://www.ietf.org/rfc/rfc3986.txt)

## Test Cases
## Examples

### Passed

Expand Down
6 changes: 3 additions & 3 deletions _rules/aria-required-owned-element-bc4a75.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ If the [semantic role][] on the target element is incorrectly used, and any rela
- [Required Owned Element](https://www.w3.org/TR/wai-aria-1.2/#mustContain)
- [Owned Element](https://www.w3.org/TR/wai-aria-1.2/#dfn-owned-element)

## Test Cases
## Examples

### Passed

Expand Down Expand Up @@ -116,7 +116,7 @@ This element with the `tablist` role only owns elements with the `tab` role. The

This element with the `list` role only owns elements with the `listitem` role through the `aria-owns` attribute. The `listitem` role is one of the [required owned elements][] for `list`.

**Note:** This test case follows the definition of [owned by][]. If implemented differently, this definition could cause differences in outcome of this test case.
**Note:** This example follows the definition of [owned by][]. If implemented differently, this definition could cause differences in outcome of this example.

```html
<div role="list" aria-owns="id1"></div>
Expand Down Expand Up @@ -238,7 +238,7 @@ This element with the `grid` role only owns elements with the `row` role, but th

This element with the `list` role owns an element with the `tab` role through the `aria-owns` attribute. The `tab` role is not one of the [required owned elements][] for `list`.

**Note:** This test case follows the definition of [owned by][]. If implemented differently, this definition could cause differences in outcome of this test case.
**Note:** This example follows the definition of [owned by][]. If implemented differently, this definition could cause differences in outcome of this example.

```html
<div role="list" aria-owns="id2"></div>
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 @@ -82,7 +82,7 @@ Implementation of [Presentational Roles Conflict Resolution][] varies from one b
- [ARIA5: Using WAI-ARIA state and property attributes to expose the state of a user interface component](https://www.w3.org/WAI/WCAG22/Techniques/aria/ARIA5)
- [Document conformance requirements for use of ARIA attributes in HTML](https://www.w3.org/TR/html-aria/#docconformance)

## Test Cases
## Examples

### Passed

Expand Down
2 changes: 1 addition & 1 deletion _rules/aria-state-or-property-valid-value-6a7281.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Some user agents treat the value of `aria-*` attribute as case-sensitive (even w
- [WAI-ARIA 1.2, Characteristics of States and Properties, Value](https://www.w3.org/TR/wai-aria-1.2/#propcharacteristic_value)
- [Uniform Resource Identifier (URI): Generic Syntax (RFC 3986)](https://www.ietf.org/rfc/rfc3986.txt)

## Test Cases
## Examples

### Passed

Expand Down
2 changes: 1 addition & 1 deletion _rules/attr-not-duplicated-e6952f.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ There are no accessibility support issues known.

- [H94: Ensuring that elements do not contain duplicate attributes](https://www.w3.org/WAI/WCAG22/Techniques/html/H94)

## Test Cases
## Examples

### Passed

Expand Down
2 changes: 1 addition & 1 deletion _rules/audio-as-media-alternative-afb423.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ There are no accessibility support issues known.

- [Understanding SC 1.2.1: Audio-only and Video-only (Prerecorded)](https://www.w3.org/WAI/WCAG22/Understanding/audio-only-and-video-only-prerecorded)

## Test Cases
## Examples

### Passed

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ User agents do not always automatically play media, even when an `autoplay` attr
- [Understanding Success Criterion 1.4.2: Audio Control](https://www.w3.org/WAI/WCAG22/Understanding/audio-control.html)
- [Accessible Multimedia](https://developer.mozilla.org/en-US/docs/Learn/Accessibility/Multimedia)

## Test Cases
## Examples

### Passed

Expand Down
2 changes: 1 addition & 1 deletion _rules/audio-text-alternative-e7aa44.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ There are no accessibility support issues known.
- [Understanding SC 1.2.1: Audio-only and Video-only (Prerecorded)](https://www.w3.org/WAI/WCAG22/Understanding/audio-only-and-video-only-prerecorded)
- [G158: Providing an alternative for time-based media for audio-only content](https://www.w3.org/WAI/WCAG22/Techniques/general/G158)

## Test Cases
## Examples

### Passed

Expand Down
2 changes: 1 addition & 1 deletion _rules/audio-transcript-2eb176.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ There are no accessibility support issues known.
- [Understanding SC 1.2.1:Audio-only and Video-only (Prerecorded)](https://www.w3.org/WAI/WCAG22/Understanding/audio-only-and-video-only-prerecorded)
- [G158: Providing an alternative for time-based media for audio-only content](https://www.w3.org/WAI/WCAG22/Techniques/general/G158)

## Test Cases
## Examples

### Passed

Expand Down
2 changes: 1 addition & 1 deletion _rules/auto-play-audio-does-not-exceed-3-seconds-aaa1bf.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ There are no accessibility support issues known.
- [G60: Playing a sound that turns off automatically within three seconds](https://www.w3.org/WAI/WCAG22/Techniques/general/G60)
- [G171: Playing sounds only on user request](https://www.w3.org/WAI/WCAG22/Techniques/general/G171)

## Test Cases
## Examples

### Passed

Expand Down
2 changes: 1 addition & 1 deletion _rules/auto-play-audio-has-control-mechanism-4c31df.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ The native `video` and `audio` controls in several browser and assistive technol
- [Failure of Success Criterion 1.4.2 for absence of a way to pause or stop an HTML5 media element that autoplays](https://www.w3.org/WAI/WCAG22/Techniques/failures/F93)
- [G170: Providing a control near the beginning of the Web page that turns off sounds that play automatically](https://www.w3.org/WAI/WCAG22/Techniques/general/G170)

## Test Cases
## Examples

### Passed

Expand Down
2 changes: 1 addition & 1 deletion _rules/auto-update-text-efbfc7.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ There are no accessibility support issues known.
- [G186: Using a control in the Web page that stops moving, blinking, or auto-updating content][g186]
- [F16: Failure of Success Criterion 2.2.2 due to including scrolling content where movement is not essential to the activity without also including a mechanism to pause and restart the content][f16]

## Test Cases
## Examples

### Passed

Expand Down
2 changes: 1 addition & 1 deletion _rules/autocomplete-valid-value-73f2c2.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ The purpose of a control is programmatically identifiable even when its `autocom
- [Definition: programmatically determined (programmatically determinable)](https://www.w3.org/TR/WCAG22/#dfn-programmatically-determinable)
- [Autofill](https://html.spec.whatwg.org/#autofill)

## Test Cases
## Examples

### Passed

Expand Down
4 changes: 2 additions & 2 deletions _rules/block-collapsible-3e12e1.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ There are no accessibility support issues known.

- [Technique SCR28: Using an expandable and collapsible menu to bypass block of content][tech scr28]

## Test Cases
## Examples

To avoid using landmarks for the non-repeated content, which would satisfy [Success Criterion 2.4.1 Bypass Block][sc241], which this rule is designed for, this rule uses `<div id="main">` in its test cases to indicate where non-repeating content exists. It is recommended to use the `main` landmark instead. The `aside` and `nav` elements are each a [block of repeated content][] due to the link inside the `nav` element to a page with similar [blocks of content][block of content].
To avoid using landmarks for the non-repeated content, which would satisfy [Success Criterion 2.4.1 Bypass Block][sc241], which this rule is designed for, this rule uses `<div id="main">` in its examples to indicate where non-repeating content exists. It is recommended to use the `main` landmark instead. The `aside` and `nav` elements are each a [block of repeated content][] due to the link inside the `nav` element to a page with similar [blocks of content][block of content].

### Passed

Expand Down
2 changes: 1 addition & 1 deletion _rules/button-non-empty-accessible-name-97a4e1.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ This rule considers an exception for "image buttons" (i.e., `input` elements wit
- [ARIA14: Using aria-label to provide an invisible label where a visible label cannot be used](https://www.w3.org/WAI/WCAG22/Techniques/aria/ARIA14)
- [ARIA16: Using aria-labelledby to provide a name for user interface controls](https://www.w3.org/WAI/WCAG22/Techniques/aria/ARIA16)

## Test Cases
## Examples

### Passed

Expand Down
4 changes: 2 additions & 2 deletions _rules/bypass-blocks-cf77f2.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ This rule only checks if there is a way to bypass at least one section of repeat
- [Technique H69: Providing heading elements at the beginning of each section of content][tech h69]
- [Technique SCR28: Using an expandable and collapsible menu to bypass block of content][tech scr28]

To avoid using landmarks for the non-repeated content, which would satisfy [Success Criterion 2.4.1 Bypass Block][sc241], this rule uses `<div id="main">` in its test cases to indicate where non-repeating content exists. It is recommended to use the `main` landmark instead. The `aside` and `nav` elements are each a [block of repeated content][] due to the link inside the `nav` element to a page with similar [blocks of content][block of content].
To avoid using landmarks for the non-repeated content, which would satisfy [Success Criterion 2.4.1 Bypass Block][sc241], this rule uses `<div id="main">` in its examples to indicate where non-repeating content exists. It is recommended to use the `main` landmark instead. The `aside` and `nav` elements are each a [block of repeated content][] due to the link inside the `nav` element to a page with similar [blocks of content][block of content].

## Test Cases
## Examples

### Passed

Expand Down
2 changes: 1 addition & 1 deletion _rules/css-restrict-orientation-b33eff.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ There are no accessibility support issues known.
- [Orientation](https://www.w3.org/TR/css3-mediaqueries/#orientation)
- [The Transform Rendering Model](https://drafts.csswg.org/css-transforms/#transform-rendering)

## Test Cases
## Examples

### Passed

Expand Down
2 changes: 1 addition & 1 deletion _rules/device-motion-disabled-c249d5.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ There are no accessibility support issues known.
- [G213: Provide conventional controls and an application setting for motion activated input](https://www.w3.org/WAI/WCAG22/Techniques/general/G213.html)
- [DeviceOrientation Event Specification](https://www.w3.org/TR/orientation-event/)

## Test Cases
## Examples

### Passed

Expand Down
2 changes: 1 addition & 1 deletion _rules/device-motion-user-interface-7677a9.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ There are no accessibility support issues known.
- [G213: Provide conventional controls and an application setting for motion activated input](https://www.w3.org/WAI/WCAG22/Techniques/general/G213.html)
- [DeviceOrientation Event Specification](https://www.w3.org/TR/orientation-event/)

## Test Cases
## Examples

### Passed

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ Neither this rule, nor technique [H69: Providing heading elements at the beginni
- [H69: Providing heading elements at the beginning of each section of content][h69]
- [CSS Scoping (work in progress)](https://drafts.csswg.org/css-scoping/)

## Test Cases
## Examples

To avoid using landmarks for the non-repeated content, which would satisfy [Success Criterion 2.4.1 Bypass Block][sc241], which this rule is designed for, this rule uses `<div id="main">` in its test cases to indicate where non-repeating content exists. It is recommended to use the `main` landmark instead. The `nav` element is a [block of repeated content][] due to the link inside it to a page with similar [blocks of content][block of content].
To avoid using landmarks for the non-repeated content, which would satisfy [Success Criterion 2.4.1 Bypass Block][sc241], which this rule is designed for, this rule uses `<div id="main">` in its examples to indicate where non-repeating content exists. It is recommended to use the `main` landmark instead. The `nav` element is a [block of repeated content][] due to the link inside it to a page with similar [blocks of content][block of content].

### Passed

Expand Down
Loading