Test accessibility state by state: trigger each meaningful interface state through realistic user interaction, check its rendered appearance and accessibility semantics separately, and verify that people can use it with a keyboard and assistive technology. A screenshot comparison can show that pixels changed; it cannot establish that a control is announced correctly or can be operated.
Why test accessibility states separately?
A page can expose different controls and content depending on whether a menu is expanded, a dialog is open, or a form has errors. Scanning or capturing only the default page misses those states. Build tests around the interactions people actually use, and evaluate each resulting state on its own.
Keep four kinds of evidence distinct: screenshot differences, automated rule results, accessibility-tree assertions, and human review. Each answers a different question; none is a substitute for the others.
Which interface states should you include?
Start with the states users encounter in the product, not an assumed exhaustive checklist. For example:
#1 Best Overall
- CRISP CLARITY: This 23.8″ Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
- INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
- THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
- WORK SEAMLESSLY: This sleek monitor is virtually bezel-free on three sides, so the screen looks even bigger for the viewer. This minimalistic design also allows for seamless multi-monitor setups that enhance your workflow and boost productivity
- A BETTER READING EXPERIENCE: For busy office workers, EasyRead mode provides a more paper-like experience for when viewing lengthy documents
- The default page, including the initial keyboard focus state where relevant.
- Navigation expanded, including any nested menu.
- A dialog or other revealed content open.
- A form after invalid submission, with its error messages and any focus movement.
- A success or confirmation state after valid submission.
- Any other state that changes available content, controls, or interaction behavior.
For each state, record how to reach it, what should be visible, which semantics matter, and what a keyboard user should be able to do. This makes the test repeatable and clarifies what a change means.
How to build a repeatable Playwright workflow
The example below uses Playwright Test, @axe-core/playwright, an ARIA snapshot assertion, and a screenshot baseline. Install the packages and configure Playwright Test for the browser and host environment used to create and compare your baselines. The paths and accessible names in the example are illustrative: replace them with locators that match your application.
1. Trigger the state and wait for it
Do not scan before the state exists. Playwright’s accessibility-testing guidance recommends performing the interaction that reveals content and waiting for the expected result before scanning.
Rank #2
- CRISP CLARITY: This 22 inch class (21.5″ viewable) Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
- 100HZ FAST REFRESH RATE: 100Hz brings your favorite movies and video games to life. Stream, binge, and play effortlessly
- SMOOTH ACTION WITH ADAPTIVE-SYNC: Adaptive-Sync technology ensures fluid action sequences and rapid response time. Every frame will be rendered smoothly with crystal clarity and without stutter
- INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
- THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
import { test, expect } from '@playwright/test';
import AxeBuilder from '@axe-core/playwright';
test('navigation menu is accessible and visually stable', async ({ page }) => {
await page.goto('https://example.com');
const menuButton = page.getByRole('button', { name: 'Products' });
await menuButton.click();
const menu = page.getByRole('navigation', { name: 'Products' });
await expect(menu).toBeVisible();
// Continue with the checks shown below while this state is open.
});
Use realistic actions for the state being tested: click or activate controls, type into fields, submit forms, or navigate with the keyboard. Wait for a meaningful condition, such as a dialog becoming visible or an error message appearing, rather than relying on an arbitrary delay whenever a locator can express the expected result.
Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Repair Windows errors before they cause bigger problemsFix Now →Scan for outdated or missing drivers - takes under a minuteDriver Scan →2. Run an automated accessibility scan in that state
With the menu still open, scan the current page:
const results = await new AxeBuilder({ page })
.withTags(['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21aa'])
.analyze();
expect(results.violations).toEqual([]);
These tags select rule sets; they do not certify conformance. A passing scan means the configured rules found no violations in the scanned state. It does not mean that every accessibility issue has been found. You can use include() to scope a scan to a particular region, such as the open dialog, when that is useful; keep in mind that a narrow scope will not examine excluded content.
3. Assert important accessibility-tree structure
For structural changes, assert the accessibility tree as well as pixels. Playwright’s ARIA snapshot documentation describes snapshot assertions; matching is order-sensitive, so a change in tree order can fail the assertion even if individual elements still exist.
Rank #3
- Clear visuals. Fluid motion: A 144Hz refresh rate and 1ms MPRT deliver smooth, tear‑free motion across work, gaming, and streaming for clearer, more fluid viewing.
- Eye comfort: TÜV Rheinland 3‑star* certification reduces harmful blue light while preserving stunning color quality without compromise. *TÜV Rheinland 3-star eye comfort certification.
- Wide viewing angle: Get consistent views across a wide 178° /178° viewing angle.
- In-Plane Switching (IPS): See excellent color accuracy and consistency across wide viewing angles with In-plane Switching (IPS) technology.
- Ultra-thin bezels: Maximize your viewing experience with thin bezels.
await expect(menu).toMatchAriaSnapshot(`
- navigation "Products":
- link "Overview"
- link "Pricing"
`);
Keep snapshots focused on meaningful expectations, such as landmarks, headings, control names, and state. Avoid treating a broad snapshot as a complete usability assessment: it checks structure against a template, not whether someone can understand or operate the experience.
4. Compare the rendered screenshot
After the state is visible and stable, compare it with its saved reference:
await expect(page).toHaveScreenshot('products-menu-open.png');
Playwright Test’s visual-comparisons documentation explains screenshot baselines and their comparison. Review any diff before updating the baseline; update it only when the new appearance is intended. Keep the browser, operating system, rendering settings, and execution mode consistent between baseline creation and comparison because they can affect rendered output.
Rank #4
- CURVED FOR ENHANCED ENGAGEMENT: An immersive viewing experience with a curved monitor that wraps more closely around your field of vision; It creates a wider view, enhancing depth perception and minimizing peripheral distraction
- SMOOTH PERFORMANCE FOR SEAMLESS CONTENT: Stay in the action when playing games, watching videos, or working on creative projects; The 100Hz refresh rate reduces lag and motion blur so you don't miss a thing in fast-paced moments¹
- MORE GAMING POWER: Gain the edge with optimizable game settings; Color and image contrast can be adjusted to see scenes more vividly and spot enemies hiding in the dark; Game Mode adjusts any game to fill the screen so you can view every detail²
- KEEP IT EASY ON THE EYES: Care for your eyes and stay comfortable, even during long sessions; Advanced eye comfort technology certified by TÜV reduces eye strain by minimizing blue light and reducing irritating screen flicker²
- INCREASED VERSATILITY: Connect to more; Plug devices straight into your monitor for increased flexibility, making your computing environment even more convenient
5. Repeat for each state
Make each important state an explicit test target, either in separate tests or in a carefully controlled sequence. For a form, for example, test the invalid-submission state after submitting incomplete data and the confirmation state after valid data. Run the automated scan, structural assertions, and screenshot comparison against the state that is actually on screen.
What each comparison method proves—and what it does not
| Method | What it can establish | Main limitation |
|---|---|---|
| Screenshot comparison | Whether rendered pixels differ from a saved reference. | Rendering differences can create noise; pixels do not establish semantics or operability. |
| Automated accessibility scan | Whether configured rules found detectable violations in the current rendered state. | It detects only some problems and depends on the state scanned and rules configured. |
| Accessibility-tree snapshot | Whether the current accessible structure matches an expected template. | It is a structural assertion, not a complete usability or conformance assessment; Playwright matching is order-sensitive. |
| Manual keyboard, assistive-technology, and inclusive user review | Whether people can reach, understand, and operate the interface in context. | It requires planned human review and coverage suited to the product and its risks. |
What to check manually
Automated checks and screenshots should feed into human review, not replace it. Playwright notes that automated tests can detect some common accessibility problems, while many problems can only be discovered through manual testing. W3C WAI’s preliminary checks also call attention to functionality available only on mouse hover and not through keyboard focus.
- Navigate through the tested state with a keyboard. Confirm relevant controls can be reached and operated.
- Check that keyboard focus is visible as you move through controls.
- Check revealed content, including menus and dialogs, with assistive technology appropriate to your product and risk.
- Include inclusive user assessment when the product or risk calls for it; a passing automated scan cannot stand in for that experience.
WAI maintains a Web Accessibility Evaluation Tools List for finding evaluation tools. A tool can assist assessment, but its results still need to be interpreted alongside state coverage and human checks.
Best Value
- 【INTEGRATED SPEAKERS】Whether you're at work or in the midst of an intense gaming session, our built-in speakers provide rich and seamless audio, all while keeping your desk clutter-free.
- 【EASY ON THE EYES】 Protect your eyes and enhance your comfort with Blue-Light Shift technology. This feature reduces harmful blue light emissions from your screen, helping to alleviate eye strain during long hours of use and promoting healthier viewing habits.
- 【WIDEN YOUR PERSPECTIVE】Our sleek minimal bezel design ensures undivided attention. The nearly bezel-free display seamlessly connects in a dual monitor arrangement, delivering an unobstructed view that lets you focus on more at once, completely distraction-free.
How to keep screenshot evidence reliable
- Use the same browser, operating system, rendering settings, and execution mode for baseline creation and comparison.
- Capture only after the intended state appears and relevant content has settled.
- When a diff appears, inspect the changed region and decide whether it represents an intended design change, an unintended regression, or environment-related rendering variation.
- Do not update baselines simply to make a failing comparison pass; first determine whether the new appearance is expected.
- Report visual diffs separately from scan violations, accessibility-tree mismatches, and manual findings so reviewers know what each result means.
Or skip the browser setup
For a screenshot without configuring browser capture locally, ScreenshotNeo can return a page image through one GET request. This example requests a WebP screenshot of the open-menu state; the URL must identify a page where that state is already reachable, or be adapted to your application’s way of exposing it. See the ScreenshotNeo API documentation for request options.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp
ScreenshotNeo accepts cookie or consent banners as a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each step can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers indicate the page verdict and billing status. Its MCP server provides take_screenshot, get_page_info, and capture_pdf for AI agents. The free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 shots.
Sign up for ScreenshotNeo and get 1,000 screenshots a month free, with no card.
Frequently Asked Questions
Does a matching screenshot mean the page is accessible?
No. It only indicates that the rendered pixels match the reference; semantics and operability require separate checks.
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallShould every possible UI state have a screenshot baseline?
No. Prioritize meaningful states users actually encounter, based on the product’s interactions and risks.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

