fixing-accessibility
When to Use
Use this skill when you need audit and fix HTML accessibility issues including ARIA labels, keyboard navigation, focus management, color contrast, and form errors. Use when adding interactive controls, forms, dialogs, or reviewing WCAG compliance.
Fix accessibility issues.
how to use
Do not rewrite large parts of the UI. Prefer minimal, targeted fixes.
when to apply
Reference these guidelines when:
- adding or changing buttons, links, inputs, menus, dialogs, tabs, dropdowns
- building forms, validation, error states, helper text
- implementing keyboard shortcuts or custom interactions
- working on focus states, focus trapping, or modal behavior
- rendering icon-only controls
- adding hover-only interactions or hidden content
rule categories by priority
| priority |
category |
impact |
| 1 |
accessible names |
critical |
| 2 |
keyboard access |
critical |
| 3 |
focus and dialogs |
critical |
| 4 |
semantics |
high |
| 5 |
forms and errors |
high |
| 6 |
announcements |
medium-high |
| 7 |
contrast and states |
medium |
| 8 |
media and motion |
low-medium |
| 9 |
tool boundaries |
critical |
quick reference
1. accessible names (critical)
- every interactive control must have an accessible name
- icon-only buttons must have aria-label or aria-labelledby
- every input, select, and textarea must be labeled
- links must have meaningful text (no “click here”)
- decorative icons must be aria-hidden
2. keyboard access (critical)
- do not use div or span as buttons without full keyboard support
- all interactive elements must be reachable by Tab
- focus must be visible for keyboard users
- do not use tabindex greater than 0
- Escape must close dialogs or overlays when applicable
3. focus and dialogs (critical)
- modals must trap focus while open
- restore focus to the trigger on close
- set initial focus inside dialogs
- opening a dialog should not scroll the page unexpectedly
4. semantics (high)
- prefer native elements (button, a, input) over role-based hacks
- if a role is used, required aria attributes must be present
- lists must use ul or ol with li
- do not skip heading levels
- tables must use th for headers when applicable
5. forms and errors (high)
- errors must be linked to fields using aria-describedby
- required fields must be announced
- invalid fields must set aria-invalid
- helper text must be associated with inputs
- disabled submit actions must explain why
6. announcements (medium-high)
- critical form errors should use aria-live
- loading states should use aria-busy or status text
- toasts must not be the only way to convey critical information
- expandable controls must use aria-expanded and aria-controls
7. contrast and states (medium)
- ensure sufficient contrast for text and icons
- hover-only interactions must have keyboard equivalents
- disabled states must not rely on color alone
- do not remove focus outlines without a visible replacement
8. media and motion (low-medium)
- images must have correct alt text (meaningful or empty)
- videos with speech should provide captions when relevant
- respect prefers-reduced-motion for non-essential motion
- avoid autoplaying media with sound
9. tool boundaries (critical)
- prefer minimal changes, do not refactor unrelated code
- do not add aria when native semantics already solve the problem
- do not migrate UI libraries unless requested
common fixes
<!-- icon-only button: add aria-label -->
<!-- before --> <button><svg>...</svg></button>
<!-- after --> <button aria-label="Close"><svg aria-hidden="true">...</svg></button>
<!-- div as button: use native element -->
<!-- before --> <div
<!-- after --> <button
<!-- form error: link with aria-describedby -->
<!-- before --> <input id="email" /> <span>Invalid email</span>
<!-- after --> <input id="email" aria-describedby="email-err" aria-invalid="true" /> <span id="email-err">Invalid email</span>
review guidance
- fix critical issues first (names, keyboard, focus, tool boundaries)
- prefer native HTML before adding aria
- quote the exact snippet, state the failure, propose a small fix
- for complex widgets (menu, dialog, combobox), prefer established accessible primitives over custom behavior
Limitations
- Use this skill only when the task clearly matches its upstream source and local project context.
- Verify commands, generated code, dependencies, credentials, and external service behavior before applying changes.
- Do not treat examples as a substitute for environmen
1---2name: fixing-accessibility3description: Audit and fix HTML accessibility issues including ARIA labels, keyboard navigation, focus management, color contrast, and form errors. Use when adding interactive controls, forms, dialogs, or reviewin4category: AI & Agents5source: antigravity6tags: [ai, image, security, cro]7url: https://github.com/sickn33/antigravity-awesome-skills/tree/main/skills/fixing-accessibility8metadata:9 source: https://skillmd.com/skills/sickn33/fixing-accessibility10---111213# fixing-accessibility14## When to Use1516Use this skill when you need audit and fix HTML accessibility issues including ARIA labels, keyboard navigation, focus management, color contrast, and form errors. Use when adding interactive controls, forms, dialogs, or reviewing WCAG compliance.171819Fix accessibility issues.2021## how to use2223- `/fixing-accessibility`24 Apply these constraints to any UI work in this conversation.2526- `/fixing-accessibility <file>`27 Review the file against all rules below and report:28 - violations (quote the exact line or snippet)29 - why it matters (one short sentence)30 - a concrete fix (code-level suggestion)3132Do not rewrite large parts of the UI. Prefer minimal, targeted fixes.3334## when to apply3536Reference these guidelines when:37- adding or changing buttons, links, inputs, menus, dialogs, tabs, dropdowns38- building forms, validation, error states, helper text39- implementing keyboard shortcuts or custom interactions40- working on focus states, focus trapping, or modal behavior41- rendering icon-only controls42- adding hover-only interactions or hidden content4344## rule categories by priority4546| priority | category | impact |47|----------|----------|--------|48| 1 | accessible names | critical |49| 2 | keyboard access | critical |50| 3 | focus and dialogs | critical |51| 4 | semantics | high |52| 5 | forms and errors | high |53| 6 | announcements | medium-high |54| 7 | contrast and states | medium |55| 8 | media and motion | low-medium |56| 9 | tool boundaries | critical |5758## quick reference5960### 1. accessible names (critical)6162- every interactive control must have an accessible name63- icon-only buttons must have aria-label or aria-labelledby64- every input, select, and textarea must be labeled65- links must have meaningful text (no “click here”)66- decorative icons must be aria-hidden6768### 2. keyboard access (critical)6970- do not use div or span as buttons without full keyboard support71- all interactive elements must be reachable by Tab72- focus must be visible for keyboard users73- do not use tabindex greater than 074- Escape must close dialogs or overlays when applicable7576### 3. focus and dialogs (critical)7778- modals must trap focus while open79- restore focus to the trigger on close80- set initial focus inside dialogs81- opening a dialog should not scroll the page unexpectedly8283### 4. semantics (high)8485- prefer native elements (button, a, input) over role-based hacks86- if a role is used, required aria attributes must be present87- lists must use ul or ol with li88- do not skip heading levels89- tables must use th for headers when applicable9091### 5. forms and errors (high)9293- errors must be linked to fields using aria-describedby94- required fields must be announced95- invalid fields must set aria-invalid96- helper text must be associated with inputs97- disabled submit actions must explain why9899### 6. announcements (medium-high)100101- critical form errors should use aria-live102- loading states should use aria-busy or status text103- toasts must not be the only way to convey critical information104- expandable controls must use aria-expanded and aria-controls105106### 7. contrast and states (medium)107108- ensure sufficient contrast for text and icons109- hover-only interactions must have keyboard equivalents110- disabled states must not rely on color alone111- do not remove focus outlines without a visible replacement112113### 8. media and motion (low-medium)114115- images must have correct alt text (meaningful or empty)116- videos with speech should provide captions when relevant117- respect prefers-reduced-motion for non-essential motion118- avoid autoplaying media with sound119120### 9. tool boundaries (critical)121122- prefer minimal changes, do not refactor unrelated code123- do not add aria when native semantics already solve the problem124- do not migrate UI libraries unless requested125126## common fixes127128```html129<!-- icon-only button: add aria-label -->130<!-- before --> <button><svg>...</svg></button>131<!-- after --> <button aria-label="Close"><svg aria-hidden="true">...</svg></button>132133<!-- div as button: use native element -->134<!-- before --> <div onclick="save()">Save</div>135<!-- after --> <button onclick="save()">Save</button>136137<!-- form error: link with aria-describedby -->138<!-- before --> <input id="email" /> <span>Invalid email</span>139<!-- after --> <input id="email" aria-describedby="email-err" aria-invalid="true" /> <span id="email-err">Invalid email</span>140```141142## review guidance143144- fix critical issues first (names, keyboard, focus, tool boundaries)145- prefer native HTML before adding aria146- quote the exact snippet, state the failure, propose a small fix147- for complex widgets (menu, dialog, combobox), prefer established accessible primitives over custom behavior148149## Limitations150151- Use this skill only when the task clearly matches its upstream source and local project context.152- Verify commands, generated code, dependencies, credentials, and external service behavior before applying changes.153- Do not treat examples as a substitute for environmen