A .github/axe-linter.yml file contains the axe Linter configuration set up individually for each repository.

Disabling rules

Enable or disable specific rules in your repository's .github/axe-linter.yml file:

  some-rule: false # turn off rule
  other-rule: true # turn on rule

Disable rule per file

Add entries to specific files to disable rules directly in the file instead of the repository.

The following will disable the tabindex rule in any Markdown or HTML file:

<!-- axelinter:disable:tabindex -->
<a href="#" tabindex="99">Link</a>

The following example disables the tabindex rule in any JavaScript, JSX, TypeScript, or TSX file:

/* axelinter:disable:tabindex */
const TabIndex = () => (
  <a href="#" tabindex="100">Link</a>

See ruleset for the list of available rules.

Disabling rules by tag

All rules are tagged. If you specify which tags to run, axe-linter disables untagged rules. Note that specifically enabled or disabled rules take priority over tag settings.

  some-rule: true # Enable this rule, irrespective of its tag
  other-rule: true # Disable this rule, irrispective of its tag
tags: # Rule all rules for WCAG 2.0 and 2.1, level A and level AA
  - wcag2a
  - wcag2aa
  - wcag21a
  - wcag21aa

See ruleset for the list of available rules.

Exclude files

Tell axe Linter to ignore specific files with the exclude property. Exclude must be an array of file paths. The file path can contain globs to exclude all files with a particular pattern:

  - ./ # Exclude one specific file
  - ./docs/*.md # Exclude all .md files in a directory
  - ./src/components/**/*.jsx # Exclude all .jsx files, including subdirectories

Disable Change Requested on PR's

Add the following line to the .github/axe-linter.yml file if you do not want axe Linter to prevent users from merging a pull request:

can_request_changes: false

Disable Status Checks on PR's

Add the following line to the .github/axe-linter.yml file if you do not wish axe Linter to fail status checks on a pull request:

can_fail_status_check: false