Skip to content

Add label to search bar component for accessibility#1139

Merged
vmourac-vtex merged 2 commits intovtex-apps:masterfrom
ailbhebyrne:master
Jul 22, 2025
Merged

Add label to search bar component for accessibility#1139
vmourac-vtex merged 2 commits intovtex-apps:masterfrom
ailbhebyrne:master

Conversation

@ailbhebyrne
Copy link
Copy Markdown
Contributor

What problem is this solving?

Search bar component fails accessibility testing:

  • user interface component doesn't have an accessible name.
  • aria-labelledby attribute refers to a missing element.

Added a label element and CSS to hide the label on the screen.
Also edited the SearchBar snapshot to include the HTML added by the label to ensure the 'should match snapshot' test still passes.

How to test it?

  • Inspect search bar
  • View label within searchBarInnerContainer div

Workspace

Screenshots or example usage:

Screenshot 2025-07-15 at 13 49 02

@ailbhebyrne ailbhebyrne requested a review from a team as a code owner July 15, 2025 13:25
@vtex-io-ci-cd
Copy link
Copy Markdown
Contributor

vtex-io-ci-cd Bot commented Jul 15, 2025

Hi! I'm VTEX IO CI/CD Bot and I'll be helping you to publish your app! 🤖

Please select which version do you want to release:

  • Patch (backwards-compatible bug fixes)

  • Minor (backwards-compatible functionality)

  • Major (incompatible API changes)

And then you just need to merge your PR when you are ready! There is no need to create a release commit/tag.

  • No thanks, I would rather do it manually 😞

@vtex-io-docs-bot
Copy link
Copy Markdown

vtex-io-docs-bot Bot commented Jul 15, 2025

Beep boop 🤖

I noticed you didn't make any changes at the docs/ folder

  • There's nothing new to document 🤔
  • I'll do it later 😞

In order to keep track, I'll create an issue if you decide now is not a good time

  • I just updated 🎉🎉

Copy link
Copy Markdown
Contributor

@vmourac-vtex vmourac-vtex left a comment

Choose a reason for hiding this comment

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

@ailbhebyrne thanks for the PR. Looks good to me. Will approve the PR once you update the CHANGELOG.md with a summary of your changes

@vmourac-vtex vmourac-vtex merged commit 19fbfa7 into vtex-apps:master Jul 22, 2025
2 of 3 checks passed
@vtex-io-ci-cd
Copy link
Copy Markdown
Contributor

vtex-io-ci-cd Bot commented Jul 22, 2025

Your PR has been merged! App is being published. 🚀
Version 3.178.1 → 3.178.2

After the publishing process has been completed (check #vtex-io-releases) and doing A/B tests with the new version, you can deploy your release by running:

vtex deploy vtex.store-components@3.178.2

After that your app will be updated on all accounts.

For more information on the deployment process check the docs. 📖

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.

2 participants