Skip to content

fix(a11y): add aria-label to search input#220

Merged
ldm0 merged 1 commit into
cardisoft:masterfrom
dkattan:fix/aria-label-search-input
Jun 26, 2026
Merged

fix(a11y): add aria-label to search input#220
ldm0 merged 1 commit into
cardisoft:masterfrom
dkattan:fix/aria-label-search-input

Conversation

@dkattan

@dkattan dkattan commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

The search input had no accessible name, making it invisible to assistive technologies. Added aria-label with i18n key search.aria.searchInput threaded through App → SearchBar. Updated all 15 locale files.

Split out from #219 — this is an independently mergeable accessibility fix.

dkattan added a commit to dkattan/cardinal that referenced this pull request Jun 25, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The search input had no accessible name, making it invisible to
assistive technologies. Added aria-label with i18n key
'search.aria.searchInput' ('Search input') threaded through
App → SearchBar. Updated all 15 locale files.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@dkattan dkattan force-pushed the fix/aria-label-search-input branch from 27c9a8c to 2f5b56e Compare June 25, 2026 22:18
@ldm0 ldm0 requested review from Copilot and ldm0 June 26, 2026 02:54

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds an accessible name to the app’s primary search input by introducing an i18n-backed aria-label and threading it from App into SearchBar, with corresponding locale updates.

Changes:

  • Add ariaLabel prop to SearchBar and apply it to the query <input> as aria-label.
  • In App, source the label via i18n key search.aria.searchInput and pass it into SearchBar.
  • Add search.aria.searchInput translations across all locales.

Reviewed changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
cardinal/src/App.tsx Fetches search.aria.searchInput via t() and passes it to SearchBar.
cardinal/src/components/SearchBar.tsx Adds ariaLabel prop and applies it to the search input’s aria-label.
cardinal/src/components/tests/SearchBar.test.tsx Updates test helper props to include the new required ariaLabel.
cardinal/src/i18n/resources/en-US.json Adds search.aria.searchInput translation string.
cardinal/src/i18n/resources/de-DE.json Adds search.aria.searchInput translation string.
cardinal/src/i18n/resources/es-ES.json Adds search.aria.searchInput translation string.
cardinal/src/i18n/resources/fr-FR.json Adds search.aria.searchInput translation string.
cardinal/src/i18n/resources/it-IT.json Adds search.aria.searchInput translation string.
cardinal/src/i18n/resources/pt-BR.json Adds search.aria.searchInput translation string.
cardinal/src/i18n/resources/ru-RU.json Adds search.aria.searchInput translation string.
cardinal/src/i18n/resources/tr-TR.json Adds search.aria.searchInput translation string.
cardinal/src/i18n/resources/uk-UA.json Adds search.aria.searchInput translation string.
cardinal/src/i18n/resources/ar-SA.json Adds search.aria.searchInput translation string.
cardinal/src/i18n/resources/hi-IN.json Adds search.aria.searchInput translation string.
cardinal/src/i18n/resources/ja-JP.json Adds search.aria.searchInput translation string.
cardinal/src/i18n/resources/ko-KR.json Adds search.aria.searchInput translation string.
cardinal/src/i18n/resources/zh-CN.json Adds search.aria.searchInput translation string.
cardinal/src/i18n/resources/zh-TW.json Adds search.aria.searchInput translation string.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 8 to 12
const props: ComponentProps<typeof SearchBar> = {
inputRef: createRef<HTMLInputElement>(),
placeholder: 'Search',
ariaLabel: 'Search input',
value: '',
@ldm0

ldm0 commented Jun 26, 2026

Copy link
Copy Markdown
Member

Thanks!

@ldm0 ldm0 merged commit 4c50734 into cardisoft:master Jun 26, 2026
10 checks passed
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.

3 participants