agentleFS
manish1803manish1803/nextjs-fullstack-skills/skills/01-frontend-engineering/accessibility-a11y/SKILL.md

accessibility-a11y

Skill2 starsChanged 4 months agoMITView on GitHub

Audit and implement web accessibility (WCAG 2.1/2.2 AA) — semantic HTML, ARIA, keyboard navigation, focus management, color contrast. Use whenever building interactive components (modals, dropdowns, forms, tabs), reviewing UI for accessibility, or the user mentions "accessible", "a11y", "screen reader", "keyboard navigation", "WCAG". Also proactively apply this skill's checklist to every interactive component built, even if not explicitly requested.

8 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

2 rules. 0 are common, 0 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 7 edited versions we read keep these.

  • 0

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Visible focus indicators: never outline: none without a replacement focus style — required for keyboard users.

    line 14
  2. Very specific:

    Forms: every input has a programmatically associated <label>.

    line 17

“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Accessibility (a11y) Frontend Skill

Accessibility is a default quality bar for every interactive component this agent builds, not an optional add-on.

Non-negotiables for any interactive component

  1. Semantic HTML first: <button> for actions, <a> for navigation, real <form>/<label>/<input> — don't build a "button" out of a <div onClick>. ARIA is a patch for cases HTML can't express, not a default.
  2. Keyboard operability: everything clickable must be reachable and operable via Tab/Shift+Tab, Enter/Space, and Escape (to close dialogs/menus). Custom widgets (dropdown, combobox, tabs) follow the WAI-ARIA APG pattern for that widget's key bindings.
  3. Focus management: on opening a modal/drawer, move focus into it and trap it there; on close, return focus to the trigger element. Never let focus silently land on <body>.
  4. Visible focus indicators: never outline: none without a replacement focus style — required for keyboard users.
  5. Color contrast: text meets 4.5:1 (normal) / 3:1 (large text ≥18px) against its background; don't rely on color alone to convey state (add an icon/label alongside red/green).
  6. Images/icons: meaningful images get descriptive alt; purely decorative images/icons get alt="" or aria-hidden="true".
  7. Forms: every input has a programmatically associated <label>; errors are announced (aria-describedby linking to the error message, role="alert" for live validation feedback).

Component-specific patterns

  • Modal/Dialog: role="dialog" aria-modal="true" aria-labelledby pointing to the title, focus trap, Escape to close. Prefer Radix/headless primitives which implement this correctly over hand-rolling.
  • Dropdown/Menu: role="menu"/menuitem with arrow-key navigation, or use <select> for simple cases.
  • Tabs: role="tablist"/tab/tabpanel, arrow keys move between tabs, only the active tab is in the natural Tab order.
  • Toasts/live regions: aria-live="polite" (or "assertive" for errors) so screen readers announce updates without moving focus.

Quick audit checklist (run before shipping any new UI)

  • Can I complete the entire flow using only the keyboard?
  • Does every interactive element have an accessible name (visible text, aria-label, or aria-labelledby)?
  • Is there a logical heading hierarchy (h1→h2→h3, no skipped levels)?
  • Do animations respect prefers-reduced-motion?
  • Run axe DevTools / Lighthouse accessibility audit and resolve criticals before merging.

Anti-patterns to flag

  • <div onClick> used as a button with no role="button"/tabIndex/keyboard handler
  • Icon-only buttons with no accessible label
  • Custom checkbox/radio built without role, aria-checked, and keyboard support
  • Motion-heavy interfaces with no prefers-reduced-motion fallback

Example prompt this skill should trigger on

"Build a dropdown menu for the user profile in the navbar." (Apply this skill even though accessibility wasn't explicitly requested.)

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.