What is the frontend a11y skill?
Frontend a11y is a skill in the affaan-m/ECC repo with accessibility patterns for React and Next.js. It covers form labels and error links, semantic HTML, ARIA usage, keyboard navigation, focus restoration in modals, image alt text and reduced motion, and ends with a pre-review checklist.
Frontend a11y is a SKILL.md in the ECC repository that collects the accessibility issues most often flagged in code review for React and Next.js. Each pattern shows a bad snippet and a good one.
Its triggers include building forms, modals, dropdowns, tooltips and tabs, fixing accessibility lint findings, and wiring keyboard navigation. It mentions CodeRabbit and ESLint a11y feedback as typical sources.
What changes in your agent's output
- Every input gets a label tied by htmlFor and id, and error text is linked with aria-describedby and aria-invalid.
- Clickable div and span elements become buttons or anchors, so keyboard and screen reader users get native behavior.
- ARIA is added only when native HTML is not enough, and icon-only buttons get an accessible name.
- Modals save and restore focus, and dynamic updates use aria-live regions.
- Animation checks the prefers-reduced-motion setting.
Who it is for
Best for
- React and Next.js teams clearing accessibility comments from code review or lint.
- Custom widgets such as dropdowns, accordions and tabs that need keyboard support.
- Anyone who wants a short checklist to run before submitting an interactive component.
Not for
- Full WCAG audits with scoring, which need a dedicated audit skill and real assistive technology.
- Frameworks other than React and Next.js, since every example is TSX.
- A complete focus trap. The skill itself points to a library for Tab cycling.
Use it with UiChemy
These patterns apply to React code you write. UiChemy builds WordPress pages instead, so check accessibility inside the generated page separately. Click Get Started on uichemy.com to try Composer.
How to install Frontend A11y Skill: Accessible React and Next.js Patterns
npx [email protected] setupSetup can be rerun later to update ECC or change scope. A manual route is also described in the README: clone the repository and copy the skill folder you want.Check the prerequisites
The README asks for Node.js 18 or newer. The Claude Code plugin route also needs Git and Claude Code 2.1 or newer on your PATH.
Run the guided setup
Run
npx [email protected] setupand follow the prompts. It installs the ECC plugin, which carries the whole skill library, not this skill on its own.Choose one install method
The README warns against stacking install methods in the same harness, because that can duplicate skills, commands and hooks. Pick the plugin route or a manual route, not both.
Other agents
For Codex or Kimi Code run
npx [email protected] install --guided. It lets you pick the harnesses and shows each destination before writing.Use the skill
Ask your agent to apply the frontend a11y skill when it builds or reviews a form, modal or dropdown.
Check that it loaded
Ask the agent to list loaded skills and look for frontend-a11y, or have it review a component and check that it cites labels, roles and focus handling.
Key features
- Label connectionThe skill contrasts a label with no connection to its input against htmlFor and id pairing. This is the most common code-review finding it names.
- Required fieldsA visual-only asterisk conveys nothing to a screen reader. The fix is the required attribute, aria-required and an asterisk hidden with aria-hidden.
- Linked error messagesError text is tied to the field with aria-describedby, the invalid state uses aria-invalid, and the message carries role alert. A full login form example shows all of it together.
- Semantic elementsA button for actions, an anchor for navigation and sequential heading levels are preferred over div handlers, with reasons such as focusability and right-click behavior.
- ARIA rulesThe skill says wrong ARIA is worse than no ARIA. It explains aria-label versus aria-labelledby, aria-describedby, aria-expanded with aria-controls, and polite versus assertive live regions.
- Keyboard dropdownA combobox example handles arrow keys, Enter, Space and Escape, with listbox and option roles and aria-selected on the active item.
- Focus managementA modal example moves focus in, restores it to the opener on close, and handles Escape. A note recommends focus-trap-react for full Tab and Shift+Tab cycling.
- Images and iconsDecorative images use an empty alt and aria-hidden, meaningful images get descriptive alt text, and icon buttons get an aria-label.
- Reduced motionA small hook reads the media query and listens for changes, so transitions switch off for users who asked for less motion.
- Anti-patterns and checklistSix bad patterns, including positive tabIndex and aria-hidden on focusable elements, are followed by an eight-item checklist for interactive components.
Frequently asked questions
What is frontend a11y?
It is a skill in the affaan-m/ECC repository with accessibility patterns for React and Next.js. It shows bad and good code for form labels, error messages, semantic HTML, ARIA attributes, keyboard navigation, focus management, image alt text and reduced motion, followed by a checklist.
How do I install frontend a11y?
It ships inside ECC. The README's recommended route is npx [email protected] setup, which needs Node.js 18 or newer. Pick one install method per agent, since the README warns that stacking a plugin and a manual install can duplicate skills and commands.
Does it do a full WCAG audit?
No. It is a pattern library for building and reviewing components, with a checklist of eight items. It does not score a site against WCAG criteria or replace testing with assistive technology. For audits see WCAG Accessibility Audit or A11y Ally.
Does it cover focus trapping in modals?
Only partly. The example saves the focused element, moves focus into the dialog and restores it on close. A note in the skill says to use a library such as focus-trap-react for full Tab and Shift+Tab cycling, including dynamic content and nested portals.
Does it work with Claude Code, Cursor and Codex?
The ECC README says it works best with Claude Code, has native Codex and Qoder plugin paths, and ships capability-limited adapters for Cursor, OpenCode, Gemini and others. Check its support matrix, because feature parity is not promised for every tool.
Is it only for React?
The patterns and examples are written in TSX for React and Next.js. The ideas, such as labels, native elements and focus restoration, apply anywhere, but an agent working in another framework would have to translate the code. For general rules, see Web Accessibility Skill.
What are frontend a11y alternatives?
For per-component audits, Accessibility Per Component checks WCAG 2.2 AA. For screen reader announcements, ARIA Live Regions goes deeper than the single live-region example here. Frontend a11y is the lighter option for everyday component work.


