Skip to main content
rulesSource-backed

AI-Generated Frontend Accessibility Review Rules

Source-backed rules for reviewing AI-generated frontend UI changes for accessibility before merge, with semantic HTML, keyboard paths, focus management, labels, automated scan limits, manual checks, and privacy-safe evidence.

by MkDev11·added 2026-06-04·
Review first review before installing

Open the source and read safety notes before installing.

Citation facts

Source-backed facts for citing this resource, derived directly from the registry — also available as plain text for AI assistants.

Source URLs
https://playwright.dev/docs/accessibility-testing, https://github.com/JSONbored/awesome-claude/blob/main/content/rules/ai-generated-frontend-accessibility-review-rules.mdx
Safety notes
AI-generated UI can silently replace semantic controls with divs, remove labels, hide focus indicators, break keyboard order, change error messaging, or add motion that affects users., Automated scans catch important classes of issues but do not prove that custom widgets, focus restoration, reading order, copy meaning, or assistive-technology behavior are correct., Browser automation and accessibility checks should run against local, preview, or staging environments with test accounts so forms, payments, messages, and destructive actions are not triggered in production.
Privacy notes
Accessibility evidence can include screenshots, DOM text, accessible names, form values, labels, user content, network traces, browser storage, cookies, and test account data., Do not paste raw screenshots, traces, accessibility trees, DOM snapshots, customer names, private routes, or production form data into public PR comments without redaction., Use synthetic content and test accounts for accessibility examples, especially when reviewing auth, billing, dashboards, healthcare, education, or support flows.
Author
MkDev11
Submitted by
MkDev11
Claim status
unclaimed
Last verified
2026-06-04

Decision playbook

Review trust signals before you adopt

Signals are present but mixed. Use the checklist below to confirm the source and operational safety for your environment.

Compare context
Selected

0

Current score

78

Baseline

Delta

No baseline selected

No major trust-signal divergence detected in the current selection.

Source and provenance checks

Complete

Confirm ownership and provenance before trusting install instructions.

  • Source link availableRequired

    Open the canonical repository and verify ownership.

    Done
  • Source provenance statusRequired

    Marked as source-backed.

    Done
  • Metadata reviewed

    Registry metadata indicates a reviewed listing.

    Done

Safety and privacy checks

Complete

Validate risk disclosures before installation or API wiring.

  • Safety notes presentRequired

    Review the listed safety guidance before running commands.

    Done
  • Privacy notes presentRequired

    Review data handling notes before connecting accounts or secrets.

    Done
  • Trust level risk gateRequired

    Trust level does not block evaluation.

    Done

Package and install checks

Needs review

Check package metadata and artifact integrity signals.

  • Install payload available

    Install or copy payload is available for review.

    Done
  • Package verification flag

    No package verification flag provided.

    Pending
  • Checksum metadata

    No checksum provided for downloaded artifact.

    Pending

Compare-driven decision checks

Needs review

Use compare context to validate trade-offs before adoption.

  • Compare tray has multiple entries

    Add at least one more entry to compare trust differences.

    Pending
  • Baseline comparison available

    No baseline peer selected yet.

    Pending
  • Diverging trust signals identified

    No major trust-signal divergence found.

    Pending

Setup at a glance

Copy & paste

Copy-ready — paste the snippet to get started.

20 minutes

Adoption plan

Balanced adoption plan

Current risk score 16/100. Use staged verification before broader rollout.

Risk 16

Pre-adoption checks

Validate source and review signals before any execution.

  • Confirm source provenanceRequired

    Source URL/provenance metadata is present.

    Done
  • Confirm metadata review state

    Listing has review metadata.

    Done
  • Verify install payload

    Install/config payload exists and can be inspected.

    Done

Security checks

Confirm safety, privacy, and package integrity signals.

  • Review safety notesRequired

    Safety notes are present.

    Done
  • Review privacy notesRequired

    Privacy notes are present.

    Done
  • Verify package integrity metadata

    No package verification/checksum metadata.

    Pending

Rollout

