feat(a11y): keyboard navigation and focus management - #1648
feat(a11y): keyboard navigation and focus management#1648AbhishekChorotiya wants to merge 2 commits into
Conversation
7a20533 to
f13e8f7
Compare
0451104 to
2d38c44
Compare
Add ARIA semantics across all text inputs and selects; required state wired from fieldConfig.isRequired; ARIA on bypassing selects/inputs. Localization: accessibility locale dictionary scaffold + the keys used here (cardNetworkLabel, morePaymentMethodsLabel, yearLabel, monthLabel, optionTabLabel). Reuse: shared LiveError component for announced errors.
Focus hooks (useFocusTrap/useEscapeKey/useReturnFocus); Modal dialog + focus trap + Escape + accessible close; accordion roving tabindex + arrow-key radiogroup; Checkbox Space. ARIA labels localized (closeLabel, dialogLabel, paymentMethodsGroupLabel). Reuse: shared AccessibilityUtils (focus/querySelectorAllWithin/activeElement + focusableSelector) consumed by the focus hooks and accordion, removing duplicated externals.
Review SummaryPR: #1648 - feat(a11y): keyboard navigation and focus management Findings
No blocking issues. The implementation follows ARIA authoring practices for keyboard navigation. |
2d38c44 to
4d6fabc
Compare
f13e8f7 to
54c0f0f
Compare
|
The keyboard navigation and focus management PR introduces cross-iframe communication. Ensure any Flag any instances of: Window.postMessage(message, "*")Use |
|
The new Also verify this hook is compatible with React 18's concurrent features — synchronous focus management during render can cause issues with time-slicing. |
| } else { | ||
| None | ||
| } | ||
| }, [enabled]) |
There was a problem hiding this comment.
| }, [enabled]) | |
| }, (enabled, onEscape)) |
| className="p-4 flex justify-end self-end mb-4 cursor-pointer" | ||
| onClick={_ => closeModal()}> | ||
| onClick={_ => closeModal()} | ||
| ariaLabel={localeString.closeLabel}> |
There was a problem hiding this comment.
check if locale support is working in modal flows or not.
| #"false" | ||
| } | ||
|
|
||
| @send external focus: Dom.element => unit = "focus" |
ab7307b to
cc05cab
Compare

Type of Change
Description
This PR improves keyboard navigation and focus management for the payment experience. It adds shared keyboard activation and focus primitives, applies clearer expanded/dialog state where relevant, and keeps non-native interactive controls operable with keyboard expectations that match native controls.
The user impact is smoother keyboard traversal, clearer assistive-technology context for dialogs and expandable controls, and fewer focus traps or dead ends during payment selection.
This PR is stacked after the form-control accessibility PR because it reuses the shared accessibility helper module introduced there.
Closes #1647
How did you test it?
Validated as part of the completed accessibility stack. The checks cover the combined flow after all stacked PRs are applied, including keyboard and focus behavior exercised during the local accessibility smoke checks.
npm run re:buildon the completed accessibility stack.npm run test:hookson the completed accessibility stack.npm run buildon the completed accessibility stack.Checklist
npm run re:build