}>
  **Lesson 7 of 10**: Primitives reduce accessibility work, but they do not remove responsibility.

## What primitives handle automatically

For dialog-like patterns, primitives provide:

* dialog role and structural semantics,
* label/description linkage,
* trigger state attributes,
* focus trap and restoration,
* escape/outside dismissal patterns.

This baseline is strong, but wrappers can still break it.

***

## Most common breakages

1. Missing or meaningless dialog title.
2. Icon-only actions without `aria-label`.
3. Incorrect use of tooltip for interactive content.
4. Moving interactive nodes outside intended focus/layer boundaries.
5. Preventing default on dismissal events without alternative close path.

***

## Manual keyboard audit script

For each overlay component:

1. Focus trigger with <Kbd>Tab</Kbd>.
2. Activate with <Kbd>Enter</Kbd> or <Kbd>Space</Kbd>.
3. Traverse all controls with <Kbd>Tab</Kbd> and <Kbd>Shift+Tab</Kbd>.
4. Close with <Kbd>Escape</Kbd>.
5. Confirm focus returns to expected anchor.

If any step fails, block release.

***

## Screen reader audit script

Verify with VoiceOver or NVDA:

* Trigger announces intent.
* Dialog/menu role is announced.
* Title/description are meaningful.
* Item states (checked/selected/disabled) are communicated.

Do not rely on visual inspection as proof.

***

## Inspecting semantics in DevTools

Use browser accessibility tooling to verify:

* computed role,
* accessible name,
* accessible description,
* state attributes.

This catches wrapper-level mistakes quickly.

***

## Accessibility release checklist

* All modal surfaces have titles.
* All icon buttons have labels.
* Escape closes where expected.
* Focus never gets lost after close.
* Reduced-motion path is usable.
* Color and contrast checks pass for all states.

***

## Lab

1. Audit your dialog, popover, and menu wrappers with keyboard only.
2. Run a screen-reader pass and document announcements.
3. Fix at least one issue found and note root cause.

}>
  Next: [Lesson 8 - Building a Design System](/duck-primitives/course/08-design-system)