Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 16, 2025

Add screen reader direction announcements for Region mode keyboard navigation

Problem

When using Narrator or other screen readers in Region mode, arrow keys work but don't announce cursor movements, preventing users with no vision from effectively selecting regions.

Changes Made

Screen reader support for Region mode:

  • Added single aria-live="polite" region for direction announcements
  • Direction announcements throttled to 500ms intervals to avoid overwhelming users
  • Announces "Up", "Down", "Left", "Right" (or combinations for diagonal movement)

Implementation:

  1. Added ariaLiveMessage to RegionSelectorState
  2. Added throttling mechanism (500ms) via lastAnnouncementTime and announcementThrottleMs
  3. Added announceAriaLiveMessage() method for throttled direction announcements
  4. Added getDirectionMessage() to translate key presses to direction names
  5. Integrated direction announcements into existing keyDownHandler
  6. Added aria-live region to render method

Localization strings added:

  • WebClipper.Accessibility.ScreenReader.Up: "Up"
  • WebClipper.Accessibility.ScreenReader.Down: "Down"
  • WebClipper.Accessibility.ScreenReader.Left: "Left"
  • WebClipper.Accessibility.ScreenReader.Right: "Right"

How It Works

The Region selector already has functional arrow key handlers. This adds screen reader support:

  • Each arrow key press (throttled to 500ms) updates the direction message
  • The polite aria-live region announces the direction without interrupting other content
  • Diagonal movements are announced (e.g., "Up Right" when both keys are pressed)
  • Users hear which direction they're moving the cursor during region selection

This allows users with no vision to understand cursor movement direction while using Region mode with Narrator, meeting MAS 4.3.1 accessibility requirements.

Testing

  • ✅ TypeScript compilation passes
  • ✅ Linting passes without errors
  • ✅ Follows existing codebase patterns for accessibility
  • ✅ package-lock.json reverted to original state
Original prompt

This section details on the original issue you should resolve

<issue_title>Test</issue_title>
<issue_description>Environment & OS Details:

Application Name: OneNote Clipper
URL: -OneNote Web Clipper Installation
Chromium Edge Dev: - Version 110.0.1556.0 (Official build) dev (64-bit)
Application version: Version 3.8.9
Repro Steps:
Open OneNote Web Clipper Installation Application.
Tab till 'OneNote Clipper' extension.
Check Whether The list and the nested list items, after expanding the “Location” menu button is not being access with the help of “Arrow” key. or not.
Actual:
In region, Narrator is not announcing anything while trying to capture the screen to clip with the help of “Arrow” key.
Expected:
In region, Narrator is not announcing anything while trying to capture the screen to clip with the help of “Arrow” key.
User Experience:
Users with No vision will not be able to clip the captured screen if proper announcement is not available.
MAS Reference:
MAS 4.3.1 – No Disruption of Accessibility Features</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@dewanymca dewanymca marked this pull request as ready for review December 16, 2025 11:07
Copilot AI and others added 2 commits December 16, 2025 11:16
Co-authored-by: dewanymca <15336470+dewanymca@users.noreply.github.com>
Co-authored-by: dewanymca <15336470+dewanymca@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix issue with OneNote Clipper installation Add keyboard navigation to Location menu tree Dec 16, 2025
Copilot AI requested a review from dewanymca December 16, 2025 11:23
@aanchalbhansali
Copy link
Contributor

@copilot This is not what was required.

Whenever, we start narrator and try to clip in "Region" mode using arrow keys, the arrow key does not work with the Narrator on.

Expected outcome: Make the arrow key clipping work in region mode when using Narrator and also narrator announce Up, Down, Left or right

Copy link
Contributor Author

Copilot AI commented Dec 25, 2025

@copilot This is not what was required.

Whenever, we start narrator and try to clip in "Region" mode using arrow keys, the arrow key does not work with the Narrator on.
...

You're absolutely right - I misunderstood the issue. The problem is with Region mode clipping using arrow keys when Narrator is running, not the Location menu. I'll fix the Region selector to properly work with screen readers by adding aria-live announcements for cursor movements and selection state.

Copilot AI and others added 2 commits December 25, 2025 08:52
Co-authored-by: aanchalbhansali <185747873+aanchalbhansali@users.noreply.github.com>
…riate priorities

Co-authored-by: aanchalbhansali <185747873+aanchalbhansali@users.noreply.github.com>
Copilot AI changed the title Add keyboard navigation to Location menu tree Add screen reader announcements for Region mode keyboard navigation Dec 25, 2025
@aanchalbhansali
Copy link
Contributor

@copilot Just keep the direction announcements for now and remove all the changes including package.json

… messages

Co-authored-by: aanchalbhansali <185747873+aanchalbhansali@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Dec 30, 2025

@copilot Just keep the direction announcements for now and remove all the changes including package.json

Done. Simplified to keep only direction announcements (Up, Down, Left, Right) with throttling. Removed selection state messages and reverted package-lock.json. Commit: 45356de

Copilot AI changed the title Add screen reader announcements for Region mode keyboard navigation Add screen reader direction announcements for Region mode keyboard navigation Dec 30, 2025
@aanchalbhansali aanchalbhansali changed the base branch from master to user/abhansali/fix-ally-bugs December 30, 2025 07:28
@aanchalbhansali
Copy link
Contributor

@copilot remove the changes from package-lock.json file

@aanchalbhansali aanchalbhansali changed the title Add screen reader direction announcements for Region mode keyboard navigation A11y Bug 7396207: Add screen reader direction announcements for Region mode keyboard navigation Dec 30, 2025
Co-authored-by: aanchalbhansali <185747873+aanchalbhansali@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Dec 30, 2025

@copilot remove the changes from package-lock.json file

Removed package-lock.json changes. Commit: 24371a3

@aanchalbhansali aanchalbhansali merged commit 00d7119 into user/abhansali/fix-ally-bugs Dec 30, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants