[Improvement]: A11y — associate labels with inputs across Settings, Agent, Git, Marketplace, and AI chat#175
Conversation
…ent, Git, Marketplace, and AI chat
Screen readers and voice-control users had no reliable way to target
most inputs in the app: visible `<label>` elements were siblings of
their inputs but never connected via `htmlFor`/`id`, and inputs that
rely on placeholders as pseudo-labels (search, filter, commit
message, branch name, stash message) had no accessible name at all.
Changes:
- `SettingsView`: added matching `id`/`htmlFor` to font family, font
size, line height, minimap, exclude-pattern, and display-language
inputs. Wrapped the minimap switch visual with `aria-hidden` so AT
only sees the real control.
- `AgentSettings`:
- `aria-labelledby` / `aria-describedby` on the AGENTS.md / DESIGN.md
/ USER.md / MEMORY.md textareas pointing to the heading and
description already rendered above each.
- `id` / `htmlFor` on the keep-alive range input, plus
`aria-valuetext` so AT announces "5 min" not just the raw number,
and `aria-describedby` pointing at the help text.
- `GitExplorerComponent`: `aria-label` on the global search, branch
filter, new-branch, commit textarea, stash message, and inline
new-file / new-folder inputs, so each has a name independent of
its placeholder.
- `MarketplaceView`: `aria-label` on the search input and the
installed/all filter select.
- `AiChatComponent`: `aria-label` on the chat composer textarea so
it announces as "Ask about your code..." instead of "edit text".
No new i18n strings — reused existing keys.
Closes TrixtyAI#107
|
Thanks for the contribution! I'll review it as soon as possible. If you have still changes, please mark this PR as draft and all reviews will be cancelled. Tests reviews will be re-run only when the PR is marked as ready for review. |
There was a problem hiding this comment.
Pull request overview
Improves accessibility across the desktop UI by ensuring inputs have reliable accessible names, primarily by wiring visible labels via htmlFor/id and adding aria-label/aria-labelledby where placeholders or surrounding headings were previously the only context.
Changes:
- Add
id/htmlForassociations for labeled form controls in Settings and Agent configuration. - Add ARIA labeling for previously placeholder-only inputs in Git Explorer, Marketplace, and AI Chat.
- Add
aria-hiddenon decorative UI elements so assistive tech focuses on the actual form controls.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| apps/desktop/src/components/SettingsView.tsx | Adds id/htmlFor on settings inputs and improves naming for the exclude-pattern field. |
| apps/desktop/src/components/MarketplaceView.tsx | Adds aria-label to marketplace search and filter controls. |
| apps/desktop/src/addons/builtin.git-explorer/GitExplorerComponent.tsx | Adds aria-label to several Git inputs (search, branch filter/create, commit message, stash message, new file/folder). |
| apps/desktop/src/addons/builtin.ai-assistant/AiChatComponent.tsx | Adds aria-label to the chat composer textarea. |
| apps/desktop/src/addons/builtin.agent-support/AgentSettings.tsx | Adds aria-labelledby/aria-describedby for agent textareas and labels/config for the keep-alive slider. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Copilot review on TrixtyAI#175 flagged five aria-labels that were re-using action or section keys ("Commit", "Create branch", "Stash changes", "Files: Exclude", "Marketplace") instead of naming the field itself, so AT would announce something like "Commit, edit" where a user reasonably expects "Commit message, edit". Added five dedicated i18n keys (EN + ES) and re-wired the labels: - Commit textarea → git.commit_message_aria_label - New branch input → git.new_branch_aria_label - Stash message input → git.stash_message_aria_label - Exclude pattern input → settings.general.exclude_aria_label - Marketplace filter select→ marketplace.filter_aria_label
|
Addressed Copilot review on the five aria-labels that were re-using action/section keys. Added five dedicated i18n keys (EN + ES) and rewired each control so AT now announces the field, not the action/section:
lint + tsc clean. (41bb7bc) |
Description
Screen readers and voice-control users had no reliable way to target most inputs in the app. Two recurring problems:
<label>elements rendered next to their inputs but were never wired withhtmlFor/id, so AT could not associate them.This PR makes every interactive input announce a real name and, where context helps, a description.
Related Issue
Closes #107
Change
SettingsView— matchingid/htmlForon font family, font size, line height, minimap toggle, exclude-pattern, and display-language. Wrapped the decorative minimap switch visual witharia-hidden="true"so AT only sees the real checkbox.AgentSettings:aria-labelledby/aria-describedbyon the AGENTS.md / DESIGN.md / USER.md / MEMORY.md textareas pointing to the heading and description already rendered above each.id/htmlForon the keep-alive range input, plusaria-valuetextso AT announces e.g. "5 min" rather than the raw number, andaria-describedbypointing at the help text.GitExplorerComponent—aria-labelon the global search input, branch filter, new-branch, commit-message textarea, stash message, and the inline new-file / new-folder inputs. Each now has a stable accessible name independent of its placeholder.MarketplaceView—aria-labelon the search input and the installed/all filter select.AiChatComponent—aria-labelon the chat composer textarea so it announces as e.g. "Ask about your code..." instead of "edit text".Trade-offs
aria-describedby/aria-invalidfor per-input validation errors is not added here because the codebase currently has no inline field-level error UI to expose — errors surface as toasts or dialogs, already covered by thearia-liveregions in [Improvement]: A11y — aria-live regions for chat streaming, updater and git feedback #172. If/when inline validation is added, the association points (aria-describedby) are ready.aria-labelis sourced from a label/title/action key that already describes the input's purpose.Verification
pnpm --filter @trixty/desktop lintpasses clean.npx tsc --noEmitpasses clean.Checklist