Keyboard and focus
RunTwo failures and one unverified risk. The focus machinery itself is sound.
- Subject
- interfaces.institute
- Standard
- WCAG 2.2, Level A and AA
- Scope
- WCAG 2.2 A and AA, the criteria that govern keyboard operation and focus
- Tested
- The built site (astro/dist), 15 pages, served locally on the day of launch.
- Run by
- An AI agent (Claude) driving a browser, at the director's request. The report is the agent's own, written in the first person.
- Method
- Scripted probes run in the page — focusability, roles, names, computed styles and DOM order — at 375 px and 1180 px. Synthetic key presses were not delivered to the page, so tab order was read from the DOM rather than walked.
- Published
- July 2026
Findings
three failed or at risk · six passed
| Criterion | Finding | Result | Since |
|---|---|---|---|
| 2.1.1 A | Twenty scrollable table regions no keyboard can reachFixed the same day on nine of ten pages. The tenth was missed and fixed on 14 August. | fail | fixed August 2026 |
| 1.4.13 AA | Room tooltips could not be dismissed or hovered | fail | fixed July 2026 |
| 2.4.11 AA | A focused element may sit under the sticky headerThe standard remedy is in, scroll-padding-top of 74 px. The original measurement could not be repeated. | risk | fix unverified |
| 2.4.7 AA | Focus is visible everywhere; no outline is removed | pass | |
| 2.1.2 A | No keyboard trap, the mega menu included | pass | |
| 2.4.1 A | Skip link present, first in the DOM, visible on focus | pass | |
| 2.4.3 A | DOM order matches visual order; no positive tabindex | pass | |
| 3.2.1 A | Nothing changes context on focus | pass | |
| 3.2.2 A | Filtering changes content, not context | pass |
Not verified
- Actual Tab traversal. Focus order is asserted from DOM order, not walked with a real keyboard.
- Screen reader output. The ARIA is structurally correct; how it is announced was not heard.
- 2.4.11 Focus Not Obscured, before or after its fix.
The report
Failures
1 · Twenty scrollable table regions no keyboard can reach — 2.1.1 (A)
Every collection page wraps its tables in <div class="wide"> with
overflow-x: auto. At narrow widths the table exceeds the container and the
region scrolls. Measured on collections/wcag/ at a 375 px viewport:
div.wide — overflowsBy: 110px · tabIndex: -1 · role: null · aria-label: null
110 px of table is hidden and no key can bring it into view. A mouse can drag the scrollbar and a finger can swipe, but a keyboard-only user cannot: the wrapper is not focusable, so arrow keys never target it.
Scope across the site:
20 .wide wrappers · 10 pages · 0 focusable · 0 with a role · 0 with a label
This is a Level A failure, so it blocks AA conformance for the whole collections section — which is currently the only open floor.
It does not appear at desktop width (overflowsBy: 0 at 1180 px). It appears as
soon as the viewport narrows or the reader zooms, which is precisely when a
keyboard user is most likely to be relying on it.
Fix. On each scroll container: tabindex="0", role="region" and an
aria-label naming the table. Three attributes, applied once in the shared
markup — it is the same .wide wrapper on all ten pages.
2 · Room tooltips are not dismissible — 1.4.13 (AA)
The ten ground-floor room links show a CSS tooltip on :focus-visible as well
as on hover. Confirmed working — tabbing to the fourth room gives
tooltipVisibility: visible, tooltipText: "WCAG 2.2". But 1.4.13 has three
requirements and the tooltip meets one:
| Requirement | Status | Why |
|---|---|---|
| Dismissible | fail | No Escape handler; the only way to hide it is to move focus |
| Hoverable | fail | pointer-events: none |
| Persistent | pass | Remains while focused |
The information itself is not lost to a screen reader — each link carries an
aria-label with the room name — so the harm is narrower than in the touch
audit, where the same tooltip hides 34 room names outright. It is still a
failure.
Fix. Add an Escape handler that hides the tooltip without moving focus, and
remove pointer-events: none.
Unverified risk
2.4.11 Focus Not Obscured (Minimum) — AA, new in 2.2
The header is position: sticky and 61 px tall, and no scroll-margin-top
or scroll-padding-top is set anywhere in the stylesheet. When a browser
scrolls a Tab-focused element into view it aligns it to the viewport edge, not
below sticky content — so an element under about 61 px tall can land entirely
behind the header.
I could not confirm this empirically: the browser pane consumed the synthetic Tab
keypresses and never delivered them to the page (focusin log recorded 0 stops
across 85 presses). I am reporting this as an untested risk, not a failure.
The preconditions are all present; whether Chrome actually buries a focused
element here needs one manual pass with a real keyboard.
Fix, if confirmed. html { scroll-padding-top: 72px }. One line, and it is
the standard remedy.
Passes — measured, not assumed
Focus visibility — 2.4.7 (AA) passes
The UA focus ring is never removed: grep 'outline: *\(none\|0\)' across src/
returns nothing. Nine selectors additionally declare explicit
:focus-visible treatment (skip link, mega button, room links, facet chips,
search input, floor-name links). Focus is always visible, and on the room links
it is emphatic — the cell fills signal blue and the tooltip opens.
Mega menu — passes 2.1.1, 2.1.2, 4.1.2
| Check | Result |
|---|---|
Trigger is a real <button> | yes |
aria-expanded reflects state | yes — toggles false/true |
aria-controls points at the panel | yes |
| Panel follows the trigger in DOM order | yes — so Tab enters it naturally |
| Focus can enter the panel | yes — 13 reachable links |
| Escape closes it | yes |
| Focus returns to the trigger on Escape | yes |
| Closes when focus leaves entirely | yes, via focusout with a deferred check |
| Keyboard trap | none |
The deferred setTimeout(…, 0) in the focusout handler is what stops the panel
closing while focus is still moving between two of its own links. Without it the
menu would collapse under the user mid-Tab.
Progressive enhancement — 2.1.1 holds with JavaScript off
Every table row is server-rendered. The filters only hide rows; they are never
the delivery mechanism. With scripting disabled all 87 WCAG criteria, all 102
roles and all 62 status codes are still present and readable. The filter controls
are real <button>s in a role="group" with aria-labelledby, and state is on
aria-pressed.
Others
| Criterion | Level | Result |
|---|---|---|
| 2.1.2 No Keyboard Trap | A | pass — no trap found; mega menu releases focus |
| 2.4.1 Bypass Blocks | A | pass — skip link present, first in DOM, visible on focus |
| 2.4.3 Focus Order | A | pass — DOM order matches visual order; 0 positive tabindex |
| 3.2.1 On Focus | A | pass — nothing navigates or changes context on focus |
| 3.2.2 On Input | A | pass — filtering changes content, not context |
| 2.4.13 Focus Appearance | AAA | not in scope, but the ring is unmodified and would likely pass |
Not verified
- Actual Tab traversal. The pane did not deliver synthetic Tab to the page, so focus order is asserted from DOM order rather than walked. DOM order was checked and matches visual order, but this deserves one manual pass.
- Screen reader output. No AT was run.
aria-label,aria-pressed,role="status"andaria-liveare present and structurally correct; how they are announced is untested. - 2.4.11, above.
Fixed — 2026-07-31, same day
| Finding | Fix | Verified |
|---|---|---|
| 20 unreachable scroll regions | Every table wrapper now carries tabindex="0", role="region" and a name | tabIndex: 0, role: "region", aria-label: "WCAG 2.2 success criteria", 110 px now reachable |
| Tooltip not dismissible (1.4.13) | Escape handler added | escapeHushes: true |
| 2.4.11 risk | html { scroll-padding-top: 74px } | computed 74px |
tabindex is set statically rather than by script: a JS-applied tabindex would
leave the region unreachable with scripting off, which is the failure being
fixed. The cost is a redundant tab stop at widths where the table happens to fit.
2.4.11 remains formally unverified. The fix is in and is the standard remedy, but the pane still will not deliver synthetic Tab to the page, so the original measurement could not be repeated. One manual keyboard pass would close it.
A bug this audit surfaced
Fixing the scroll regions revealed that the mega menu's columns were marked
class="mcol wide" — colliding with the table wrapper's .wide { overflow-x: auto }
and silently making three menu columns scroll containers. Renamed to .mcol-main.
The collision was invisible because those columns never happened to overflow.
Superseded — the tooltip is gone
The room tooltip was replaced entirely by a native <details> disclosure per
floor, so the 1.4.13 fixes above are moot: there is no hover-triggered content
left in the section. A disclosure is operable by tap, by keyboard and by screen
reader with no JavaScript, which is what the tooltip could not manage even after
being patched.
Two audit findings closed as a side effect:
- The ten 28 × 18 room links are gone. Slab cells are now decorative
<span>s insidearia-hidden="true"— no focus, no tap target, so the 2.5.8 usability concern (conformant but fiddly) no longer applies to them. - Real tab stops in the section while collapsed dropped from 39 to 15
(9 summaries + 6 floor links). Links inside a closed
<details>are unfocusable by native behaviour — verified:sampleCanFocus: false.
Correction — the tooltip is back, alongside the disclosure
I over-corrected by deleting the hover tooltip outright. It is restored, because naming one room under the pointer is genuinely useful and the disclosure does not replace it. The two now do different jobs:
| mechanism | who it serves | |
|---|---|---|
| Hover a slab cell | CSS tooltip on a decorative <span> | mouse: name one room fast |
Open the N rooms chip | native <details> | touch, keyboard, screen reader: read them all |
The tooltip is now enhancement over an accessible base, which is the only
arrangement that works: every room name is in the disclosure, so nothing depends
on hover. 1.4.13 is still satisfied on its own terms — Hoverable
(pointerEvents: auto), Persistent, and Dismissible by Escape
(escapeDismisses: true, restored on the next pointer interaction).
The cells stay out of the tab order (cellFocusable: false) and the slab stays
aria-hidden, so the tooltip adds no tab stops, no tap targets and no duplicate
screen-reader output.
Update — room cells are links again, and now pass 2.5.8 on measurement
The building map's built rooms link directly to the room. That reintroduces them as tap targets, so the slab was rebuilt around the criterion rather than against it:
| before | now | |
|---|---|---|
| slab height | 20px | 28px |
| narrowest cell, ≥1000px | 28 × 18 | 28 × 26 — passes 2.5.8 on size |
| narrowest cell, 400px | — | 22 × 26 — passes by the spacing exception, 0 failures |
| planned-room cells | links | inert spans, aria-hidden |
Below 1000px the slab drops to its own full-width row and the inter-cell gap goes to 2px. Twelve 24px targets cannot fit a 287px row — that is arithmetic, not CSS — so at phone widths the cells rely on the spacing exception, verified with the circle-versus-box test at 0 failures. On touch the disclosure list underneath remains the better target and reaches the same rooms.
Two measurement traps worth recording, because both produced false failures:
- Grid queries that disagreed. One breakpoint set
grid-column, another setgrid-row; at 400px they combined to drop the floor-name link on top of the room cells. Both queries now place every child explicitly. - Phantom targets. Links inside a closed
<details>still report layout boxes, so a naive probe counted them as neighbouring targets and reported 18 spacing failures that do not exist. They are neither perceivable nor focusable, so they are not targets. Excludingdetails:not([open])descendants gives the real answer: 0.