Skip to content

Improve accessibility compliance for keyboard navigation - #125

Merged
iago1501 merged 6 commits into
vtex-apps:masterfrom
RichardByrneCP:patch-1
Feb 24, 2026
Merged

iago1501 merged 6 commits into
vtex-apps:masterfrom
RichardByrneCP:patch-1

Conversation

@RichardByrneCP

@RichardByrneCP RichardByrneCP commented Feb 20, 2026 •

Copy link
Copy Markdown
Contributor

What problem is this solving?

The VTEX slider pagination dots were implemented using <div> tags with role="button". However, they lacked keyboard focus (tabindex="-1") and did not respond to keyboard inputs. This prevented users who rely on keyboards or screen readers from navigating the product shelves, violating WCAG 2.1 Success Criterion 2.1.1.

This PR transforms the static pagination dots into fully interactive keyboard-accessible elements. Key technical changes include:

  • Keyboard Interactivity: Refined the handleDotClick logic to explicitly listen for Enter and Space keys, while ensuring other keys (like Tab) are ignored to prevent accidental slide changes.
  • Focusability: Enabled tab-stop functionality by setting tabIndex={0}, allowing users to navigate through dots sequentially.
  • Semantic Context: Added aria-current to provide a clear "You are here" indicator for assistive technologies.
  • Interaction Stability: Prevented default browser behavior for the Space key to ensure a smooth transition between slides without vertical page jumping.

How to test it?

Use keyboard navigation to scroll through the product carousel using the pagination dots.
https://accessibility1--colproatqa.myvtex.com/

Screenshots or example usage:

Screenshot 2026-02-20 at 13 08 48

@RichardByrneCP
RichardByrneCP requested a review from a team as a code owner February 20, 2026 13:15
@RichardByrneCP
RichardByrneCP requested review from gabpaladino, leo-prange-vtex and vmourac-vtex and removed request for a team February 20, 2026 13:15
@vtex-io-ci-cd

vtex-io-ci-cd Bot commented Feb 20, 2026 •

Copy link
Copy Markdown

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

vtex-io-docs-bot Bot commented Feb 20, 2026 •

Copy link
Copy Markdown

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 🎉🎉

@iago1501 iago1501 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hi @RichardByrneCP , thanks for the PR, just added some minor suggestions

Comment thread react/components/PaginationDots.tsx Outdated
Comment thread CHANGELOG.md Outdated
Comment thread manifest.json Outdated
RichardByrneCP and others added 3 commits February 24, 2026 09:10
Co-authored-by: Iago Espinoza <iago1501@gmail.com>
Co-authored-by: Iago Espinoza <iago1501@gmail.com>
Co-authored-by: Iago Espinoza <iago1501@gmail.com>
@iago1501
iago1501 merged commit 2e085bf into vtex-apps:master Feb 24, 2026
4 of 8 checks passed
@vtex-io-ci-cd

vtex-io-ci-cd Bot commented Feb 24, 2026

Copy link
Copy Markdown

Your PR has been merged! App is being published. 🚀
Version 0.24.8 → 0.24.9

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.slider-layout@0.24.9

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