Skip to content

fix(site/src): keep keyboard focus clear of sticky headers - #32190

Merged
jeremyruppel merged 3 commits into
mainfrom
a11y/focus-fully-obscured
Nov 13, 2026
Merged

jeremyruppel merged 3 commits into
mainfrom
a11y/focus-fully-obscured

Conversation

@jeremyruppel

@jeremyruppel jeremyruppel commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

Keyboard focus could land on elements hidden behind the dashboard's sticky chrome (WCAG 2.4.11 Focus Not Obscured). When the browser scrolls a focused element into view, it ignored the sticky Navbar at the top and the DeploymentBanner at the bottom, as well as the sticky header inside the notifications inbox.

  • site/src/index.css: scroll-padding on html that matches the Navbar (h-18) and DeploymentBanner (h-9) heights. Focus scrolling then keeps elements clear of both bars on every dashboard page.
  • InboxPopover.tsx: scroll-pt-15 on the inbox scroll viewport, so focused notifications stay clear of its sticky header.

Closes DEQ-62
Closes DEQ-332
Closes DEQ-337
Closes DEQ-371
Closes DEQ-424
Closes DEQ-436
Closes DEQ-437
Closes DEQ-441
Closes DEQ-461
Closes DEQ-519

Ticket UI surface Screenshots
DEQ-62 Groups page before/after
DEQ-332 Template builder modules before/after
DEQ-337 AI gateway session threads before/after
DEQ-371 Workspace details before/after
DEQ-424 Users table before/after
DEQ-436 Notifications popup (inbox header) before/after
DEQ-437 AI gateway sessions before/after
DEQ-441 Notification settings before/after
DEQ-461 Audit logs before/after
DEQ-519 Deployment settings left nav before/after

Review findings dropped

  • The padding values are hardcoded and could drift from the bar heights. Both bars have fixed Tailwind heights, and the CSS comment names them.
  • scroll-pb-9 applies even when the DeploymentBanner is hidden. This is harmless: it only adds a small margin at the bottom when the page scrolls to a focused element.
Grouping and decision log
  • All 10 tickets share one root cause: focus scrolling did not account for sticky elements. Nine are covered by the global html scroll-padding. DEQ-436 lives in the inbox's own scroll container, which needs its own padding.
  • I chose scroll-padding over per-page offsets or scroll-margin on focusable elements because it fixes every dashboard page from one place.
  • No stories are included. Assertion stories (focused rect vs. bar rect) failed with the fix reverted and passed with it applied, but review flagged them for asserting layout geometry (FE1/FE10). Visual Pixel versions needed contrived scroll setup and Radix internals ([data-radix-scroll-area-viewport]), and would only catch deletion of the CSS, not drift in bar heights. They were removed as low value for a two-line CSS fix. The before/after screenshots on each ticket record the verification.
  • Verified on a local ./scripts/develop.sh build at 1280×720 by pressing Shift+Tab from the bottom of the page, the same way the reports reproduce it. With the fix reverted, the focused element ended up at y=0 under the Navbar on the users table, notification settings and deployment left nav, and under the header in the notifications inbox. With the fix, the same element lands fully in view. The other six pages could not be reproduced locally (no groups, workspaces or AI gateway sessions, and an unlicensed audit log), but they render in the same dashboard layout as the users page.

🤖 Generated by Coder Agents on behalf of @jeremyruppel.

@jeremyruppel
jeremyruppel temporarily deployed to main November 13, 2026 18:12 — with GitHub Actions Inactive
@jeremyruppel
jeremyruppel temporarily deployed to main November 13, 2026 18:12 — with GitHub Actions Inactive
@linear-code

linear-code Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

@jeremyruppel
jeremyruppel temporarily deployed to main November 13, 2026 18:14 — with GitHub Actions Inactive
@jeremyruppel

jeremyruppel commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator Author

I'm unsure how much value the stories add, but they do capture and test this behavior, so I'm open to suggestions on whether to keep them or ditch them!

EDIT: I'm ditching them. they aren't valuable enough to justify the complexity of the test

@jeremyruppel
jeremyruppel marked this pull request as ready for review November 13, 2026 18:23
@jeremyruppel
jeremyruppel temporarily deployed to main November 13, 2026 18:23 — with GitHub Actions Inactive
@jeremyruppel
jeremyruppel temporarily deployed to main November 13, 2026 18:31 — with GitHub Actions Inactive
@jeremyruppel
jeremyruppel temporarily deployed to main November 13, 2026 18:31 — with GitHub Actions Inactive

@aqandrew aqandrew left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a bit confused by the before/after screenshots since they all show the same UI surface (deleted DashboardLayout/FocusClearOfNavbar story), but the code lgtm!

@jeremyruppel
jeremyruppel temporarily deployed to main November 13, 2026 20:24 — with GitHub Actions Inactive
@jeremyruppel
jeremyruppel merged commit f3cf09f into main Nov 13, 2026
35 checks passed
@jeremyruppel
jeremyruppel deleted the a11y/focus-fully-obscured branch November 13, 2026 20:26
@jeremyruppel
jeremyruppel temporarily deployed to docs-preview November 13, 2026 20:26 — with GitHub Actions Inactive
@jeremyruppel
jeremyruppel temporarily deployed to main November 13, 2026 20:26 — with GitHub Actions Inactive
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 13, 2026

This branch was previously deployed

2 inactive deployments
main — d06beb38 Deployed Nov 13, 2026 by jeremyruppel via cla #256972
docs-preview — d06beb38 Deployed Nov 13, 2026 by jeremyruppel via cleanup #52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants