fix: Set keyboard focus on dialogs for accessibility (MAS 2.4.7)#627
Open
claude[bot] wants to merge 1 commit intomasterfrom
Open
fix: Set keyboard focus on dialogs for accessibility (MAS 2.4.7)#627claude[bot] wants to merge 1 commit intomasterfrom
claude[bot] wants to merge 1 commit intomasterfrom
Conversation
When the Clip successful dialog appears, keyboard focus is now set to the "View in OneNote" button. Similarly, when the Region selection instructions dialog appears, focus is set to the "Back to Home" button. This ensures keyboard users have visible focus when these dialogs are displayed, addressing MAS 2.4.7 Focus Visible requirements. Closes #626 Co-authored-by: Aanchal Bhansali <[email protected]>
|
@claude[bot] please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
Contributor
|
@microsoft-github-policy-service agree company="Microsoft" |
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
Changes Made
1. Success Panel (
src/scripts/clipperUI/panels/successPanel.tsx)initiallySetFocusmethod to programmatically set focus on an elementonElementFirstDraw(this.initiallySetFocus)to the "View in OneNote" button2. Region Selecting Panel (
src/scripts/clipperUI/panels/regionSelectingPanel.tsx)Technical Approach
The fix follows the existing pattern used in
SignInPanel.tsxwhereonElementFirstDraw(defined inComponentBase.ts) is used to execute a callback when an element is first rendered. This ensures focus is set exactly once when the panel first appears.Accessibility Compliance
This addresses MAS 2.4.7 – Focus Visible by ensuring keyboard users have visible focus when these dialogs are displayed.
Closes #626
🤖 Generated with Claude Code