agentleFS
web-werkstattweb-werkstatt/claude-code-workflow/skills/accessibility-a11y/SKILL.md

accessibility-a11y

Skill0 starsChanged 7 months agoMITView on GitHub

Implement web accessibility (a11y) best practices following WCAG guidelines to create inclusive, accessible user interfaces.

8 other projects use a version of this, 2 of them edited.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

41 rules. 0 are common, 33 are distinctive, and 8 are very specific to this project.

  • 0

    Common

    Most of the 5 edited versions we read keep these.

  • 33

    Distinctive

    This author's own choices. Worth a look.

  • 8

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Follow WCAG (Web Content Accessibility Guidelines) standards

    line 12
  2. Distinctive:

    Use semantic HTML to improve accessibility and screen reader compatibility

    line 13
  3. Distinctive:

    Ensure high accessibility standards using ARIA roles and native accessibility props

    line 14
  4. Distinctive:

    Test with various assistive technologies

    line 16
  5. Very specific:

    Use semantic elements like <header>, <main>, <footer>, <nav>, <article>, <section>, <aside>

    line 21
  6. Distinctive:

    Use proper heading hierarchy (h1-h6) without skipping levels

    line 23
  7. Very specific:

    Use landmarks (e.g., <nav>, <main>, <aside>) for screen reader navigation

    line 24
  8. Distinctive:

    Use appropriate input types (email, tel, number, etc.)

    line 31
  9. Distinctive:

    Use ARIA roles and attributes to enhance accessibility where semantic HTML is insufficient

    line 37
  10. Distinctive:

    Prefer native HTML elements over ARIA when possible

    line 38
  11. Very specific:

    Use aria-label for elements without visible text labels

    line 39
  12. Very specific:

    Use aria-live regions for dynamic content updates

    line 41
  13. Very specific:

    Use role="button" only when a non-button element must act as a button

    line 44
  14. Very specific:

    Use aria-hidden="true" for decorative elements

    line 46
  15. Very specific:

    Use aria-labelledby to reference visible labels

    line 48
  16. Distinctive:

    Ensure sufficient color contrast for text (minimum 4.5:1 for normal text, 3:1 for large text)

    line 53
  17. Distinctive:

    Never use color as the only means of conveying information

    line 54
  18. Distinctive:

    Test designs with color blindness simulators

    line 56
  19. Distinctive:

    Use focus styles to indicate focus state clearly

    line 59
  20. Distinctive:

    Ensure visible focus indicators on all interactive elements

    line 60
  21. Distinctive:

    Avoid removing outline styles without providing alternatives

    line 62
  22. Distinctive:

    Ensure all functionality is accessible via keyboard alone

    line 69
  23. Distinctive:

    Use tabindex appropriately (0 for natural order, -1 for programmatic focus)

    line 70
  24. Distinctive:

    Ensure interactive elements are large enough for touch (minimum 44x44 pixels)

    line 75
  25. Distinctive:

    Ensure all images have descriptive alt text

    line 83
  26. Distinctive:

    Use empty alt="" for decorative images

    line 84
  27. Distinctive:

    Use descriptive link text (avoid "click here")

    line 87
  28. Distinctive:

    Use relative units (rem, em) for typography

    line 90
  29. Distinctive:

    Ensure text can be resized up to 200% without loss of functionality

    line 91
  30. Distinctive:

    Avoid justified text which can create uneven spacing

    line 93
  31. Distinctive:

    Ensure touch targets are appropriately sized

    line 101
  32. Very specific:

    Consider prefers-contrast for high contrast needs

    line 107
  33. Distinctive:

    Use tools like Lighthouse for accessibility audits

    line 113
  34. Distinctive:

    Run accessibility checks in CI/CD pipelines

    line 115
  35. Distinctive:

    Test with screen readers (NVDA, JAWS, VoiceOver)

    line 119
  36. Distinctive:

    Test with browser zoom at 200%

    line 121
  37. Distinctive:

    Use browser accessibility inspection tools

    line 122
  38. Distinctive:

    Test with actual users who have disabilities when possible

    line 123
  39. Distinctive:

    Use external stylesheets; avoid inline styles for maintainability

    line 127
  40. Distinctive:

    Use class selectors for styling (BEM naming methodology recommended)

    line 129
  41. Distinctive:

    Ensure hover states also have focus equivalents

    line 131

“Common” is measured: kept by at least 6 in 10 of the 5 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) Best Practices

You are an expert in web accessibility and inclusive design. Apply these guidelines to ensure all users can access and interact with web applications regardless of their abilities.

