# Frontend accessibility best practices
> Use when building or reviewing React components, forms and controls for accessibility.
Accessibility (a11y) best practices for React components. Use when creating UI components, forms, interactive elements, or reviewing code for accessibility compliance.
## Facts
- Type: Agent skill
- Discipline: Engineering
- Author: Sergio Xalambri (https://github.com/sergiodxa)
- Upstream: https://github.com/sergiodxa/agent-skills/blob/main/skills/frontend-accessibility-best-practices/SKILL.md
- Source file: https://raw.githubusercontent.com/sergiodxa/agent-skills/main/skills/frontend-accessibility-best-practices/SKILL.md (4066 bytes, sha256:82dbc5d54d7ed45a836cd7a0e956511dc258c558cf6829fbaf7c789d7a593c47)
- Licence: MIT
- Upstream copy last changed: 2026-09-17
- Status: listed, not yet ruled on by the curator
## Use it
I want to use the Frontend accessibility best practices skill by Sergio Xalambri.
This is what it does, in the author's own words: Accessibility (a11y) best practices for React components. Use when creating UI components, forms, interactive elements, or reviewing code for accessibility compliance.
Download the whole folder at https://github.com/sergiodxa/agent-skills/tree/main/skills/frontend-accessibility-best-practices, SKILL.md and every file beside it, into your skills directory: ~/.claude/skills/frontend-accessibility-best-practices/ for Claude Code, ~/.agents/skills/frontend-accessibility-best-practices/ for Codex, ~/.cursor/skills/frontend-accessibility-best-practices/ for Cursor. Get it from the author's repo, not from startupskills.dev.
Then tell me the path you installed it to and how to invoke it.
Nothing here is vendored: install from the author's repo, not from this site. A verbatim copy of the author's file follows for reading, under the licence reproduced after it; the current file is in the author's repo.
## Links
- Page: https://startupskills.dev/sergiodxa/frontend-accessibility-best-practices
- Author: https://startupskills.dev/sergiodxa
- Index: https://startupskills.dev/llms.txt
## The file itself
---
name: frontend-accessibility-best-practices
description: Accessibility (a11y) best practices for React components. Use when creating UI components, forms, interactive elements, or reviewing code for accessibility compliance.
---
# Accessibility Best Practices
Accessibility patterns for building inclusive React applications following WCAG standards. Contains 7 rules across 4 categories focused on semantic HTML, screen reader support, keyboard navigation, and user preferences.
## When to Apply
Reference these guidelines when:
- Creating new UI components
- Building forms and interactive elements
- Adding dynamic content or notifications
- Implementing navigation patterns
- Reviewing code for accessibility
## Rules Summary
### Semantic HTML & Structure (HIGH)
#### semantic-html-landmarks - @rules/semantic-html-landmarks.md
Use semantic HTML elements for page structure.
```tsx
// Bad: divs with class names
...
...
...
// Good: semantic elements
......
```
### Screen Readers (MEDIUM)
#### screen-reader-sr-only - @rules/screen-reader-sr-only.md
Use sr-only class for visually hidden text.
```tsx
// Icon-only buttons need accessible labels
// Visually hidden section headings
;
```
### Keyboard & Focus (HIGH)
#### keyboard-navigation - @rules/keyboard-navigation.md
Use semantic elements for built-in keyboard support.
```tsx
// Bad: div with onClick not keyboard accessible
Click me
// Good: button has Enter/Space support
// Good: react-aria Button handles everything
import { Button } from "react-aria-components";
```
#### focus-management - @rules/focus-management.md
Show visible focus indicators and trap focus in modals.
```tsx
// Always use focus-visible for focus styles
;
// react-aria Modal handles focus trapping automatically
import { Modal, Dialog } from "react-aria-components";
;
```
### User Preferences (MEDIUM)
#### reduced-motion - @rules/reduced-motion.md
Respect prefers-reduced-motion setting.
```tsx
import { usePrefersReducedMotion } from "~/hooks/use-prefers-reduced-motion";
// CSS approach
Bouncing content
;
// JS approach
function AnimatedCounter({ value }) {
let prefersReducedMotion = usePrefersReducedMotion();
if (prefersReducedMotion) return {value};
return ;
}
```
#### touch-targets - @rules/touch-targets.md
Ensure 44x44px minimum touch targets.
```tsx
// Icon buttons need explicit sizing
// Links need padding for tappable area
{label}
```
## Key Files
- `app/components/heading.tsx` - Region, Heading, Main components
- `app/hooks/use-prefers-reduced-motion.ts` - Reduced motion hook
- `app/components/field/field.tsx` - Accessible form field component
## Licence of the file above
The file above is https://raw.githubusercontent.com/sergiodxa/agent-skills/main/skills/frontend-accessibility-best-practices/SKILL.md, by Sergio Xalambri, reproduced without changes.
- Source: https://github.com/sergiodxa/agent-skills/blob/main/skills/frontend-accessibility-best-practices/SKILL.md
- Copyright: Copyright (c) 2026 Sergio XalambrÃ
- Licence: MIT, https://raw.githubusercontent.com/sergiodxa/agent-skills/main/LICENSE
The repo's licence file, verbatim from https://raw.githubusercontent.com/sergiodxa/agent-skills/main/LICENSE:
MIT License
Copyright (c) 2026 Sergio XalambrÃ
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.