Accessibility checks
What Relay's automated accessibility checks find, what they cannot find, and how Relay groups issues by component.
Automated checks find only some accessibility issues. Manual testing with assistive technology is still needed. Relay reports the violations that automated checks found. It gives no legal advice, adds no overlay script, and never says that a site meets an accessibility law or standard.
What Relay checks
Each site audit runs axe-core 4.13.0 in a browser on up to 50 pages:
- The key pages in your project context.
- The 20 pages with the most organic clicks in Search Console.
- One page for each route template, for example one page under
/blog/.
The checks cover the WCAG 2.0, 2.1 and 2.2 rules at levels A and AA that axe-core can test automatically. Examples are missing image alt text, a missing page language, links and buttons without a name, form fields without a label, and low-contrast text.
A page whose security policy blocks injected scripts cannot be checked. Relay shows the reason for that page.
Cost
The checks use browser time, which Relay bills like rendered audit pages. Relay holds the credits before the checks start. If your spending limits or credits have no room, the audit runs without the accessibility checks.
Issues grouped by component
The same broken component often appears on many pages, such as a card image without alt text. Relay groups those violations into one cluster: the same rule, the same element shape, and the same HTML without page-specific values. One fix in the component resolves the whole cluster.
Each cluster becomes an Accessibility issue on the Opportunities page. Use the Accessibility group of the type filter to see them. Each item shows:
- the axe-core rule, its impact and its WCAG criteria;
- how many pages it affects;
- an example page, element and HTML snippet;
- why the issue matters to people who use assistive technology.
Relay orders the items by impact, by the organic clicks of the affected pages, and by the role of the most important affected page.
Fix issues in code
If your project has a connected GitHub repository, these issues have a Fix in code button:
- Missing image alt text. Pick "The image shows information" and write a short description, or pick "The image is only decoration" to set
alt="". Do not start with "image of", because a screen reader already says that it is an image. Do not write a list of keywords. To start from a draft, select Draft with AI. Relay writes the draft from the image file name, the image element and the text of the page. By default it does not see the image, so check that the draft describes it. To let the model see the image, select Let the model see the image first. Relay then sends the image's public URL to the model, and nothing else about the image. The model can see JPEG, PNG, GIF and WebP images. A draft that sees the image costs more than a text draft. Relay holds up to 50 credits for a draft and charges the real cost. - A missing or incorrect page language. Enter a language tag such as
enorfr-CA. Relay setslangon<html>in the root layout of a Next.js App Router site. - A link, button or form field without a name. Enter what the element does, such as "Open the menu". Relay sets
aria-labelon the element. For a link, Suggest a name uses the title of the linked page on your site. For a form field, it uses the field's placeholder. Relay finds the element by itsid, itsdata-testid, the link'shref, the field'snameorplaceholder, or the classes in the axe-core selector. These must be literal values in your code.
Relay finds the one element in your page file or in the components it imports, and prepares the exact change for review. If it finds no element, or more than one, it stops and tells you to fix it by hand. Nothing is written to GitHub until you approve the change. Relay then opens a pull request for you to review and merge.
Contrast and heading order
Relay does not change colors or headings in code. Color changes affect your brand and design system, and a heading change can change the page's structure. Approve the item, then copy its ticket or create a GitHub issue:
- A low-contrast text ticket states the measured contrast ratio, the text and background colors, and the required ratio.
- A heading order ticket shows the page's headings in order and marks each heading that skips a level.
Check a fix after it deploys
After you merge the pull request, track the change and confirm its production deployment on the Experiments & Results page. Then open the experiment and select Check the fix. Relay runs axe-core again on up to 10 pages where the audit found the issue:
- Passed: the rule no longer fails on the page.
- Still fails: the rule still fails on the page. Relay shows the failing element. Another element with the same rule also fails the page.
- Not checked: the browser could not check the page, for example because its security policy blocks injected scripts.
The check uses browser time, which Relay bills like rendered audit pages.
To see the trend, filter the Opportunities page by Accessibility issue. For the last 10 audits, Relay shows the pages checked and the serious and critical violations that automated checks found. It also shows how many fixes passed their check.
Accessibility statement draft
On the accessibility trend, select Draft a statement. Relay writes a draft from the last audit only:
- the target standard: WCAG 2.2 at level AA, which is what the checks test;
- the date of the checks and the number of pages checked;
- each issue type that the checks found, with its pages, as known limitations;
- the contact address that you enter.
The draft leaves a line for you to describe your manual testing. Relay never states that your site complies with a law or standard. Edit the draft, copy it, and publish it on your site yourself.
Limits
- Automated checks cannot judge most WCAG criteria, such as whether alt text describes the image well or whether a keyboard user can complete a task.
- Relay does not check PDF files or other documents.
- Relay stores HTML snippets of at most 300 characters.