/tsh-stack-frontend:ensuring-accessibilityfrom TSH Stack: Frontend
WCAG 2.1 AA patterns for building accessible frontend components: semantic HTML, keyboard navigation, focus management, ARIA best practices, and contrast minimums. Use when implementing accessible components or adding keyboard/screen-reader support.
Ships in TSH Stack: Frontend. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
WCAG 2.1 AA compliance patterns for building inclusive frontend interfaces with proper semantic markup, keyboard navigation, focus management, and screen reader support — applied while implementing, not audited afterwards.
Local repository rules outrank this skill: the project's component library and its accessible primitives come first — verify their rendered HTML matches expectations rather than re-implementing them.
| Severity | Rule |
|---|---|
| MUST | Start with the correct HTML element: <button> for actions, <a href> for navigation, <nav>/<main>/<header>/<footer> landmarks, one <h1> per page with no skipped heading levels. Native semantics are free and reliable; reach for ARIA only when HTML cannot express the pattern. |
| MUST | Make every mouse interaction available to the keyboard: Tab order follows visual order, custom interactive elements get tabindex="0" and explicit key handlers, overlays close on Escape. Missing keyboard support is a blocker, not a nice-to-have. |
| NEVER | Remove the focus outline (outline: none) without a visible replacement of at least 3:1 contrast, or use a tabindex greater than 0. |
| NEVER | Convey information through color alone: error states need an icon or text besides the red border; status indicators need labels, not just colored dots. |
| MUST | Meet contrast minimums: 4.5:1 for normal text, 3:1 for large text, interactive component boundaries, and informative non-text content. |
| MUST | Move focus when context changes: into an opened modal, back to the trigger on close, to the heading or main content on route change; announce dynamic content via aria-live. |
| NEVER | Add ARIA that duplicates native semantics (role="button" on a <div> instead of <button>, role="heading" on an <h2>), or aria-label on non-interactive, non-landmark elements. |
button, a, form controls),
landmarks (header, nav, main, aside, footer), structure (article,
section with a heading, details/summary), heading hierarchy, and ul/ol/
dl for lists. When the component library wraps these, inspect the rendered HTML.aria-label),
expandables (aria-expanded), live updates (aria-live="polite"/"assertive"),
dialogs (aria-modal, aria-labelledby), form errors (aria-invalid +
aria-describedby + role="alert"), loading (role="status"), current nav page
(aria-current="page"), progress (role="progressbar" + aria-valuenow).
Full pattern tables in the reference below.npx @axe-core/cli <URL> (ask for the URL if unknown),
violations grouped by impact, re-run after fixes.- [ ] Semantic HTML elements used (button, nav, main, …)
- [ ] One h1 per page, logical heading hierarchy (no skipped levels)
- [ ] All interactive elements keyboard-navigable, focus always visible
- [ ] Tab order follows visual/logical layout
- [ ] Modal/dialog traps focus and returns it on close
- [ ] Icon-only buttons have aria-label
- [ ] Form fields have visible labels (not placeholder-only)
- [ ] Form errors announced (role="alert" or aria-live)
- [ ] Error states use icon/text in addition to color
- [ ] Contrast: 4.5:1 normal text / 3:1 large text and boundaries
- [ ] ARIA landmarks present (header, main, nav, footer)
- [ ] Text resizable to 200%; content reflows at 400% zoom (SC 1.4.4, 1.4.10)
| Reference | Load when | Covers |
|---|---|---|
| ARIA, contrast and RTL | Picking an ARIA pattern, checking exact contrast ratios or keyboard maps, or supporting RTL | The ARIA quick-reference table, per-widget keyboard behavior, contrast tables, RTL/bidirectional rules |
implementing-frontend — the component
composition these patterns apply to.auditing-accessibility in
tsh-product-testing, which may not be installed — name the gap rather than
improvising an audit here.What SKILL.md sets; muted values are Claude Code's defaults
Trigger on: implementing a component that must be accessible, keyboard navigation or focus management work, choosing between semantic HTML and ARIA, form error announcements, color-contrast decisions during implementation, or RTL support. Auditing an existing page for violations is tsh-product-testing's auditing-accessibility; component composition itself is implementing-frontend.
Three short reads, in order
wcag, a11y, semantic-html, keyboard-navigation, focus-management, aria
3 skills in this plugin
/configuring-typescript-for-frontendConfigures TypeScript for browser-targeted frontend projects: which version to pin, the tsconfig baseline for a bundler-resolved app, and the React + Vite project layout. Use when starting a frontend project, editing a frontend tsconfig, diagnosing JSX or module-resolution errors, or upgrading TypeScript in a browser app./implementing-frontendTSH conventions for any change to frontend application code, React today, with or without a design: components, custom hooks and the non-UI modules around them, named imports from react, typed props, module boundaries and barrel files, the three UI states every data-dependent component handles, design tokens, and a mandatory Figma read before markup when a design exists. Use when writing or refactoring any browser app code — a component, hook, store, API client, utility or module move, in a .ts, .tsx or .jsx file.npx claudepluginhub thesoftwarehouse/agentic-collections --plugin tsh-stack-frontendOther plugins' skills for the same job