Adopt in controlled steps based on the selected plan.

  • Run in isolated sandbox firstRequired

    Use a constrained sandbox and observe behavior across multiple tasks.

    Pending
  • Roll out graduallyRequired

    Roll out to a small cohort before wider usage.

    Pending
  • Set monitoring and fallback

    Define rollback path and monitor errors after adoption.

    Pending

Evidence readiness

Evidence readiness matrix · balanced

Required evidence gates are covered (5/6 signals complete).

Risk 15

Source provenance

Present

Source repository/provenance is listed.

Required in this preset

Metadata review

Present

Review metadata is present.

Required in this preset

Safety notes

Present

Safety notes are present.

Required in this preset

Privacy notes

Present

Privacy notes are present.

Optional in this preset

Package integrity

Missing

Package integrity metadata is missing.

Optional in this preset

Install payload

Present

Install payload is available.

Required in this preset

Required evidence gates are covered for this preset.

Decision timeline

Decision timeline · balanced

5/6 steps complete with no blocking gaps for this preset.

Risk 14

triage

Confirm source provenanceRequired

Source/provenance metadata is available.

Done

triage

Check metadata review statusRequired

Review metadata is available.

Done

verify

Review safety notesRequired

Safety notes are available.

Done

verify

Review privacy notes

Privacy notes are available.

Done

verify

Validate package integrity metadata

Package integrity metadata is missing.

Pending

rollout

Verify install payload and commandsRequired

Install payload is available.

Done

No required blockers for this timeline preset.

Prerequisite readiness

Prerequisite readiness

4 prerequisites to line up before setup. Have accounts and credentials ready first. Includes a review or approval gate.

0/4 ready
Account & credentials1Permissions & scopes1Review & approval1General120 minutes

Safety & privacy surface

Safety & privacy surface

3 safety and 3 privacy notes across 4 risk areas. Review closely: network access.

4 areas
  • SafetyGeneralAI-generated UI can silently replace semantic controls with divs, remove labels, hide focus indicators, break keyboard order, change error messaging, or add motion that affects users.
  • SafetyData retentionAutomated scans catch important classes of issues but do not prove that custom widgets, focus restoration, reading order, copy meaning, or assistive-technology behavior are correct.
  • SafetyExecution & processesBrowser automation and accessibility checks should run against local, preview, or staging environments with test accounts so forms, payments, messages, and destructive actions are not triggered in production.
  • PrivacyNetwork accessAccessibility evidence can include screenshots, DOM text, accessible names, form values, labels, user content, network traces, browser storage, cookies, and test account data.
  • PrivacyGeneralDo not paste raw screenshots, traces, accessibility trees, DOM snapshots, customer names, private routes, or production form data into public PR comments without redaction.
  • PrivacyGeneralUse synthetic content and test accounts for accessibility examples, especially when reviewing auth, billing, dashboards, healthcare, education, or support flows.

Safety notes

  • AI-generated UI can silently replace semantic controls with divs, remove labels, hide focus indicators, break keyboard order, change error messaging, or add motion that affects users.
  • Automated scans catch important classes of issues but do not prove that custom widgets, focus restoration, reading order, copy meaning, or assistive-technology behavior are correct.
  • Browser automation and accessibility checks should run against local, preview, or staging environments with test accounts so forms, payments, messages, and destructive actions are not triggered in production.

Privacy notes

  • Accessibility evidence can include screenshots, DOM text, accessible names, form values, labels, user content, network traces, browser storage, cookies, and test account data.
  • Do not paste raw screenshots, traces, accessibility trees, DOM snapshots, customer names, private routes, or production form data into public PR comments without redaction.
  • Use synthetic content and test accounts for accessibility examples, especially when reviewing auth, billing, dashboards, healthcare, education, or support flows.

Prerequisites

  • A frontend pull request, patch, generated component, route, story, or visual diff with enough context to identify changed user flows.
  • Access to the project's accessibility target, component library conventions, design tokens, browser test command, and review environment.
  • A local, preview, or staging URL where keyboard checks and automated accessibility scans can run without touching production data.
  • Permission to block merge when generated UI removes accessibility semantics or when verification evidence is incomplete.

