Skip to content

fix(a11y): add missing aria-label to icon-only clear-search and close-tab buttons - #182

Merged
alltomatos merged 1 commit into
devfrom
design/169-170-a11y-icon-labels
Sep 9, 2026
Merged

alltomatos merged 1 commit into
devfrom
design/169-170-a11y-icon-labels

Conversation

@alltomatos

@alltomatos alltomatos commented Sep 9, 2026 •

Copy link
Copy Markdown
Owner

Issue for this PR

Relates to #169, #170, #171, #172 (each has broader scope than this one fix — not closing them, this PR only covers the a11y gap found in each)

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Part of a broader dark-mode/Apple-like design audit (foundation in #164). I audited every <IconButtonV2> usage in packages/app/src for a missing accessible name — an icon-only button has no visible text, so it needs aria-label or it's invisible to screen readers.

Wrote a small script to find every <IconButtonV2 and check whether aria-label appears anywhere inside that JSX element's opening tag (up to its >//>). Out of ~45 usages, found 4 real gaps, all icon-only:

  • The "clear search" button in Settings > Models (components/settings-v2/models.tsx, part of [Design] Settings — Modelos e Combos #172's scope), Servers (components/settings-v2/servers.tsx, part of [Design] Settings — Servidores e Provedores #171's scope), and Shortcuts (components/settings-keybinds.tsx, part of [Design] Settings — Geral e Atalhos #170's scope) — same settings-v2-tab-search-clear pattern in three files, missing the label each time. Now uses the existing common.clearSearch key (already used for the same pattern in home-sessions-view.tsx).
  • The tab close (×) button in TabNavItem (components/titlebar-tab-nav.tsx, part of [Design] Shell do app — sidebar e layout #169's scope) — now uses the existing common.closeTab key, matching the one already used by the sibling DraftTabItem component in the same file. Had to add const language = useLanguage() to TabNavItem since it didn't call the hook before.

No behavior or visual change — only adds the accessible name. This does not close #169-#172; each of those issues still needs its own full pass (contrast, elevation, etc.) — this PR just fixes the one concrete a11y gap this sweep found in their file scope.

How did you verify your code works?

  • bun run typecheck (packages/app) passes.
  • Everything else I checked in the same sweep (raw hex colors outside legacy/illustration SVGs, ad-hoc box-shadow values instead of --v2-elevation-* tokens, non-token Tailwind color classes like text-gray-*) came back clean — this codebase's v2 components already consistently use semantic tokens, so this PR is scoped to just the 4 real a11y gaps found.

Screenshots / recordings

Not applicable — no visual change, only an added aria-label attribute (not visible in the UI).

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

…-tab buttons

Audited every <IconButtonV2> in packages/app/src for a missing accessible
name (icon-only buttons need aria-label since they have no visible text).
Found 4 real gaps, all icon-only:

- The "clear search" button in Settings > Models, Servers, and Shortcuts
  (same settings-v2-tab-search-clear pattern in three files) — now uses
  the existing common.clearSearch key.
- The tab close (x) button in TabNavItem (titlebar-tab-nav.tsx) — now uses
  the existing common.closeTab key, matching the one already used by the
  sibling DraftTabItem component in the same file.

Part of the dark-mode/Apple-like design pass (opencode#169, #170).

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Design] Shell do app — sidebar e layout

1 participant