Skip to content

fix(a11y): add visible label and search icon to search input#14834

Merged
skjnldsv merged 1 commit into
masterfrom
fix/bitv-9739-search-label
May 12, 2026
Merged

fix(a11y): add visible label and search icon to search input#14834
skjnldsv merged 1 commit into
masterfrom
fix/bitv-9739-search-label

Conversation

@skjnldsv
Copy link
Copy Markdown
Member

@skjnldsv skjnldsv commented May 12, 2026

☑️ Resolves

🖼️ Screenshots

Before After
image image

Explanations

The search input has an aria-label but no visible label and no visual symbol identifying it as a search field, which fails WCAG 3.3.2 / BITV 9.3.3.2.

Changes:

  • Overrides searchbox.html to add a <label> element. The label uses the .sr-only utility class (visually hidden, still in the accessibility tree) so the layout is unaffected.
  • Adds a FontAwesome magnifying-glass icon positioned inside the input via CSS, giving sighted users a clear visual cue that this is a search field.
  • Adds .sr-only utility and search icon styles to custom.css.

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 search input had an aria-label but no visible label and no visual
symbol indicating it is a search field, which fails WCAG 3.3.2 /
BITV 9.3.3.2 (input fields must be identifiable without relying on
placeholder text alone).

- Override searchbox.html to add a <label> (visually hidden via
  .sr-only so the layout is not disrupted) and a FontAwesome
  magnifying-glass icon positioned inside the input.
- Add .sr-only utility class and search icon CSS to custom.css.

Fixes #9739

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:35:38 GMT

@skjnldsv skjnldsv merged commit 8d2c75f into master May 12, 2026
24 checks passed
@skjnldsv skjnldsv deleted the fix/bitv-9739-search-label branch May 12, 2026 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

2 participants