Skip to content

Test PR- Fix keyboard focus in location dropdown for accessibility#645

Open
aanchalbhansali wants to merge 1 commit intomasterfrom
claude/issue-622-20260202-1644
Open

Test PR- Fix keyboard focus in location dropdown for accessibility#645
aanchalbhansali wants to merge 1 commit intomasterfrom
claude/issue-622-20260202-1644

Conversation

@aanchalbhansali
Copy link
Contributor

Fixes #622

Summary

When the location dropdown is expanded via keyboard (Tab + Enter), focus now automatically moves to the currently selected section item within the dropdown, improving keyboard navigation and meeting accessibility standards.

Changes

  • Added focusOnSelectedSection() method to set focus on the selected section when the dropdown opens
  • Method tries to find the selected element by:
    1. Section ID (curSectionId)
    2. aria-selected="true" attribute
    3. First .Section element as fallback
  • Integrated into onPopupToggle callback with setTimeout to ensure the popup has rendered before setting focus

Testing

Manual testing recommended:

  1. Install the OneNote Clipper extension with these changes
  2. Sign in with a Microsoft work account
  3. Navigate to the location dropdown using Tab key
  4. Press Enter to expand the dropdown
  5. Verify that focus lands on the selected section item

Complies with Microsoft Liquid accessibility guidelines for Focus Order (02.04.03).

Generated with Claude Code

When the location dropdown is expanded via keyboard (Tab + Enter),
focus now automatically moves to the currently selected section item
within the dropdown, improving keyboard navigation and meeting
accessibility standards (Focus Order - MS Liquid guidelines).

Changes:
- Added focusOnSelectedSection() method to set focus on the selected
  section when the dropdown opens
- Method tries to find the selected element by:
  1. Section ID (curSectionId)
  2. aria-selected="true" attribute
  3. First .Section element as fallback
- Integrated into onPopupToggle callback with setTimeout to ensure
  the popup has rendered before setting focus

Fixes #622

Co-authored-by: Aanchal Bhansali <aanchalbhansali@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Claude Test Bug

1 participant