# /better-accessibility: Fix keyboard, focus, ARIA and form issues against WCAG 2.2

Source: https://trendhub.net/skills/jakubkrehel-skills/better-accessibility
Skill folder: https://github.com/jakubkrehel/skills/tree/main/skills/better-accessibility
Pack: Jakub Krehel's Interface Skills (https://trendhub.net/skills/jakubkrehel-skills)
Works with: Agents supported by the skills CLI

better-accessibility has the agent walk an interface twice, once with only the keyboard and once as a screen reader would hear it, and report each failure against a numbered WCAG 2.2 A or AA criterion. It favours native elements over ARIA, covers focus, forms, announcements, motion and zoom, and keeps conventions such as larger touch targets as recommendations rather than blockers.

## When to use it

- A custom dropdown, dialog or tab set needs to work without a mouse.
- Form errors are not announced or users cannot tell which field failed.
- You need findings tied to specific WCAG criteria for a compliance discussion.

## How it works

1. **Prefer native elements**: The agent replaces clickable divs with buttons or links and removes ARIA that a native element already provides.
2. **Check focus and keyboard**: It requires a visible focus-visible ring with sufficient contrast, APG key maps for composite widgets, and focus moved into dialogs and back to the trigger on close.
3. **Label forms and errors**: Every input gets a real label, autocomplete and input type, validation runs on submit, and invalid fields are marked and described.
4. **Handle motion and zoom**: Motion becomes opt-in behind a reduced-motion query, long-running movement gets a pause control and the page must reflow at 320px and 200% text size.
5. **Report by severity**: Findings are grouped by principle with location, before, after and the criterion, ending in Block when a high-severity item remains.

## What it steers the agent away from

- Removing outlines with no tested replacement focus style.
- Disabling the submit button until a form is valid.
- Marking AAA criteria or style conventions as high severity.

## What it can touch

It reads markup, styles and component code, can inspect the accessibility tree and tab order when a browser is available, and edits code only when asked to fix.

## Pairs well with

- `/better-colors`
- `/better-interface`
- `/better-writing`

## Questions

### Does it measure color contrast itself?

It decides which contrast ratio applies and hands the measurement of the rendered pair to better-colors.

### What happens to checks it cannot run?

Any check that needs a browser and could not be performed is reported as not verified rather than passed.
