Ship
Accessibility
Atmosphere is built to meet WCAG 2.1 level AA. This page explains what is already done, and what to keep in mind when you add your own pages.
#What is built in
| Area | What Atmosphere does |
|---|---|
| Color contrast | All text meets 4.5 to 1 on every surface, in both themes. The values were measured, not guessed. |
| Meaning without color | No state is shown by color or depth alone. Every LED and status has a word beside it. |
| Keyboard | Every control works with the keyboard. Menus, tabs and dialogs follow the WAI-ARIA Authoring Practices. |
| Focus | The focus ring is never removed. It sits on top of the carved wells, so a focused field still looks carved. |
| Dialogs and drawers | They keep focus inside while open, close with Esc, and return focus to the button that opened them. |
| Screen readers | Native HTML elements first. Charts have a text summary. Toasts are announced. Icon-only keys have labels. |
| Motion | Every animation respects the reduced motion setting. See Motion. |
| High contrast | When the operating system asks for more contrast, the muted text and dividers become darker. |
| Right-to-left | The layout mirrors for right-to-left languages. See Appearance settings. |
#Color contrast
The neumorphic style is known for low contrast. Atmosphere fixes this with dark ink on pale clay, and with a separate text form of each signal color.
| Text color | On the background | On a panel | In a well |
|---|---|---|---|
--am-ink |
11.9 : 1 | 13.9 : 1 | 10.6 : 1 |
--am-ink-2 |
6.4 : 1 | 7.5 : 1 | 5.8 : 1 |
--am-ink-3 |
4.5 : 1 | 5.3 : 1 | uses --am-ink-2 |
--am-accent-text |
5.1 : 1 | 6.0 : 1 | 4.6 : 1 |
--am-bad-text |
5.1 : 1 | 6.0 : 1 | 4.6 : 1 |
These are the light theme values. The graphite theme passes on every surface too.
Two rules keep this true:
-
--am-ink-4is never text. It is for lines, ticks and disabled icons only. -
Inside a well, the muted text color is made darker by itself. The
.am-wellclass sets--am-ink-3to the--am-ink-2value, because the well is the darkest surface.
If you change colors, check the new pairs with a contrast tool. See Theming.
#Keyboard
| Key | Where | What it does |
|---|---|---|
| Tab, Shift Tab | Everywhere | Move between controls |
| ⌘ K or Ctrl K | Everywhere | Open the command palette |
| ↑ ↓ | Command palette, menus | Move between items |
| ← → | Tabs and segmented controls | Move between tabs |
| Enter | Command palette, menus | Open or choose the item |
| Esc | Dialogs, drawers, menus, palette | Close |
| Space | Switches, checkboxes | Toggle |
The sidebar keys open their menu on keyboard focus as well as on hover.
#When you build your own pages
-
Give every icon-only button a label:
<Button iconOnly icon={IconBell} aria-label="Notifications" />. -
Give every chart a
labelthat says what the chart shows. -
Give every
Switch,SliderandStepperalabel. It is required for this reason. -
Connect labels to fields with
Field htmlForand the input'sid. -
Put a word next to every color. Use
<Chip led="bad">Offline</Chip>, not only a red dot. -
Use the
-textcolor roles for colored text, never the fill colors. -
Give each page one
h1.PageHeadalready renders it. -
Use real elements: a
<button>for actions and a<Link>for navigation, never a clickable<div>.
#Testing
We recommend two free tools:
- axe DevTools or Lighthouse in your browser, to find missing labels and contrast problems.
- A screen reader: VoiceOver on macOS and iOS, or NVDA on Windows.