Skip to content

Commit f5639d5

Browse files
committed
Initial commit
1 parent 5deca59 commit f5639d5

13 files changed

+8426
-1
lines changed

README.md

+44-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,45 @@
11
# webdriverio-a11y-demo
2-
A simple WebdriverIO project with axe integration
2+
A simple WebdriverIO project with axe integration to perform accessibility testing
3+
4+
5+
## Steps To Get Started
6+
7+
Step 1: Clone the repository `[email protected]:manoj9788/webdriverio-a11y-demo.git`
8+
9+
Step 2: Install node dependencies `npm install`
10+
11+
Step 3: Execute tests `npm test`
12+
13+
Step 4: _(optional: The base url of your application can be changes from the env file)_
14+
15+
## Accessibility Rule
16+
17+
You could change audit rules as per your requirement like, WCAG or Section 508, add tags in the below function, which can be found in helper class,
18+
19+
```
20+
let results = browser.executeAsync(function (done) {
21+
axe.run(
22+
{
23+
runOnly: {
24+
type: 'tag',
25+
values: ['wcag2a', 'wcag21aa', 'best-practice', 'section508']
26+
}
27+
}, (err, results) => {
28+
if (err) done(err)
29+
done(results)
30+
})
31+
})
32+
```
33+
34+
| Tag Name | Accessibility Standard / Purpose |
35+
|---------------|-------------------------------------------------------|
36+
| wcag2a | WCAG 2.0 Level A |
37+
| wcag2aa | WCAG 2.0 Level AA |
38+
| wcag21a | WCAG 2.1 Level A |
39+
| wcag21aa | WCAG 2.1 Level AA |
40+
| best-practice | Common accessibility best practices |
41+
| wcag*** | WCAG success criterion e.g. wcag111 maps to SC 1.1.1 |
42+
| ACT | W3C approved Accessibility Conformance Testing rules |
43+
| section508 | Old Section 508 rules |
44+
| section508.*.*| Requirement in old Section 508 |
45+
| experimental | Cutting-edge rules, disabled by default |

babel.config.js

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
module.exports = {
2+
presets: [
3+
['@babel/preset-env', {
4+
targets: {
5+
node: 'current'
6+
}
7+
}]
8+
]
9+
}

0 commit comments

Comments
 (0)