Clickable: keyboard navigation improvements - #1444
Open
ascholerChemeketa wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request updates the ClickableArea interactive to use a roving tabindex keyboard navigation model, improving keyboard and screen reader accessibility by keeping only one choice in the page Tab order while enabling intra-group navigation via Arrow/Home/End keys.
Changes:
- Implemented roving
tabindexfocus management and Arrow/Home/End key navigation inClickableArea. - Updated screen reader instructions and README accessibility documentation to match the new interaction model.
- Expanded tests to validate focus movement,
tabindexupdates, and default-prevention behavior for relevant keys.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| bases/rsptx/interactives/runestone/clickableArea/js/clickable.js | Adds roving tabindex + focus utilities and keyboard handling for Arrow/Home/End, and focuses on click for consistent active choice behavior. |
| bases/rsptx/interactives/runestone/clickableArea/test/clickable.test.js | Updates event simulation to be cancelable and adds/updates assertions for roving tabindex and focus navigation behaviors. |
| bases/rsptx/interactives/runestone/clickableArea/README.md | Updates accessibility documentation to describe the new keyboard navigation model. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
This pull request significantly improves the keyboard accessibility of the
ClickableAreainteractive component by implementing a roving tab index pattern. Now, only one clickable area is in the tab order at a time, and users can navigate between choices using arrow keys, Home, and End, in line with accessibility best practices. The documentation, code, and tests have all been updated to reflect these changes.Accessibility Improvements:
clickable.js,README.md) [1] [2]README.md,clickable.js) [1] [2]Code Enhancements:
setActiveClickable,focusClickable, andmoveClickableFocusmethods to manage the roving tab index and keyboard interactions. (clickable.js)Testing Updates:
clickable.test.js) [1] [2] [3] [4]clickable.test.js)These changes make the interactive component more accessible and compliant with ARIA guidelines, providing a better experience for keyboard and screen reader users.