…ames its reasons (Closes #3642, Closes #2559) (#3949)
Closes #3642. Closes #2559 (the maintainer's decision of 2026-11-10: one app PR for the Meteogram's contrast, the baseline's issue links and reasons, and the acceptance written down).
## Colours (#3642)
The Meteogram's HTML chrome outside Plotly used Tailwind's 500 shades. The icons of the five panel toggles and of the summary line now take the label colours of the charts (`SERIES_LABEL` / `seriesLabelColor`, #3641; `slate` is new, for the cloud cover, which has no label). A toggle that is on is the icon in that colour on a 10 % wash and a 40 % edge of it (`panelToggleStyle`), so the colour is one source for the icon, the wash and the edge.
| Mark | Before (white, v4 palette) | After, by day: white / toolbar / on a toggle that is on | After, at night: card / toolbar / on a toggle that is on |
| --- | --- | --- | --- |
| wind (cyan) | `cyan-500` 2.37 | `#0e7490` 5.36 / 5.10 / 4.47 | `#06b6d4` 6.47 / 6.23 / 5.29 |
| pressure (lime) | `lime-500` 1.95; toggle on `lime-600` 2.74 | `#4d7c0f` 4.99 / 4.75 / 4.20 | `#84cc16` 7.95 / 7.66 / 6.33 |
| cloud cover (slate) | `slate-400` 2.63 | `#475569` 7.58 / 7.21 / 6.23 | `#94a3b8` 6.12 / 5.90 / 4.96 |
| temperature (red) | `red-500` 3.81 | `#dc2626` 4.83 / 4.60 / 3.95 | `#f25b5b` 4.80 / 4.63 / 4.18 |
| rain (blue) | `blue-500` 3.76 | `#2563eb` 5.17 / 4.92 / 4.29 | `#5b9cf8` 5.65 / 5.44 / 4.63 |
Other HTML uses of the series colours found by grepping the whole app:
- The wind line's `(km/h)` text (`text-cyan-700 dark:text-cyan-400`) takes the cyan label colour too (5.36 / 6.47).
- The card of today had `border-blue-400 dark:border-blue-800` (2.5:1 by day); it is `border-blue-600 dark:border-blue-400` (5.25 and 5.95).
- The explorer's warning icon was `text-red-500` (3.81); it is `text-red-600 dark:text-red-400`.
- A toggle also says whether it is on (`aria-pressed`, it had none); the inactive toggles keep the app's greys (held at 3:1).
## Baseline entries (#2559)
Each entry in `tests/e2e/accessibility/baseline.json` has an `issue` and a `reason`. I reproduced all four against the current components (Chrome 156, the spec's states, the generated markup read). In each the app sets none of the attributes concerned and has no prop or slot that reaches them: the cause is Nuxt UI's or Reka UI's. The upstream trackers were read only; **no issue was opened**.
| Entry | Cause | Issue |
| --- | --- | --- |
| `aria-required-children`, explorer and meteogram / `station-menu-open` | Nuxt UI `USelectMenu`: `role="listbox"` on the combobox content, whose only child is `<div tabindex="-1" data-slot="focusScope">` | nuxt/ui#7075 (closed; fixed by nuxt/ui#7096 in 4.12.0) |
| `scrollable-region-focusable`, explorer / `station-menu-open` | The same menu's `role="presentation"` viewport scrolls, with options at `tabindex="-1"` | the same issue, #7075 |
| `aria-hidden-focus`, explorer / `values-error` | Reka UI toast viewport (behind `UToaster`): two focus proxies `<span aria-hidden="true" tabindex="0">` | unovue/reka-ui#2776 (closed; fixed by unovue/reka-ui#2980 in 2.11.0) |
**All three are fixed in releases the app does not have yet.** The app is on `@nuxt/ui` 4.11.3 and `reka-ui` 2.10.5; `@nuxt/ui` 4.12.0 (2026-10-15) depends on `reka-ui` 2.11.0 (2026-10-05). In a throwaway copy of the app (not committed) built on 4.12.0, the three states reproduce none of the rules. Bumping `@nuxt/ui` would therefore empty the baseline. I did not bump: it is a dependency change of its own (4.12.0 also loads the menu and toast overlays lazily), and it is not in the decision.
Schema: `issue?: string | null` and `reason?: string` are optional, so the spec (`compareToBaseline`) is unchanged and old files still load. `report.mjs --write-baseline` keeps both for an entry that is still found. `tests/unit/a11y-baseline.test.ts` holds that every entry states a reason and an issue (a GitHub URL or `null`, and a `null` names its project in the reason).
## `app/ACCESSIBILITY.md`
- New section "How it is accepted", as decided: axe on request (`pnpm test:a11y`, the *App accessibility* workflow by dispatch or the label), not in every e2e run, because of its run time; Lighthouse by hand before each app release, with its score recorded in the file; the baseline lists its causes.
- The baseline section lists the entries with their cause and issue (table above).
- Lighthouse section: a table (date, app version, Lighthouse version, pages x devices, scores), with the 2026-10-18 result (Lighthouse 13.5.0, 34 x 100) and a row for this run, and how a row is made.
- A paragraph on the Meteogram's chrome in the contrast section; the "On request" section states the scan's size and time, and the result of the full run below.
## Lighthouse (run by hand, this change)
Lighthouse 13.6.0, Chrome 156.0.8078.80, production build of this tree with the spec's mock answers served as the backend, 17 URLs x mobile and desktop = 34 runs: **34 x 100**. A first run of the same pages scored the widget 98 (`landmark-one-main`: the page has no main landmark); the widget now has a `<main>` around its content (a unit test holds it).
## Tests, mutation checks and results
- `tests/unit/button-contrast.test.ts` (new `describe`): every `SERIES_LABEL` colour on white, the paper, the toolbar and the dark card at 4.5:1; as the icon of a toggle that is on, on its own wash, at 3:1; the Tailwind palette read from `tailwindcss/theme.css` (oklch to sRGB, red-600 checked at 4.77); every `text-<colour>-<step>` class in `app/**/*.vue|ts` at 4.5:1 on white (`dark:` on the dark card); the Meteogram has no `text-(cyan|lime|slate)-` class and uses the label colours; the today card's border at 3:1.
- `tests/e2e/chart-theme.spec.ts`: the icons and toggles measured as the browser paints them (computed colour of the icon, every background under it down to the page), on, off, and in both schemes.
- Mutation checks, each failing and restored: cyan light label put back to `#06b6d4` (5 unit tests fail); `text-lime-500` back on an icon (2 fail); `text-slate-400` back (2 fail); `text-red-500` back on the explorer icon (1 fails); `border-blue-400 dark:border-blue-800` back on the card (1 fails); lime light label to `#84cc16` in the e2e (fails: `pressure toggle that is on, rgb(132, 204, 22) on rgb(237, 245, 227)`); the widget's `<main>` back to a `<div>` (1 fails).
- `pnpm lint`: clean. `pnpm typecheck` (tsbuildinfo deleted first): exit 0. `pnpm test:ci`: **103 files, 2990 tests passed**. E2E (Chrome, Playwright's Firefox does not start on this machine): `chart-theme.spec.ts` and `meteogram-barbs.spec.ts`, **27 passed**.
- `pnpm test:a11y --workers=3` on this tree (Chrome 156, axe 4.13.0): **393 tests, 393 passed, none retried, 15.5 minutes**; it found exactly the four baseline entries. A first run failed six tests of `index: search-results`: the spec expected one option for BERLIN-TEMPELHOF where the search lists the station twice (forecast, and on the map since #3839), which nothing had noticed as the scan runs on request. The spec takes the first now. (A second full run was disturbed by an e2e run of mine on the same server and is not counted.) The scan has been run in Chrome; the baseline was recorded in Firefox on Linux, which the `a11y` label would run in CI. I did not set it.
## Review fixes (commit 6115bed, a merge of main, and 68eb412)
- **M1, a valid class crashed the contrast file.** Tailwind 4.3.3 writes `oklch(55.6% 0 none)` for every `neutral-*` and `zinc-50` (13 colours). `oklchToHex` takes `none` as 0 and throws a named error (`not an oklch() colour of Tailwind's palette: ...`) instead of `!`. New tests: `neutral-500` converts, at 4.74:1 on white; every `--color-*: oklch(...)` of `theme.css` (200+) converts; an unreadable colour is a named error. Mutation: the old numeric-only hue back fails the two neutral tests with the named error; a `text-neutral-500 dark:text-neutral-300` class in the markup passes (does not crash), and without its partner it is flagged (3.31:1 on the dark card).
- **L1, gaps in the text-colour test.** A light class with no `dark:` partner in its class string (a partner is any `dark:` text colour of the same variants, `dark:text-white` included; the string is what lies between two quotes) is now also held to the dark card. That found `pages/history.vue`: `text-red-600` error text at 3.29:1 at night, now `dark:text-red-400` (mutation: the old class back fails with `pages/history.vue: text-red-600 (no dark: partner, painted at night too) 3.29:1 on card`). An opacity (`/NN`) or arbitrary `text-[#hex]` now fails (`unreadable`) rather than being skipped; none exists in the app today. `primary` and `brand` are **not** resolved: `text-primary-500` is 3.47:1 on white and is used **48 times** (icons and spinners), so resolving them would fail 48 places. I took the allowed alternative and said so in the test and in ACCESSIBILITY.md: only Tailwind's palette and `gray` are checked. The 48 `text-primary-500` uses are a finding for its own issue, not fixed here. The scan has tests of its own (what it flags and lets through).
- **L2.** The test that could not fail is general: an entry with `issue: null` must name an owner (`Nuxt UI`, `Reka UI`, `Leaflet`, `Plotly`, `Tailwind`, `the app`) in its reason, and a synthetic test shows the check can say no.
- **L3.** `pnpm lighthouse` (`app/tests/e2e/accessibility/lighthouse.mjs`) starts the spec's mock backend (the TypeScript file, transpiled with the `typescript` the app already has) as a plain HTTP server, serves `.output` with `NUXT_API_BASE` on it, runs `npx lighthouse@<version>` over the 17 URLs on mobile and desktop, prints each score with the failed audits and the line for the table, and exits 1 under 100. `tests/unit/lighthouse-urls.test.ts` holds its URLs to the spec's `PAGES`. ACCESSIBILITY.md's by-hand step now says `pnpm build && pnpm lighthouse`. I ran it end to end: **17 URLs x mobile and desktop, 34 x 100** (Lighthouse 13.6.0, HeadlessChrome 157; Chrome had updated since the first run). The first version of the script hung the API page: `spawnSync` blocked the script's own mock backend while Lighthouse waited for `/api/version` (NO_FCP). That is fixed in 68eb412 (async spawn, one retry of a run Lighthouse fails itself, `--only` for a subset of the URLs).
- **Nits.** `CHANGELOG_APP.md`: the Forecast entry is rewrapped to 100 columns and mentions the night edge of today's card (blue-800 1.8:1 to blue-400 6.0:1; the day edge was 2.6:1 before, not 2.5), the explorer icon has its own `[Explorer]` line, and the History error text has a `[History]` line. ACCESSIBILITY.md: line 3 no longer calls #2559 the open tracking issue; "500 shades" names what the toggles and icons had (cyan-500, lime-500, red-500, blue-500, slate-400); the last-run paragraph says the first run came before the `.first()` fix and mentions the second, disturbed run, and that the app change since the full run is the `dark:` colour on History's error. `tests/nuxt/components/Meteogram.test.ts` has a describe that holds `aria-pressed`, the toggles' style, the summary icons' colours in both schemes and today's card classes in the rendered component (mutation: `aria-pressed` removed and the old card border back fail 3 of the 4); the source-text assertions in `button-contrast.test.ts` are gone. The comment in `playwright.config.ts` states the scan's real size.
- **Checks** (`app/`, after merging main, which changed no app file): `pnpm lint` clean; `pnpm typecheck` (tsbuildinfo deleted) exit 0; `pnpm test:ci` **104 files, 3004 tests passed**; `chart-theme.spec.ts` e2e (Chrome, port 4415) **25 passed**. The full a11y scan was not re-run: the app change since the recorded run is the `dark:` class on History's error text (ACCESSIBILITY.md says so).
Review fixes: the contrast test reads Tailwind's `none` hue instead of crashing, holds a light text colour with no `dark:` partner to the dark card (History's error text fixed), and fails on opacity modifiers and arbitrary colours; `pnpm lighthouse` committed for the by-hand runs (34 of 34 at 100); the baseline test can fail; `aria-pressed` held in the component test. The App accessibility workflow was dispatched once on the head and passed. The `primary`/`brand` text colours the test does not check are a separate issue.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0187kUCUFKYgEkY8mDbH23V8
🔗 Linked issue
Fixes #7075
❓ Type of change
📚 Description
Move the listbox role to the options viewport so the search field, focus scope, and custom actions sit outside it. Connect both the trigger and search input to that listbox, preserve its label and selection semantics, and remove the disabled axe rule.
Validated all 7,647 tests (6 skipped) with
TZ=UTC, type checking, and lint. Chromium, Firefox, and WebKit checks cover search, single/multiple selection, no-search menus, virtualization, Escape/focus return, and the relevant axe rules.📝 Checklist