Fix/tabs nvda double announcement#108
Open
joshsadam wants to merge 3 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the pathogen--tabs Stimulus controller to prevent duplicate NVDA announcements during arrow-key tab navigation by batching/deferring certain DOM updates, and adds regression tests to validate the new behavior.
Changes:
- Batch tab attribute updates (including temporarily stripping/restoring
aria-controls) and defer panel visibility updates during keyboard navigation. - Avoid re-applying tab selection state when the DOM is already in-sync (including on
turbo:render). - Add tests covering deferred panel visibility and avoiding redundant
aria-selectedmutations; update generated Tailwind CSS output.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| test/javascript/controllers/tabs_controller.test.js | Adds tests for deferred panel updates during keyboard navigation and for skipping redundant aria-selected updates (including on turbo:render). |
| app/assets/stylesheets/pathogen_view_components.css | Updates generated Tailwind CSS output/version and color token definitions. |
| app/assets/javascripts/pathogen_view_components/tabs_controller.js | Refactors tab/panel selection logic to batch ARIA updates, defer panel visibility, and skip redundant state application to avoid NVDA double announcements. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…kens - Updated Tailwind CSS from v4.3.1 to v4.3.2. - Added new blue color tokens: --color-blue-50, --color-blue-100, --color-blue-200, and --color-blue-900.
67160da to
1898e79
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do and why?
turbo:render.Screenshots or screen recordings
How to set up and validate locally
pnpm test test/javascript/controllers/tabs_controller.test.jsPR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.