frontend-a11y
Installation
SKILL.md
Frontend A11y
Write as little code as possible. Reach for a native HTML element before an ARIA attribute or a JavaScript library — the browser already ships the accessibility, and every attribute you don't write is one less thing to break.
Adapt to the Project's Stack
Every rule here is framework-agnostic. Frameworks compile to HTML, so <button> vs <div role="button">, contrast ratios, WCAG criteria, and landmark rules are identical whether the source is JSX, a Vue template, Svelte, Angular, or raw HTML. The HTML/CSS examples below are the canonical source of truth — the concepts never change, only the syntax.
So don't rewrite this file — take one beat before writing code to fit the output to the project:
- Detect the stack. Check
package.json, file extensions (.jsx/.tsx,.vue,.svelte), and framework config. When unsure, match how existing components in the repo are written. - Translate the examples. Re-express each snippet in the project's idioms — attribute names (
class→className,for→htmlForin React), event binding, id generation — keeping the semantics identical. - Mind the footguns. Frameworks reintroduce hazards plain HTML doesn't have: client-side routing that never moves focus, template escape hatches that enable XSS, component libraries that bury native semantics. When the stack matches a reference file below, read it first — it covers only the deltas from the HTML baseline.