Schema details

Install type
copy
Reading time
6 min
Difficulty score
43
Troubleshooting
Yes
Breaking changes
No
Collection metadata
Estimated setup
20 minutes
Difficulty
intermediate
Full copyable content
You are reviewing an AI-generated frontend UI change for accessibility.

Rules:
1. Map every generated UI change to the user flow, interactive states, and
   assistive-technology path it can affect.
2. Prefer native semantic HTML over custom controls; use ARIA only when the
   required interaction pattern is understood and tested.
3. Require keyboard navigation, visible focus, predictable focus movement,
   labels, error messaging, text alternatives, contrast, and reduced-motion
   behavior for changed surfaces.
4. Treat axe, Playwright, lint, and Storybook checks as useful evidence, not
   as proof that the UI is accessible.
5. Block merge when generated markup, CSS, copy, or component wiring removes
   names, roles, states, keyboard behavior, focus order, or readable text.
6. Keep screenshots, traces, DOM snapshots, test data, and issue examples
   privacy-safe before sharing review evidence.

About this resource

Purpose

Use these rules when an AI coding assistant creates or edits frontend UI. The goal is to stop generated markup, styling, copy, and component wiring from shipping inaccessible behavior just because the page looks correct in a visual diff.

This is a review policy, not a full WCAG tutorial and not an automated scanner. It tells reviewers what evidence must exist before an AI-generated UI change is safe to merge.

Review Inputs

Collect enough context to know what changed.

  1. Changed surfaces. Components, forms, navigation, dialogs, menus, popovers, route transitions, tables, charts, empty states, errors, loading states, responsive layouts, and icons.
  2. Interaction paths. Mouse, keyboard, touch, screen reader, zoom, high-contrast, reduced-motion, and narrow viewport use.
  3. State inventory. Default, hover, focus, active, disabled, invalid, expanded, selected, loading, success, warning, error, and empty states.
  4. Evidence path. Unit or component tests, Storybook states, Playwright flows, axe results, manual keyboard checks, screenshots, and design tokens.
  5. Privacy boundary. Whether test evidence can expose user content, private route names, accessible names, screenshots, traces, or browser state.

If the PR cannot name the changed surfaces and interaction paths, require that inventory before reviewing style or visual polish.

Semantic Markup Rules

  • Prefer native controls such as button, a, input, select, textarea, label, fieldset, legend, details, and heading elements before custom ARIA widgets.
  • Do not turn buttons, links, tabs, menus, checkboxes, or dialogs into generic containers unless the full keyboard and ARIA pattern is implemented.
  • Keep accessible names stable when generated copy changes visible labels, icons, tooltips, placeholders, or aria-label values.
  • Preserve heading order, landmarks, form labels, error descriptions, table headers, image alternatives, and live-region meaning when refactoring markup.
  • Remove unnecessary ARIA when native semantics already provide the role, state, name, and keyboard behavior.

ARIA can repair some custom patterns, but it can also create a false role or state that conflicts with actual behavior. Review the rendered interaction, not only the JSX or template.

Keyboard And Focus Rules

  • Every changed interactive element must be reachable and operable by keyboard.
  • Focus indicators must remain visible after generated CSS, reset rules, animations, or design-token changes.
  • Opening dialogs, menus, popovers, drawers, and route overlays must move focus predictably and restore focus when closed.
  • Tab order should follow the visual and logical reading order without hidden traps, skipped controls, or offscreen focus targets.
  • Escape, Enter, Space, arrow keys, and Tab behavior must match the widget pattern being used.
  • Disabled, loading, and pending states must not strand keyboard users or hide the control's purpose.

Do not accept a screenshot as evidence for keyboard accessibility. The reviewer needs a manual check, a browser test, or a component story that exercises the interaction.

