fix(a11y): Make recurrence modal fully keyboard-accessible#1533
Open
fix(a11y): Make recurrence modal fully keyboard-accessible#1533
Conversation
Fixes plone/Products.CMFPlone#4272 - Make modal focus trap dynamic: re-query visible focusable elements on each Tab press so that AJAX-loaded content (occurrence lists) and dynamically shown/hidden fields are always reachable via keyboard. - Change occurrence action links (<a href="#">) to <button> elements for proper semantics and native keyboard support (Enter + Space). - Change display widget "Add"/"Delete" links to <button> elements. - Update all matching JS selectors and CSS rules. - Add focus-visible outline styles for occurrence action buttons. - Add tests verifying button elements are used.
a2acead to
d039306
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.
Summary
Fixes plone/Products.CMFPlone#4272
The recurrence modal had two keyboard accessibility issues:
<a href="#">instead of proper<button>elementsChanges
pat/modal/modal.js):activateFocusTrap()now re-queries visible focusable elements on each Tab keypress instead of using a static list captured at init. This benefits all modals across Plone, not just recurrence.occurrence.xml,display.xml,recurrence.js): Changed occurrence action links and display widget "Add"/"Delete" links from<a href="#">to<button type="button">for proper semantics and native keyboard support (Enter + Space).recurrence.scss): Updated selector fromdiv.ridisplay .rimain atodiv.ridisplay .rimain button. Added:focus-visibleoutline for occurrence action buttons.recurrence.test.js): Added tests verifying<button>elements are used for display controls and dynamically added date actions.Test plan