Skip to content

Commit 8f76344

Browse files
authored
Change standard input to wcagLevel (#54)
Updates references to standard in docs and source code
1 parent d4dc283 commit 8f76344

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ If you've installed the plugin via `netlify.toml`, you can add a `[[plugins.inpu
9696
| `checkPaths` | An array of strings indicating which pages of your site to check. | Any directories or html files in your project | `['/']` |
9797
| `failWithIssues` | A boolean indicating whether the build should fail if a11y issues are found. | `true` or `false` | `true` |
9898
| `ignoreDirectories` | An array of directories that *should not* be checked for a11y issues. | Any directories within your project | `[]` |
99-
| `standard` | The WCAG standard level against which pages are checked. | `'WCAGA'` or `'WCAGAA'` or `'WCAGAAA'` | `'WCAGAA'` |
99+
| `wcagLevel` | The WCAG standard level against which pages are checked. | `'WCAGA'` or `'WCAGAA'` or `'WCAGAAA'` | `'WCAGAA'` |
100100

101101
Here's how these inputs can be used in `netlify.toml`, with comments to explain how each input affects the plugin's behavior:
102102

manifest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ inputs:
99
- name: ignoreDirectories
1010
default: []
1111
description: Array of directories whose pages the plugin should ignore when checking for a11y issues. Defaults to [].
12-
- name: standard
12+
- name: wcagLevel
1313
default: 'WCAG2AA'
1414
description: The level of WCAG 2.1 against which to check site pages. Defaults to 'WCAGAA'; can also be 'WCAGA' or 'WCAGAAA'.

src/config.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ const DEFAULT_CHECK_PATHS = ['/']
44
const DEFAULT_FAIL_WITH_ISSUES = true
55
const DEFAULT_IGNORE_DIRECTORIES = []
66

7-
const PA11Y_DEFAULT_STANDARD = 'WCAG2AA'
7+
const PA11Y_DEFAULT_WCAG_LEVEL = 'WCAG2AA'
88
const PA11Y_RUNNERS = ['axe']
99
const PA11Y_USER_AGENT = 'netlify-plugin-a11y'
1010

1111
const getConfiguration = ({
1212
constants: { PUBLISH_DIR },
13-
inputs: { checkPaths, ignoreDirectories, failWithIssues, standard },
13+
inputs: { checkPaths, ignoreDirectories, failWithIssues, wcagLevel },
1414
}) => {
1515
return {
1616
absolutePublishDir: PUBLISH_DIR || process.env.PUBLISH_DIR,
@@ -20,7 +20,7 @@ const getConfiguration = ({
2020
pa11yOpts: {
2121
runners: PA11Y_RUNNERS,
2222
userAgent: PA11Y_USER_AGENT,
23-
standard: standard || PA11Y_DEFAULT_STANDARD,
23+
standard: wcagLevel || PA11Y_DEFAULT_WCAG_LEVEL,
2424
},
2525
}
2626
}

0 commit comments

Comments
 (0)