Visual And Content Rules

  • Text must remain readable at responsive breakpoints, zoomed views, and long localized strings.
  • Color must not be the only way to convey errors, success, selection, or required fields.
  • Contrast, focus ring visibility, target size, spacing, and touch affordances must survive generated theme or CSS changes.
  • Motion, auto-advance, skeletons, shimmer effects, and animated transitions should respect reduced-motion expectations and avoid interfering with input.
  • Error messages should be connected to the field or region they describe, and users should know how to recover.
  • Icons, images, charts, and generated decorative assets need intentional text alternatives or explicit decorative treatment.

Generated UI often changes copy and visual hierarchy while leaving tests green. Review content meaning as part of accessibility, not as a separate polish pass.

Evidence Rules

Automated checks are useful, but they are not the whole review.

  • Run an automated accessibility scan for changed pages, stories, or key flows when the project has one.
  • Use Playwright, Storybook, component tests, or a local browser to cover the changed interactive states.
  • Pair axe results with manual keyboard checks for dialogs, menus, custom selects, tabs, drag-and-drop, form validation, and route transitions.
  • Tie evidence to the latest commit after rebases, force pushes, generated CSS, snapshot updates, or final copy edits.
  • Record skipped checks and explain whether the gap is accepted by a frontend owner, design-system owner, or accessibility reviewer.

Passing axe output does not guarantee that the UI is usable. It is evidence for known rule classes, not a replacement for user-flow review.

Merge Blockers

Block merge until resolved when:

  • generated markup replaces a native control with a custom widget that lacks keyboard behavior or the required role, state, and name;
  • labels, accessible names, alt text, error descriptions, headings, landmarks, table headers, or live announcements are missing or stale;
  • focus order, focus visibility, focus restoration, or Escape/Enter/Space behavior is broken for changed interactions;
  • color, animation, icon-only UI, placeholder text, or visual placement is the only way to understand the state;
  • automated scan output is treated as complete proof for a custom interaction;
  • screenshots, traces, DOM snapshots, or accessibility trees expose private user content or internal routes in public review comments;
  • accessibility evidence ran before the latest generated UI, CSS, copy, or snapshot update.

Review Checklist

  • {"task": "Surfaces mapped", "description": "The PR identifies changed components, routes, states, and interaction paths"}
  • {"task": "Semantics preserved", "description": "Native controls, headings, labels, names, roles, states, and descriptions remain correct"}
  • {"task": "Keyboard works", "description": "Changed interactions are reachable, operable, visibly focused, and have predictable focus movement"}
  • {"task": "Visual cues accessible", "description": "Contrast, motion, target size, responsive text, and non-color cues are reviewed"}
  • {"task": "Evidence current", "description": "Automated scans and manual or browser checks ran after the latest UI change"}
  • {"task": "Privacy safe", "description": "Screenshots, traces, DOM output, and examples avoid private user data and internal details"}

AI Review Rules

AI assistants can help find accessibility risk, but they should show their evidence.

  • Ask the assistant to list changed UI surfaces before asking for a verdict.
  • Require selectors, component names, routes, or stories for every accessibility concern.
  • Have the assistant separate confirmed issues from checks it could not run.
  • Do not let the assistant claim screen-reader compatibility from source code alone.
  • Re-run review after generated markup, styling, copy, snapshot, or test changes.

Troubleshooting

  • The UI looks fine but keyboard fails: restore native controls or implement the documented widget pattern, then retest focus order and key behavior.
  • A scan passes but users cannot complete the flow: add manual keyboard and state coverage for the actual interaction.
  • The design uses icon-only controls: provide visible or accessible names and test that tooltips are not the only label path.
  • A modal traps focus forever: ensure close controls, Escape behavior, and focus restoration are covered by test or manual review.
  • Evidence contains private data: rerun with synthetic data or redact the public artifact before posting.

Duplicate And History Check

Checked existing rules, hooks, statuslines, guides, collections, skills, open PRs, and closed PRs for WCAG accessibility auditor, frontend accessibility workflow, accessibility checker hook, accessibility-first statusline, keyboard focus rules, ARIA guidance, axe testing, Playwright accessibility testing, and AI-generated UI review.

