Skip to content

Commit 7912ffa

Browse files
authored
Run prettier (#2403)
1 parent 985e5ca commit 7912ffa

10 files changed

+70
-62
lines changed

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ about: issues related with ACT Rules
44
title: ''
55
labels: ''
66
assignees: ''
7-
87
---
98

109
Please describe the issue with references and relevant examples where necessary.

__tests__/spelling.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,9 @@ function getCuratedMarkdownBody(body, options = {}) {
109109
* @returns {String[]}
110110
*/
111111
function getSpellIgnored() {
112-
const ignoreConfigured = yaml.load(fs.readFileSync('./__tests__/spelling-ignore.yml', 'utf8'), {schema: yaml.FAILSAFE_SCHEMA}) //added schema due to entries starting with a non-zero digit
112+
const ignoreConfigured = yaml.load(fs.readFileSync('./__tests__/spelling-ignore.yml', 'utf8'), {
113+
schema: yaml.FAILSAFE_SCHEMA,
114+
}) //added schema due to entries starting with a non-zero digit
113115

114116
/*
115117
Building spelling exception in the shape FOOxxx where xxx is a number.

_rules/focusable-no-keyboard-trap-standard-nav-a1b64e.md

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -88,43 +88,43 @@ use [standard keyboard navigation](#standard-keyboard-navigation) using the Esca
8888
```html
8989
<div>Main page content with <a href="#">some link</a></div>
9090
<div aria-hidden="true">
91-
<a href="#" id="sentinelBefore" style="position:absolute; top:-999em"
92-
>Upon receiving focus, this focus sentinel should wrap focus to the bottom of the modal</a
93-
>
91+
<a href="#" id="sentinelBefore" style="position:absolute; top:-999em"
92+
>Upon receiving focus, this focus sentinel should wrap focus to the bottom of the modal</a
93+
>
9494
</div>
9595
<div
96-
id="sampleModal"
97-
role="dialog"
98-
aria-label="Sample Modal"
99-
aria-modal="true"
100-
style="border: solid black 1px; padding: 1rem;"
96+
id="sampleModal"
97+
role="dialog"
98+
aria-label="Sample Modal"
99+
aria-modal="true"
100+
style="border: solid black 1px; padding: 1rem;"
101101
>
102-
<label>First and last name <input id="dialogFirst"/></label><br />
103-
<button id="closeButton">Close button</button>
102+
<label>First and last name <input id="dialogFirst"/></label><br />
103+
<button id="closeButton">Close button</button>
104104
</div>
105105
<div aria-hidden="true">
106-
<a href="#" id="sentinelAfter" style="position:absolute; top:-999em"
107-
>Upon receiving focus, this focus sentinel should wrap focus to the top of the modal</a
108-
>
106+
<a href="#" id="sentinelAfter" style="position:absolute; top:-999em"
107+
>Upon receiving focus, this focus sentinel should wrap focus to the top of the modal</a
108+
>
109109
</div>
110110
<script>
111-
window.addEventListener('load', () => {
112-
document.getElementById('dialogFirst').focus();
113-
})
114-
document.getElementById('sentinelBefore').addEventListener('focus', () => {
115-
document.getElementById('closeButton').focus()
116-
})
117-
document.getElementById('sentinelAfter').addEventListener('focus', () => {
118-
document.getElementById('dialogFirst').focus()
119-
})
120-
document.getElementById('closeButton').addEventListener('click', () => {
121-
document.getElementById('sampleModal').style.display = 'none'
122-
})
123-
document.getElementById('sampleModal').addEventListener('keydown', (evt) => {
124-
if (evt.key === "Escape") {
125-
document.getElementById('sampleModal').style.display = 'none';
126-
}
127-
})
111+
window.addEventListener('load', () => {
112+
document.getElementById('dialogFirst').focus()
113+
})
114+
document.getElementById('sentinelBefore').addEventListener('focus', () => {
115+
document.getElementById('closeButton').focus()
116+
})
117+
document.getElementById('sentinelAfter').addEventListener('focus', () => {
118+
document.getElementById('dialogFirst').focus()
119+
})
120+
document.getElementById('closeButton').addEventListener('click', () => {
121+
document.getElementById('sampleModal').style.display = 'none'
122+
})
123+
document.getElementById('sampleModal').addEventListener('keydown', evt => {
124+
if (evt.key === 'Escape') {
125+
document.getElementById('sampleModal').style.display = 'none'
126+
}
127+
})
128128
</script>
129129
```
130130

_rules/presentational-children-no-focusable-content-307n5z.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ This rule assumes that elements that are part of [sequential focus navigation][]
4343

4444
Several major browsers ignore the WAI-ARIA requirements on [presentational children][] for most or sometimes all roles, or in presence of focusable content. Since some browsers implement presentational children while others do not, pages failing this rule may only be problematic with some browsers.
4545

46-
This rule is often misunderstood as applying to elements with an _explicit_ role of `presentation`. In fact, this rule only applies to elements which have been given an _implicit_ role of `presentation` through the [presentational children][] mechanism. Similarly, this rule does not apply to elements with `aria-hidden="true"`.
46+
This rule is often misunderstood as applying to elements with an _explicit_ role of `presentation`. In fact, this rule only applies to elements which have been given an _implicit_ role of `presentation` through the [presentational children][] mechanism. Similarly, this rule does not apply to elements with `aria-hidden="true"`.
4747

4848
### Related rules
4949

@@ -97,13 +97,12 @@ This element with the `menuitemcheckbox` role has an `input` element as a descen
9797

9898
#### Passed Example 4
9999

100-
This `<button>` element has an `a` element as a [child][]. The `a` element has no `href` attribute, so it isn't included in [sequential focus navigation][]. So this `button` element passes the rule.
100+
This `<button>` element has an `a` element as a [child][]. The `a` element has no `href` attribute, so it isn't included in [sequential focus navigation][]. So this `button` element passes the rule.
101101

102102
```html
103103
<button><a>button/link</a></button>
104104
```
105105

106-
107106
### Failed
108107

109108
#### Failed Example 1
@@ -140,7 +139,7 @@ This element with the `menuitemcheckbox` role has a checkbox as a child. Because
140139

141140
#### Failed Example 4
142141

143-
This element with the `tab` role contains an `a` element. The `tab` role has [presentational children][]. The `a` element is included in [sequential focus navigation][]. So the element with the `tab` role fails the rule. (This tablist implementation is non-functional for users. It's not meant to function - it's only meant to show roles.)
142+
This element with the `tab` role contains an `a` element. The `tab` role has [presentational children][]. The `a` element is included in [sequential focus navigation][]. So the element with the `tab` role fails the rule. (This tablist implementation is non-functional for users. It's not meant to function - it's only meant to show roles.)
144143

145144
```html
146145
<ul role="tablist">
@@ -152,7 +151,7 @@ This element with the `tab` role contains an `a` element. The `tab` role has [p
152151

153152
#### Failed Example 5
154153

155-
This element with the `img` role contains an `a` element. The `img` role has [presentational children][]. The `a` element is included in [sequential focus navigation][]. So the element with the `img` role fails the rule.
154+
This element with the `img` role contains an `a` element. The `img` role has [presentational children][]. The `a` element is included in [sequential focus navigation][]. So the element with the `img` role fails the rule.
156155

157156
```html
158157
<span role="img" aria-label="some ASCII art">****** This ASCII art ******* <a href="#">contains a link.</a></span>
@@ -162,7 +161,7 @@ This element with the `img` role contains an `a` element. The `img` role has [p
162161

163162
#### Inapplicable Example 1
164163

165-
None of the roles that build this semantic table structure (`table` for `table`, `row` for `tr`, `columnheader` for `th`, and `cell` for `td`) have [presentational children][]. So this rule does not apply to them.
164+
None of the roles that build this semantic table structure (`table` for `table`, `row` for `tr`, `columnheader` for `th`, and `cell` for `td`) have [presentational children][]. So this rule does not apply to them.
166165

167166
```html
168167
<table>
@@ -181,7 +180,7 @@ None of the roles that build this semantic table structure (`table` for `table`,
181180

182181
#### Inapplicable Example 2
183182

184-
This `a` element has a `link` role, which does not have [presentational children][]. So this `a` element does not fail this rule, because it's inapplicable. To have a "focusable element within a focusable element" like this is a bad practice, but this rule doesn't directly check for it.
183+
This `a` element has a `link` role, which does not have [presentational children][]. So this `a` element does not fail this rule, because it's inapplicable. To have a "focusable element within a focusable element" like this is a bad practice, but this rule doesn't directly check for it.
185184

186185
```html
187186
<a href="https://w3.org"><span tabindex="0">W3C Website</span></a>

_rules/role-attribute-valid-value-674b10.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ This `role` attribute is empty ("").
167167
This `role` attribute is only [ASCII whitespace][].
168168

169169
```html
170-
<input type="text" role=" " aria-label="field name"/>
170+
<input type="text" role=" " aria-label="field name" />
171171
```
172172

173173
#### Inapplicable Example 5

_rules/role-required-states-and-properties-4e8ab6.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ This `combobox` has the required properties `aria-controls` and `aria-expanded`.
121121

122122
```html
123123
<label for="tag_combo" id="tag_label">Tag</label>
124-
<input type="text" id="tag_combo" role="combobox" aria-expanded="true" aria-controls="popup_listbox"/>
124+
<input type="text" id="tag_combo" role="combobox" aria-expanded="true" aria-controls="popup_listbox" />
125125
<ul role="listbox" id="popup_listbox" aria-labelledby="tag_label">
126126
<li role="option">Zebra</li>
127127
<li role="option" id="selected_option">Zoom</li>
@@ -197,7 +197,7 @@ This `div` does not have a [semantic role](#semantic-role).
197197
This `checkbox` has an [implicit semantic role](#implicit-role) that is identical to the [explicit semantic role](#explicit-role). This allows native HTML `checked` attribute to apply.
198198

199199
```html
200-
<input type="checkbox" role="checkbox" aria-label="Checkbox name"/>
200+
<input type="checkbox" role="checkbox" aria-label="Checkbox name" />
201201
```
202202

203203
#### Inapplicable Example 3

_rules/scrollable-element-keyboard-accessible-0ssw9k.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,9 @@ This rule applies to any [HTML element][] that has [visible][] [children][] in t
4040

4141
## Expectation
4242

43-
For each target element, at least one of the following is true:
44-
- the element is included in [sequential focus navigation][]; or
43+
For each target element, at least one of the following is true:
44+
45+
- the element is included in [sequential focus navigation][]; or
4546
- the element has a [descendant][] in the [flat tree][] that is included in [sequential focus navigation][]; or
4647
- the element is [inert][].
4748

@@ -119,7 +120,7 @@ This [scrollable][] `section` element is [inert][] because of the modal dialog,
119120
```html
120121
<style>
121122
dialog:-internal-dialog-in-top-layer::backdrop {
122-
background: rgba(1, 1, 1, 0.8);
123+
background: rgba(1, 1, 1, 0.8);
123124
}
124125
</style>
125126
<section style="height: 100px; width: 500px; overflow: scroll;" tabindex="0">
@@ -144,11 +145,11 @@ This [scrollable][] `section` element is [inert][] because of the modal dialog,
144145
</dialog>
145146
<script>
146147
const openDialog = () => {
147-
ppDialog.showModal();
148+
ppDialog.showModal()
148149
myFrame.tabIndex = '-1'
149150
}
150-
ppDialog.addEventListener('close', () => myFrame.tabIndex = 0)
151-
window.addEventListener('DOMContentLoaded', openDialog);
151+
ppDialog.addEventListener('close', () => (myFrame.tabIndex = 0))
152+
window.addEventListener('DOMContentLoaded', openDialog)
152153
</script>
153154
```
154155

_rules/video-transcript-1a02b0.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ accessibility_requirements:
1717
passed: further testing needed
1818
inapplicable: further testing needed
1919
wcag20:1.3.1: # Info and Relationships (A)
20-
secondary: This success criterion is **related** to this rule. This is because this criterion applies to a visible transcript.
20+
secondary: This success criterion is **related** to this rule. This is because this criterion applies to a visible transcript.
2121
wcag20:1.2.1: # Audio-only and Video-only (Prerecorded) (A)
2222
secondary: This success criterion is **less strict** than this rule. This is because this criterion does not require a transcript when the audio-only or video-only is a media alternative for text and is clearly labeled as such. Some of the failed examples may satisfy this success criterion.
2323
input_aspects:
@@ -128,7 +128,12 @@ A video element with an associated track element that contains captions for all
128128
<video src="/test-assets/perspective-video/perspective-video.mp4" controls>
129129
<track src="/test-assets/perspective-video/perspective-caption.vtt" kind="captions" />
130130
</video>
131-
<p> Web Accessibility Perspectives: Keyboard Accessibility. Not being able to use your computer because your mouse doesn't work, is frustrating. (A computer user's mouse breaks when it falls off the desk.) Many people use only the keyboard to navigate websites. Either through preference or circumstance. (A person wearing a sling on her arm typing with one hand.) </p>
131+
<p>
132+
Web Accessibility Perspectives: Keyboard Accessibility. Not being able to use your computer because your mouse
133+
doesn't work, is frustrating. (A computer user's mouse breaks when it falls off the desk.) Many people use only the
134+
keyboard to navigate websites. Either through preference or circumstance. (A person wearing a sling on her arm
135+
typing with one hand.)
136+
</p>
132137
</html>
133138
```
134139

0 commit comments

Comments
 (0)