Use this practical JavaScript accessibility testing checklist to combine automated scans, keyboard review, browser inspection, and assistive-technology testing before releasing a web app or component.
Overview
Accessibility testing works best as a layered process rather than a single scan. Automated tools can identify many detectable issues, such as missing alternative text, invalid ARIA attributes, insufficient color contrast, and certain form-label problems. They cannot reliably judge whether an interaction is understandable, whether focus moves logically, or whether a screen-reader user can complete a task.
For JavaScript applications, test both the initial document and the states created after JavaScript runs. Menus, dialogs, client-side routing, validation messages, tabs, date pickers, file uploads, and infinite lists can introduce accessibility problems that do not appear in the server-rendered or initial DOM.
A useful pre-release sequence is:
- Run automated checks against representative pages and component states.
- Inspect the browser accessibility tree and the rendered DOM.
- Complete key workflows using only a keyboard.
- Test important journeys with a screen reader and browser combination used by your team or audience.
- Record findings, classify false positives, fix regressions, and repeat the checks in CI where practical.
Tools such as axe-core, Lighthouse, browser developer tools, and browser automation frameworks are useful parts of this process. None should be treated as a complete accessibility certification on its own.
Checklist by scenario
1. Every page or route
- Run axe-core or an equivalent automated accessibility scan after the page has fully rendered.
- Check the document title, language declaration, heading structure, landmark regions, and page-level navigation.
- Confirm that visible text has a sufficient relationship to its controls. A button should have an accessible name that explains its action.
- Inspect images, icons, and SVGs. Decorative graphics should not create distracting announcements, while informative graphics need meaningful alternatives.
- Zoom the page and test responsive layouts. Content should not become unavailable when text size or viewport dimensions change.
- Check error messages, status updates, and loading indicators that appear after asynchronous requests.
2. Forms and validation
- Verify that every input has a persistent, programmatically associated label. Placeholder text is not a substitute for a label.
- Ensure required fields and input formats are communicated in text, not only through color or an icon.
- Submit the form with missing and invalid values. Confirm that errors are specific, discoverable, and associated with the relevant controls.
- Decide where focus should move after submission. For a short form, moving focus to the error summary can help; for a field-level error, keeping focus on the invalid control may be more appropriate.
- Test autocomplete, password visibility controls, date inputs, custom selects, and masked fields with a keyboard and screen reader.
3. Menus, dialogs, and overlays
- Open and close each control with a keyboard. The trigger should have a clear name and state where applicable.
- When a modal dialog opens, move focus into it, keep focus within it while open, and return focus to the trigger when it closes unless the workflow requires another destination.
- Give dialogs an accessible name and make the close action available without requiring a pointer.
- Check that background content cannot be accidentally reached while a modal interaction is active.
- Test nested menus, popovers, tooltips, and notification panels at different viewport sizes.
4. Single-page application navigation
- Use keyboard navigation to move between routes and confirm that the new page or main content is announced or otherwise discoverable.
- Update the document title when the route changes.
- Provide a skip link or comparable way to bypass repeated navigation.
- Check focus after client-side navigation, especially when a user follows a link from a table, dialog, or side panel.
- Test loading, empty, permission-denied, and network-error states. These are often overlooked because they are not part of the happy path.
5. Keyboard and screen-reader review
Start with the keyboard alone: press Tab and Shift+Tab, activate controls with Enter or Space as appropriate, and use arrow keys where a widget pattern requires them. Look for visible focus, logical order, keyboard traps, controls that cannot be reached, and custom interactions that respond only to pointer events.
Then repeat at least the most important user journey with a screen reader. Listen for the page title, headings, landmarks, control names, expanded or collapsed state, form errors, and asynchronous status messages. Test a realistic workflow rather than isolated controls: search, filter, add an item, submit a form, receive feedback, and recover from an error.
6. Automated and CI checks
Use axe-core in component tests, integration tests, or browser tests where it can inspect a meaningful rendered state. A simplified browser-test pattern might look like this:
import { test, expect } from '@playwright/test';
import AxeBuilder from '@axe-core/playwright';
test('checkout has no detected accessibility violations', async ({ page }) => {
await page.goto('/checkout');
await page.getByRole('button', { name: 'Continue' }).click();
const results = await new AxeBuilder({ page }).analyze();
expect(results.violations).toEqual([]);
});
Treat this as a starting point. Tests should load the required data, open important components, and scan the resulting state. When a finding is a genuine exception, document the reason and scope it narrowly rather than disabling a broad rule or the entire scan.
What to double-check
| Area | What to inspect | Useful method |
|---|---|---|
| Names and roles | Can users identify every control and understand its purpose? | Accessibility tree, screen reader, DOM inspection |
| Focus management | Does focus remain visible, logical, and usable after dynamic changes? | Keyboard walkthrough and browser tools |
| Structure | Are headings, landmarks, lists, tables, and relationships represented correctly? | Automated scan and accessibility tree |
| Dynamic feedback | Are loading, success, and error states available to users who cannot see the visual change? | Screen reader and event-state testing |
| Visual presentation | Does the interface remain usable with zoom, reflow, contrast changes, and reduced motion preferences? | Browser settings and manual review |
Review automated findings individually. A contrast warning may be caused by a state that users never see, while a clean scan may miss a confusing label or an unusable keyboard interaction. Capture the URL or component state, reproduction steps, expected behavior, actual behavior, and a severity rationale for each issue.
Keep accessibility dependencies and test configuration understandable. When changing an axe-core integration or browser automation package, review the release notes and rerun representative tests. The same package-evaluation discipline used for other NPM packages applies to testing libraries: check maintenance, licensing, compatibility, and how the tool fits your existing workflow.
Common mistakes
- Relying on one score: An automated percentage or pass result is not a substitute for task-based testing.
- Scanning only the initial page: Open dialogs, expand menus, trigger validation, and test authenticated or permission-specific states.
- Using ARIA to repair poor HTML: Prefer native buttons, links, inputs, headings, and lists before adding custom roles and states.
- Ignoring focus: A visually polished component can still strand keyboard users after a route change or overlay closes.
- Suppressing findings too broadly: Scope exceptions to a selector or known case and add an explanation that can be reviewed later.
- Testing only developers' favorite browser: Include the browser and assistive-technology combinations that matter for your product and audience.
- Fixing symptoms in isolation: If several components repeat the same problem, update the shared component, design token, or form pattern and add a regression test.
When to revisit
Run the full pre-release checklist for every substantial feature, route, shared component, or interaction model. Perform a focused check whenever you change navigation, forms, authentication, modals, tables, media, styling tokens, or client-side state management. Recheck after browser, framework, accessibility-library, or design-system updates because rendered behavior and test coverage can change.
Review the checklist before seasonal planning cycles and whenever your workflow changes. At minimum, keep these items current:
- The accessibility tools and browser versions used in local and CI testing.
- The important user journeys represented by automated tests.
- The screen-reader and keyboard combinations used for manual review.
- The team’s process for triaging violations and documenting exceptions.
- The accessibility expectations and standards relevant to the product and release context.
For a practical release gate, assign an owner, test a small set of representative pages and states, fix blocking issues, and attach the results to the release record. After launch, monitor support feedback and regression reports; they often reveal states that were absent from pre-release fixtures. Combining this checklist with a broader JavaScript project setup checklist helps make accessibility part of normal frontend delivery rather than a final, isolated inspection.