accessiBe Help Center

How to configure accessCode

  • Updated

Note: accessCode is currently in beta and only available to eligible customers.

The accessCode AI Reviewer is designed to be flexible. You can customize how strict the AI Reviewer is, whether it runs automatically, and which rules it should ignore.

Set up the configuration file

To configure the AI reviewer, create a file named .accesscode.yml in the root (top level) of your repository. This file controls how and when the reviewer scans your code, and which issues it reports.

Configuration options

You can customize the following settings:

severityThreshold

Controls which accessibility issues the reviewer reports based on severity. 

By default, all accessibility issues are reported. You can limit this to only report issues of a certain severity or higher.

  • Values: "minor", "moderate", "serious", "critical" 
  • Default: "minor" (reports everything)

accessCode uses a different set of severity labels than accessFlow. The table below shows how they correspond.

accessCode severity accessFlow severity
minor low
moderate medium
serious high
critical extreme

ignoreRules

Exclude specific accessibility rules from being reported. Use this if certain rules do not apply to your project.

  • Values: A list of rule IDs (e.g., alt-misuse, button-mismatch).
  • Default: [] (empty list)

autoReview

Determines whether the AI Reviewer runs automatically on pull requests (PR). When set to true, the reviewer scans your code whenever a PR is opened or updated.

Set to false to run the AI reviewer manually.

  • Values: true, false
  • Default: true

excludeFiles

Define files or directories the reviewer should skip. This is useful for excluding: legacy code, test files, third party libraries, or vendor assets. 

