Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/curology/gatsby-plugin-axe-core-react
A Gatsby plugin to add @axe-core/react accessibility testing to Gatsby markup.
https://github.com/curology/gatsby-plugin-axe-core-react
Last synced: 8 days ago
JSON representation
A Gatsby plugin to add @axe-core/react accessibility testing to Gatsby markup.
- Host: GitHub
- URL: https://github.com/curology/gatsby-plugin-axe-core-react
- Owner: curology
- License: mit
- Created: 2022-04-26T20:07:55.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-04-27T20:54:12.000Z (over 2 years ago)
- Last Synced: 2024-10-14T05:06:19.444Z (about 1 month ago)
- Language: JavaScript
- Homepage:
- Size: 9.77 KB
- Stars: 3
- Watchers: 8
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# gatsby-plugin-axe-core-react
A Gatsby plugin to add `@axe-core/react` accessibility testing to Gatsby markup.
## Install
```shell
yarn add @axe-core/react axe-core gatsby-plugin-axe-core-react --dev
```## How to use
```javascript
// In your gatsby-config.jsplugins: [`gatsby-plugin-axe-core-react`]
```or
```javascript
// In your gatsby-config.jsplugins: [
{
resolve: 'gatsby-plugin-axe-core-react',
options: {
axeConfig,
axeContext,
debounce,
},
},
]
```React-axe will now print a11y warnings to your browser's console. 🎉
### Configuration options
You can use the following options if you wish to to override the default config.[**`axeConfig`**](https://www.npmjs.com/package/@axe-core/react#configuration) [object][optional]
The configuration object for axe-core.
[**`axeContext`**](https://github.com/dequelabs/axe-core/blob/master/doc/API.md#context-parameter) [object][optional]
Used to specify which element should and which should not be tested.
[**`debounce`**](https://www.npmjs.com/package/@axe-core/react#debouncing) [number][optional][default: 1000]
The number of milliseconds to wait for component updates to cease before performing an analysis of all the changes.