Core Accessibility Principles

  • Follow WCAG (Web Content Accessibility Guidelines) standards
  • Use semantic HTML to improve accessibility and screen reader compatibility
  • Ensure high accessibility standards using ARIA roles and native accessibility props
  • Design for all users including those with visual, auditory, motor, and cognitive disabilities
  • Test with various assistive technologies

Semantic HTML

Structural Elements

  • Use semantic elements like <header>, <main>, <footer>, <nav>, <article>, <section>, <aside>
  • Employ <button> for interactive elements, not <div> or <span>
  • Use proper heading hierarchy (h1-h6) without skipping levels
  • Use landmarks (e.g., <nav>, <main>, <aside>) for screen reader navigation
  • Avoid deprecated markup

Form Accessibility

  • Associate labels with form inputs using for and id attributes
  • Group related form elements with <fieldset> and <legend>
  • Provide clear error messages and validation feedback
  • Use appropriate input types (email, tel, number, etc.)
  • Include placeholder text as supplementary hints, not replacements for labels

ARIA Implementation

When to Use ARIA

  • Use ARIA roles and attributes to enhance accessibility where semantic HTML is insufficient
  • Prefer native HTML elements over ARIA when possible
  • Use aria-label for elements without visible text labels
  • Implement aria-describedby for additional context
  • Use aria-live regions for dynamic content updates

Common ARIA Patterns

  • Use role="button" only when a non-button element must act as a button
  • Implement aria-expanded for collapsible content
  • Use aria-hidden="true" for decorative elements
  • Apply aria-current="page" for navigation highlighting
  • Use aria-labelledby to reference visible labels

Visual Accessibility

Color and Contrast

  • Ensure sufficient color contrast for text (minimum 4.5:1 for normal text, 3:1 for large text)
  • Never use color as the only means of conveying information
  • Provide alternative indicators (icons, patterns, text) alongside color
  • Test designs with color blindness simulators

Focus Management

  • Use focus styles to indicate focus state clearly
  • Ensure visible focus indicators on all interactive elements
  • Manage focus appropriately when content changes dynamically
  • Avoid removing outline styles without providing alternatives
  • Implement logical tab order

Keyboard Navigation

Navigation Requirements

  • Provide keyboard navigation for all interactive elements
  • Ensure all functionality is accessible via keyboard alone
  • Use tabindex appropriately (0 for natural order, -1 for programmatic focus)
  • Implement keyboard shortcuts for complex interactions
  • Avoid keyboard traps

Interactive Elements

  • Ensure interactive elements are large enough for touch (minimum 44x44 pixels)
  • Implement keyboard event handlers (onKeyDown, onKeyPress) alongside click handlers
  • Support Enter and Space keys for activating buttons
  • Implement arrow key navigation for complex widgets

Content Accessibility

Images and Media

  • Ensure all images have descriptive alt text
  • Use empty alt="" for decorative images
  • Provide captions for videos
  • Include transcripts for audio content
  • Use descriptive link text (avoid "click here")

Text and Typography

  • Use relative units (rem, em) for typography
  • Ensure text can be resized up to 200% without loss of functionality
  • Maintain adequate line height and letter spacing
  • Avoid justified text which can create uneven spacing
  • Support user preferences for reduced motion

Responsive and Adaptive Design

Mobile-First Approach

  • Design mobile-first, then scale upward
  • Implement responsive layouts that work across devices
  • Ensure touch targets are appropriately sized
  • Support both portrait and landscape orientations

User Preferences

  • Respect prefers-reduced-motion for animations
  • Support prefers-color-scheme for dark/light modes
  • Consider prefers-contrast for high contrast needs
  • Implement prefers-reduced-transparency when applicable

Testing and Validation

Automated Testing

  • Use tools like Lighthouse for accessibility audits
  • Integrate axe-core for automated accessibility testing
  • Run accessibility checks in CI/CD pipelines
  • Address all critical and serious accessibility issues

Manual Testing

  • Test with screen readers (NVDA, JAWS, VoiceOver)
  • Navigate entirely by keyboard
  • Test with browser zoom at 200%
  • Use browser accessibility inspection tools
  • Test with actual users who have disabilities when possible

CSS Best Practices for Accessibility

  • Use external stylesheets; avoid inline styles for maintainability
  • Leverage Flexbox and Grid for robust layouts
  • Use class selectors for styling (BEM naming methodology recommended)
  • Implement responsive design with media queries
  • Ensure hover states also have focus equivalents

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.