Use standard glob patterns to define exclusions. Ignored files are cleanly logged under the “Ignored Files” section in the Pull Request check-run summary.

  • Values: A list of standard glob patterns (e.g., legacy-assets/**, app/components/third-party/*.tsx).
  • Default: The AI reviewer automatically ignores common non-production files, test files, package lockfiles, and static markdown documentation:
    yaml excludeFiles: - "**/*.test.{js,ts,jsx,tsx}" # Test files - "**/*.spec.{js,ts,jsx,tsx}" # Spec files - "**/__tests__/**" # Test directories - "package-lock.json" # NPM lockfile - "yarn.lock" # Yarn lockfile - "pnpm-lock.yaml" # PNPM lockfile - "bun.lockb" # Bun lockfile - "npm-shrinkwrap.json" # NPM shrinkwrap lock - "tsconfig.json" # TypeScript configs - "**/*.md" # Markdown documentation
  • Override Behavior: If you define excludeFiles in your .accesscode.yml, it replaces the default list entirely. To keep the defaults, you must include them explicitly in your configuration list. 

lenses

Scopes the AI Reviewer’s analysis to specific accessibility perspectives or framework rule packages.

  • Values: A list of active lenses (e.g., ["react"], ["nextjs"], ["vanilla"]).
  • Default: [] (defaults to the core vanilla ruleset)
  • Auto-detection behavior: By default, the accessCode AI Reviewer detects the framework used in your codebase and adjusts its accessibility suggestions automatically. If the lenses property is omitted or left empty, the system automatically scans your project's package.json and the files being edited to determine the appropriate framework dependencies. If it detects Next.js or React, it applies the corresponding lens. Otherwise, it defaults to the vanilla lens. In some cases, you may want to override this behavior. For example, if your project uses a custom or non-standard setup, you can define a specific lens to guide the AI Reviewer. This ensures that suggested fixes align with your preferred framework or coding patterns.

Example configuration

Here is an example .accesscode.yml file:

# Place this file in the root of your repository

# Only report issues that are "serious" or "critical"
severityThreshold:"serious"

# Do not report errors related to missing autofocus or empty links rules
ignoreRules:
- no-autofocus
- link-context

# 🚫 Exclude tests, legacy, and vendor folders from AI reviews
# Note: This completely replaces the default list of excluded files.
excludeFiles:
-"**/__tests__/**"
-"legacy-assets/**"
-"**/*.spec.tsx"

# Configure the active rule evaluation lenses
lenses:
-"vanilla"

# Disable automatic reviews on pull requests
# (You will need to manually request a review via the GitHub UI)
autoReview:false

Supported rules

These are the rules automatically checked by the AI Reviewer. 

  • alt-misuse
  • aria-controls-has-reference
  • aria-describedby-has-reference
  • aria-invalid-mismatch
  • aria-invalid-misuse
  • aria-labelledby-has-reference
  • article-misuse
  • background-image-discernible
  • background-image-discernible-image
  • breadcrumbs-mismatch
  • breadcrumbs-in-nav
  • broken-aria-references
  • button-discernible
  • button-mismatch
  • captcha-accessible-provider
  • carousel-aria-live
  • carousel-discernible
  • carousel-mismatch
  • carousel-next-slide-discernible
  • carousel-next-slide-discernible-correctly
  • carousel-previous-slide-discernible
  • carousel-previous-slide-discernible-correctly
  • carousel-redundant-discernible-text
  • carousel-slide-picker-discernible
  • checkbox-aria-checked
  • checkbox-discernible
  • checkbox-mismatch
  • checkbox-misuse
  • color-contrast
  • custom-select-options-list-listbox
  • custom-select-trigger-combobox
  • dialog-modal-mismatch
  • dialog-modal-misuse
  • duplicate-id
  • emphasis-mismatch
  • figure-discernible
  • form-context-change-warning
  • form-duplicate-id
  • form-mismatch
  • form-submit-button-mismatch
  • heading-discernible
  • heading-lengthy
  • heading-mismatch
  • heading-misuse
  • heading-order
  • heading-order-optimal
  • icon-discernible
  • iframe-discernible
  • image-discernible
  • image-discernible-correctly
  • image-mismatch
  • image-misuse
  • input-discernible
  • interactive-not-tabbable
  • interactive-target-size
  • link-anchor-ambiguous
  • link-anchor-discernible
  • link-context
  • link-current-page
  • link-homepage-warning
  • link-image-warning
  • link-mailto-warning
  • link-navigation-ambiguous
  • link-navigation-discernible
  • link-new-window-warning
  • link-pdf-warning
  • link-telephone-warning
  • list-item-within-list
  • list-not-empty
  • main-navigation-discernible
  • main-navigation-mismatch
  • map-area-discernible
  • marquee-deprecated
  • menu-avoid
  • menu-bar-avoid
  • menu-item-avoid
  • menu-trigger-clickable
  • menu-trigger-correct-state
  • menu-trigger-mismatch
  • menu-trigger-misuse
  • name-prohibited-no-aria-label
  • navigation-discernible
  • navigation-item-link
  • navigation-mismatch
  • navigation-misuse
  • navigation-not-nested
  • navigation-redundant-discernible-text
  • navigation-submenu-discernible
  • navigation-submenu-region
  • no-autofocus
  • no-extra-information-in-title
  • no-role-application
  • had-meta-viewport
  • pixel-image-not-discernible
  • radio-aria-checked
  • radio-discernible
  • radio-mismatch
  • radio-misuse
  • redundant-discernible-content
  • region-footer-mismatch
  • region-footer-misuse
  • region-main-content-mismatch
  • region-main-content-misuse
  • required-form-field-aria-required
  • sale-price-discernible
  • search-form-mismatch
  • select-option-mismatch
  • select-option-misuse
  • sr-hidden-tabbable
  • strong-mismatch
  • svg-discernible
  • tab-list-mismatch
  • tab-list-misuse
  • tab-mismatch
  • tab-misuse
  • tab-panel-mismatch
  • tab-panel-misuse
  • tabbable-non-interactive
  • tabbable-visible
  • tabindex-valid
  • table-column-header
  • table-header-not-empty
  • table-headers
  • table-misuse
  • table-not-nested
  • table-row-header
  • text-spacing-word-spacing
  • toggle-button-correct-state
  • toggle-button-mismatch
  • toggle-button-misuse
  • user-rating-discernible
  • visibility-mismatch
  • visibility-misuse
  • visible-text-part-of-accessible-name

See also

accessCode overview

How to use accessCode chat commands in GitHub

How accessCode integrates with GitHub checks and merge enforcement

How accessCode runs automatic and on-demand audits in GitHub

How to resolve and dismiss an issue in accessCode

What GitHub permissions does accessCode require?

Was this article helpful?

0 out of 0 found this helpful