Accessibility Expert

slb2248/ai-ux-skills

Use a WCAG 2.1-oriented checklist for semantic HTML, keyboard access, contrast and accessible form behavior.

Contenuto aggiornato: SKILL.md
Punteggio di qualità 82/100
npx skills add slb2248/ai-ux-skills --skill accessibility-expert
7Stelle1ForkUltimo push del repository

Install and use Accessibility Expert

  1. Install the Skill

    Run the upstream command in your project, then follow the author’s setup guide and any requirements below.

    npx skills add slb2248/ai-ux-skills --skill accessibility-expert
  2. Give your agent a task

    Provide the relevant files, context and constraints. For example:

    Audit this form for keyboard access, labels, contrast and WCAG 2.1 issues; explain what needs manual verification.

Informazioni sullo Skill

Use a WCAG 2.1-oriented checklist for semantic HTML, keyboard access, contrast and accessible form behavior.

SKILL.md

Autore: Brian (slb2248) · slb2248/ai-ux-skills · MIT · SKILL.md @ b7530f8

---
name: accessibility-expert
description: Build inclusive interfaces with WCAG compliance and best practices.
---

# Accessibility Expert

Create inclusive digital experiences that work for everyone.

## WCAG 2.1 Quick Reference

### Level A (Minimum)
- All images have alt text
- Videos have captions
- Content is keyboard accessible
- No seizure-triggering content
- Pages have titles

### Level AA (Target for most)
- 4.5:1 contrast for text
- 3:1 contrast for UI components
- Text resizable to 200%
- Focus visible on all elements
- Error suggestions provided

### Level AAA (Enhanced)
- 7:1 contrast ratio
- Sign language for video
- Extended audio descriptions
- No timing-based interactions

## Semantic HTML First

```html
<!-- Use semantic elements -->
<nav> instead of <div class="nav">
<button> instead of <div onclick>
<main> instead of <div id="main">
<article> instead of <div class="article">

<!-- Proper heading hierarchy -->
<h1>Page Title</h1>
  <h2>Section</h2>
    <h3>Subsection</h3>
```

## ARIA When Needed

```html
<!-- Only when HTML semantics aren't enough -->
<div role="tablist">
  <button role="tab" aria-selected="true">Tab 1</button>
  <button role="tab" aria-selected="false">Tab 2</button>
</div>

<!-- Live regions for dynamic content -->
<div aria-live="polite">Status: Saved</div>
<div aria-live="assertive">Error: Form invalid</div>

<!-- Descriptions and labels -->
<input aria-describedby="hint">
<span id="hint">Password must be 8 characters</span>
```

## Keyboard Navigation

### Focus Management
- Visible focus indicator on all interactive elements
- Logical tab order (follows visual order)
- Skip links for main content
- Focus trap in modals

### Key Patterns
| Key | Action |
|-----|--------|
| Tab | Move to next element |
| Shift+Tab | Move to previous |
| Enter/Space | Activate button |
| Arrow keys | Navigate within component |
| Escape | Close modal/menu |

## Screen Reader Support

### Content Structure
- Use landmarks: main, nav, aside, footer
- Descriptive link text (not "click here")
- Announce dynamic changes
- Provide text alternatives

### Testing Checklist
- [ ] Can navigate with keyboard only
- [ ] Screen reader announces all content
- [ ] Focus order makes sense
- [ ] Dynamic content is announced
- [ ] Forms have proper labels
- [ ] Errors are clearly communicated

## Color & Contrast

### Don't Rely on Color Alone
- Add icons or patterns
- Use text labels
- Provide multiple indicators

### Contrast Requirements
- Normal text: 4.5:1 minimum
- Large text (18px+): 3:1 minimum
- UI components: 3:1 minimum
- Focus indicators: 3:1 minimum

## Forms

```html
<!-- Always associate labels -->
<label for="email">Email</label>
<input id="email" type="email" required>

<!-- Group related fields -->
<fieldset>
  <legend>Shipping Address</legend>
  <!-- address fields -->
</fieldset>

<!-- Clear error messages -->
<input aria-invalid="true" aria-describedby="error">
<span id="error" role="alert">Please enter valid email</span>
```

## Testing Tools

- **axe DevTools**: Browser extension
- **WAVE**: Web accessibility evaluation
- **Lighthouse**: Built into Chrome
- **NVDA/VoiceOver**: Screen readers
- **Colour Contrast Analyser**: Check contrast

Perché lo abbiamo scelto

Review interface markup and prioritize accessibility improvements.

A cosa serve

  • Review interface markup and prioritize accessibility improvements.

Prima di usarlo

  • The checklist is guidance, not a compliance certification; check the applicable current WCAG standard and test with assistive technology.

Fonti e riferimenti

Le fonti originali sono collegate qui sotto. Gli spunti pratici sono suggerimenti editoriali di SkillHey.