TREULICH.ME DESIGN SYSTEM
Toolbar / Map controls
A working build of the career map toolbar from About, using the decided tokens and rules (AB-4Q to AB-4V). Try the key buttons, move and zoom, the two view toggles, and high contrast. The map fills the content area, and the toolbar picks its layout from that width. Every part and state is listed below.
LIVE STATE (JSON, UPDATES AS YOU USE THE TOOLBAR AND THE MAP)
Components
Every part of the toolbar and the map in every state, drawn with the same tokens as the working toolbar above. The System contrast switch changes these too. States follow AB-4S.
Code
Copy and paste into the theme. Tokens are CSS custom properties named after the Figma variables (Color / F2), with the high contrast values under prefers-contrast: more. The markup, CSS and script are what this page runs.
Accessibility
Target: WCAG 2.2 Level AA, the site standard (SW-2). Every choice below became a rule in Notion Build Requirements, each rule names the WCAG criteria it meets, and each has an automated QA check. Ratios are WCAG contrast.
Choices, rules, and the WCAG criteria they meet
| Choice | Rule | WCAG 2.2 | QA check |
|---|---|---|---|
| High contrast turns on by itself when the visitor's system asks for more contrast. No toggle to find. | AB-4V | 1.4.3, 1.4.11 (goes past AA) | prefers-contrast emulated: values compute, axe 0 violations at five widths |
| Key buttons show "on" with a teal outline and Medium text, not just a tint, so on keeps 3:1 against off. | AB-4S | 1.4.11, 1.4.1 | Computed styles at five widths |
| Each layer has its own shape: numbered circles, squares, dots, rings. | Career map decisions, 2026-11-09 | 1.4.1 | Visual check |
| A 1 px coastline separates land from water, because the two fills alone are too close. | Career map decisions, 2026-11-09 | 1.4.11 | Visual check |
| Controls are drawn at 28 or 32 px, but touch screens get 44 px targets. | AB-4R, SW-62 | 2.5.8 | qa_toolbar_order.py, axe |
| Toolbar text, tooltips, and place names use rem, so they follow the browser font size. | AB-4R | 1.4.4, 1.4.10 | qa_text_size.py at 16, 20, and 24 px fonts and 200% zoom |
| Layer and view buttons are real toggles (aria-pressed); at most one view mode is on. | AB-4M, AB-4S | 4.1.2 | qa_view_mode.py |
| No visible "Key:" label, but the button group keeps its name for screen readers. | AB-4Q | 1.3.1, 4.1.2 | axe |
| The whole toolbar is one Tab stop; arrow keys move inside it (W3C toolbar pattern). | AB-4AA | 2.1.1, 2.4.3 | qa_kb.html: one Tab stop and full arrow order at six widths |
| Phone Move menu: Enter opens it, focus goes to the first button, Esc closes and returns focus. | AB-4M | 2.1.1, 2.4.3 | Move menu keyboard check |
| Expand opens a dialog; Close, Esc, or a click on the scrim closes it. | AB-4R, SW-48 | 2.1.2, 2.4.3 | Focus trap check |
| Every move and zoom has a button, so nothing needs dragging. | SW-62 | 2.5.7 | Button-only pass |
| The sticky header never covers the focused control. | SW-60 | 2.4.11 | Tab through every page at five widths |
| Every place is also in a text list under the map. | Prototype (not yet a rule) | 1.1.1, 1.3.1 | Content check |
| Anything that moves can pause; reduced motion shows stills. | SW-47 | 2.2.2, 2.3.3 | getAnimations() is empty with reduced motion |
QA passed 2026-11-09 in the prototype: axe 0 violations at 375, 768, 1024, 1440, and 1920, in both modes.
Keyboard
| Key | Where | What it does |
|---|---|---|
| Tab, Shift+Tab | Toolbar | Enters or leaves the toolbar in one step, on the last control used (one Tab stop) |
| Left, Right | Toolbar | Move between the Map type button, key buttons, More, map controls, and the zoom field, in reading order; wraps at the ends. In the zoom field they move the caret first. |
| Home, End | Toolbar | Jump to the first or last control |
| Enter, Space | Any button | Presses it; key buttons toggle their layer |
| Esc | More menu, tooltip, place card | Closes it and returns focus to the button that opened it |
| Arrow keys | Map (focused) | Move the map |
| + and − | Map (focused) | Zoom in and out by the zoom steps |
| 0 | Map (focused) | Show the whole map |
| Enter | Zoom field | Applies a typed zoom from 1 to 40; out of range keeps the last value and says so |
Screen reader
| Part | Role and name | State it reports |
|---|---|---|
| Toolbar | toolbar, "Map controls" | None |
| Map type button | button that opens a dialog, "Map type: Natural Earth" | aria-haspopup="dialog" |
| Key button | button, layer name ("Lived") | aria-pressed true or false |
| More button | button, "More layers" | aria-expanded, aria-controls |
| Map control | button, action name ("Zoom In") | aria-pressed on Show whole map and Fit visible |
| Zoom field | text input, "Zoom level, 1 to 40" | current value |
| Map | region, "Map of places Jason has lived, worked, visited, and wants to visit" | help text via aria-describedby; the drawing itself is hidden from screen readers |
| Places | "List of places on this map" (details) under the map | every marker as text, so no place is map-only |
| Changes | polite live region | "Lived turned off.", "Zoomed in to 2×." |
Contrast
| Pair | Colors | Ratio | Needs | Result |
|---|---|---|---|---|
| Key button text, on | #2B2B2B on #E3EEED | 11.95:1 | 4.5:1 | Pass |
| Key button text, off | #5C5C5C on #FFFFFF | 6.69:1 | 4.5:1 | Pass |
| Map type button and zoom text | #2B2B2B on #FFFFFF | 14.16:1 | 4.5:1 | Pass |
| Caption | #5C5C5C on #FFFFFF | 6.69:1 | 4.5:1 | Pass |
| Tooltip text | #F2F2F0 on #2B2B2B | 12.63:1 | 4.5:1 | Pass |
| Tooltip eyebrow | #CCCCC8 on #2B2B2B | 8.79:1 | 4.5:1 | Pass |
| Place card type line | #55554F on #FFFFFF | 7.50:1 | 4.5:1 | Pass |
| On state line (key button) | #0E6E6A on #FBFBFA | 5.87:1 | 3:1 | Pass |
| Control icons | #2B2B2B on #FBFBFA | 13.67:1 | 3:1 | Pass |
| Focus ring | #2B2B2B on #FBFBFA | 13.67:1 | 3:1 | Pass |
| Lived marker on land | #0E6E6A on #D2DADE | 4.29:1 | 3:1 | Pass |
| Worksite marker on land | #B5461A on #D2DADE | 3.84:1 | 3:1 | Pass |
| Visited and bucket list on land | #1A56A8 on #D2DADE | 5.04:1 | 3:1 | Pass |
| Off limits on land | #C62828 on #D2DADE | 3.97:1 | 3:1 | Pass |
| Flight path on water | #2B2B2B on #EDF4F4 | 12.71:1 | 3:1 | Pass |
| Selected ring on land | #2B2B2B on #D2DADE | 9.99:1 | 3:1 | Pass |
| Off button outline | #76766F on #FFFFFF | 4.57:1 | 3:1 | Pass |
| Unavailable icon | #BDBDBD on #FBFBFA | 1.81:1 | None | Exempt (disabled) |
| Control outline, high contrast | #76766F on #FFFFFF | 4.57:1 | 3:1 | Pass |
Other checks
| Check | WCAG | How the component meets it |
|---|---|---|
| Target size | 2.5.8 (AA) | 28 px drawn controls; 44 px hit area on touch screens (pointer: coarse), per AB-4R |
| Focus visible | 2.4.7 (AA) | 2 px #2B2B2B ring, 1 px offset, on every part |
| Not color alone | 1.4.1 (A) | Each layer has its own shape: numbered circle, square, dot, ring, no-entry sign; on state adds a line and Medium weight |
| Text resize | 1.4.4 (AA) | Toolbar text is in rem, so it follows the browser text size |
| Reflow | 1.4.10 (AA) | Wide, Medium, Narrow, and Phone (327 px) layouts; 320 px check still to do |
| Hover and focus content | 1.4.13 (AA) | Tooltips show on hover and focus, stay while hovered, and close with Esc |
| Status messages | 4.1.3 (AA) | Layer and zoom changes go to a polite live region |
| High contrast | Beyond AA | prefers-contrast: more swaps in the high contrast tokens (darker lines, black labels, 2 px on state) |
| Reduced motion | Beyond AA | prefers-reduced-motion: reduce turns off all transitions |
Decided (C-53, 2026-11-10): map toolbar controls are an exception to SW-62. With a mouse, targets follow the drawn size (32 px, 28 px in bars 820 px or narrower); touch screens get 44 px. Both pass WCAG 2.5.8 (24 px).
Decided (AB-4AA, 2026-11-10): the whole toolbar is one Tab stop, as in the W3C toolbar pattern. Left and Right move between controls, Home and End jump to the ends, and Tab returns to the last control used.
Keyboard: Tab moves between controls; Enter or Space presses a button. High contrast here previews what visitors see when their system asks for more contrast (prefers-contrast: more); the live site has no switch for it. The map and toolbar are the real component from the About page prototype. Spec: Notion Build Requirements AB-4Q, AB-4R, AB-4S, AB-4V and section 1.2 (map/ and toolbar/ tokens).