Skip to content

A Gatsby plugin to add @axe-core/react accessibility testing to Gatsby markup.

License

Notifications You must be signed in to change notification settings

curology/gatsby-plugin-axe-core-react

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gatsby-plugin-axe-core-react

A Gatsby plugin to add @axe-core/react accessibility testing to Gatsby markup.

Install

yarn add @axe-core/react axe-core gatsby-plugin-axe-core-react --dev 

How to use

// In your gatsby-config.js

plugins: [`gatsby-plugin-axe-core-react`]

or

// In your gatsby-config.js

plugins: [
  {
    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 [object][optional]

The configuration object for axe-core.

axeContext [object][optional]

Used to specify which element should and which should not be tested.

debounce [number][optional][default: 1000]

The number of milliseconds to wait for component updates to cease before performing an analysis of all the changes.

About

A Gatsby plugin to add @axe-core/react accessibility testing to Gatsby markup.

Resources

License

Stars

Watchers

Forks

Packages

No packages published