Skip to content

fix(a11y): make keyboard focus ring fully visible in navigation#14832

Merged
skjnldsv merged 1 commit into
masterfrom
fix/bitv-9701-focus-visibility
May 12, 2026
Merged

fix(a11y): make keyboard focus ring fully visible in navigation#14832
skjnldsv merged 1 commit into
masterfrom
fix/bitv-9701-focus-visibility

Conversation

@skjnldsv
Copy link
Copy Markdown
Member

@skjnldsv skjnldsv commented May 12, 2026

☑️ Resolves

🖼️ Screenshots

Before After
image image

Explanations

The sidebar nav container uses overflow: hidden, so the default browser outline is clipped to one edge — only the bottom line of the focus ring appears, as visible in the issue screenshot. WCAG 2.4.7 / BITV 9.2.4.7 requires that keyboard focus be clearly visible on all sides.

Setting outline-offset: -2px draws the outline inward, inside the element boundary, so it is never clipped. Scoped to sidebar nav links, expand buttons, and the version selector toggle.

cc @nextcloud/a11y

✅ Checklist

  • I have built the documentation locally and reviewed the output
  • Screenshots are included for visual changes
  • I have not moved or renamed pages (or added a redirect if I did)
  • I have run codespell or similar and addressed any spelling issues

The sidebar nav container uses overflow: hidden, which clips the
default outline to only the bottom edge when an item is focused.
WCAG 2.4.7 / BITV 9.2.4.7 requires that focus be visible on all sides.

Using outline-offset: -2px draws the ring inside the element boundary
so it is never clipped by the container.

Fixes #9701

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
@github-actions
Copy link
Copy Markdown
Contributor

📖 Documentation Preview

🔍 Open preview →

No RST documentation pages changed in this PR.

Last updated: Tue, 12 May 2026 19:30:12 GMT

@skjnldsv skjnldsv merged commit 99eaaae into master May 12, 2026
24 checks passed
@skjnldsv skjnldsv deleted the fix/bitv-9701-focus-visibility branch May 12, 2026 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

2 participants