Adjacent content includes the WCAG accessibility auditor rule, the accessibility checker hook, the frontend QA accessibility collection, and the accessibility statusline. This entry is distinct because it is a portable pre-merge review policy for AI-generated frontend diffs: it decides what changed surfaces, keyboard/focus evidence, semantic HTML review, automated-scan limits, and privacy-safe evidence must exist before a generated UI change can merge.

No prior closed PR for Closes #735 was found during the duplicate/history check.

Automated Scan Reference

The Playwright accessibility-testing guide pairs Playwright with the @axe-core/playwright package. A baseline scan asserts that no automatically detectable violations exist for a page:

import { test, expect } from '@playwright/test';
import AxeBuilder from '@axe-core/playwright';

test('should not have any automatically detectable accessibility issues', async ({ page }) => {
  await page.goto('https://your-site.com/');

  const accessibilityScanResults = await new AxeBuilder({ page }).analyze();

  expect(accessibilityScanResults.violations).toEqual([]);
});

To scan only the rules tagged for WCAG A and AA success criteria, constrain the run with withTags:

const accessibilityScanResults = await new AxeBuilder({ page })
  .withTags(['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21aa'])
  .analyze();

AxeBuilder exposes the configuration the guide documents:

AxeBuilder method What it does (per the Playwright guide)
.analyze() Run the accessibility scan against the page.
.include() Constrain an accessibility scan to only run against one specific part of a page.
.exclude() Exclude part of a page from being scanned until you're able to fix the issues.
.withTags() Run only those rules tagged as corresponding to specific WCAG success criteria.
.disableRules() Temporarily disable individual rules until you're able to fix the issues.

Sources

Source citations

Add this badge to your README

Show that AI-Generated Frontend Accessibility Review Rules is listed on HeyClaude. Paste this Markdown into your README — it renders the badge and links back to this page.

Listed on HeyClaude
[![Listed on HeyClaude](https://heyclau.de/badge/rules/ai-generated-frontend-accessibility-review-rules.svg)](https://heyclau.de/entry/rules/ai-generated-frontend-accessibility-review-rules)

How it compares

AI-Generated Frontend Accessibility Review Rules side by side with 3 alternatives on trust, install, platform support, and disclosed safety notes — all from reviewed registry metadata.

1 trust signal differ across this comparison (Submitter).

Field

Source-backed rules for reviewing AI-generated frontend UI changes for accessibility before merge, with semantic HTML, keyboard paths, focus management, labels, automated scan limits, manual checks, and privacy-safe evidence.

Open dossier

Source-backed rules for reviewing event-sourcing implementation changes, covering immutable event design, event schema evolution without breaking projections, idempotent event handlers, snapshot and replay correctness, and consistent event-store access patterns.

Open dossier

Transform Claude into a Playwright specialist with deep knowledge of browser automation, resilient locators, fixtures, tracing, and CI-friendly end-to-end testing.

Open dossier

Source-backed rules for reviewing TypeScript API client compatibility before merge, with exported type-surface diffs, inferred router inputs and outputs, runtime validator alignment, downstream compile checks, and privacy-safe evidence.

Open dossier
Next steps
Trust
Review statusReviewedMaintainer reviewedReviewedMaintainer reviewedReviewedMaintainer reviewedReviewedMaintainer reviewed
Package trustPackage not verifiedPackage not verifiedPackage not verifiedPackage not verified
Source provenanceSource-backedSource-backedSource-backedSource-backed
SubmitterDiffersMkDev11jaso0n0818jaso0n0818MkDev11
Install riskReview firstReview firstReview firstReview first
Notes Safety ✓ Privacy ✓ Safety ✓ Privacy ✓ Safety · Privacy ✓ Safety ✓ Privacy ✓
Brand
Categoryrulesrulesrulesrules
SourceSource-backedSource-backedSource-backedSource-backed
AuthorMkDev11jaso0n0818jaso0n0818MkDev11
Added2026-06-042026-06-192026-06-172026-06-04
Platforms
Harness
Source repo
Safety notesAI-generated UI can silently replace semantic controls with divs, remove labels, hide focus indicators, break keyboard order, change error messaging, or add motion that affects users. Automated scans catch important classes of issues but do not prove that custom widgets, focus restoration, reading order, copy meaning, or assistive-technology behavior are correct. Browser automation and accessibility checks should run against local, preview, or staging environments with test accounts so forms, payments, messages, and destructive actions are not triggered in production.Mutating or deleting a persisted event corrupts the audit log and breaks replays that depend on the original event sequence, potentially causing unrecoverable inconsistency. A non-backward-compatible event schema change can break all running projections that read older events, causing data loss in read models or replay failures. A non-idempotent event handler can apply the same event twice on replay or redelivery, producing incorrect aggregate state that is invisible in normal operation but surfaces during recovery.— missingA TypeScript API change can compile in the edited package while breaking frontend consumers, generated clients, cache invalidation, form validation, or error handling in another workspace. Generated declaration files, SDK clients, and API reports should be regenerated from reviewed source and inspected before commit; stale generated output can make reviewers approve the wrong contract. Runtime validators and inferred types must be reviewed together because a type-only change can still accept or reject different data at runtime.
Privacy notesAccessibility evidence can include screenshots, DOM text, accessible names, form values, labels, user content, network traces, browser storage, cookies, and test account data. Do not paste raw screenshots, traces, accessibility trees, DOM snapshots, customer names, private routes, or production form data into public PR comments without redaction. Use synthetic content and test accounts for accessibility examples, especially when reviewing auth, billing, dashboards, healthcare, education, or support flows.Event stores often contain an immutable history of personal data; deletion requests for GDPR or similar regulations must be handled by encryption-key rotation or event compaction, not by deleting events. Do not include sensitive personal data (passwords, payment card details, health records) directly in event payloads; reference identifiers and look up sensitive data separately. Be careful with event replay in non-production environments that copy the production event log, since they inherit all personal data in the event history.Rules reference test credentials and environment URLs; store them in CI secrets or local env files, never in committed test sources.API client types, API reports, router names, procedure names, schemas, examples, error unions, and generated clients can expose internal routes, unreleased features, auth models, tenant fields, and private payload shapes. Do not paste raw production request bodies, response examples, validation errors, API reports, or downstream compile logs into public comments without redacting private fields and internal identifiers. Use synthetic fixtures for compatibility examples when the client surface includes customer data, billing fields, healthcare data, education records, support tickets, or private workspace metadata.
Prerequisites
  • A frontend pull request, patch, generated component, route, story, or visual diff with enough context to identify changed user flows.
  • Access to the project's accessibility target, component library conventions, design tokens, browser test command, and review environment.
  • A local, preview, or staging URL where keyboard checks and automated accessibility scans can run without touching production data.
  • Permission to block merge when generated UI removes accessibility semantics or when verification evidence is incomplete.
  • A pull request or diff that adds or edits event types, handlers, projections, aggregates, snapshots, or event-store queries in an event-sourced system.
  • Knowledge of the event store and framework in use, since stream naming, optimistic concurrency, and replay semantics differ between implementations.
  • Access to a test environment where event replay, schema evolution, and snapshot consistency can be exercised without corrupting the production event log.
  • Permission to block merge when an event schema change breaks existing projections, a handler is not idempotent, or aggregate state diverges between load paths.
— none listed
  • A TypeScript web app, package, SDK, typed API client, tRPC router, generated client, or shared types package whose public surface is consumed outside the edited module.
  • Access to the relevant type-check command, package build, generated declaration output, API report, type tests, and at least one downstream consumer or fixture.
  • A named owner for client compatibility, deprecation policy, generated artifacts, runtime validators, and release notes.
  • Permission to block merge when a type-surface change has no downstream compile evidence or safe migration path.
Install
Config
Citations
ClaimUnclaimedUnclaimedUnclaimedUnclaimed
Open 4 picks in the interactive comparison tool

Related guides

Signals

Loading live community signals…

More like this, weekly

A short, calm digest of reviewed Claude resources. Unsubscribe any time.