Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 29, 2025

Accessibility Fix: Enable Narrator to announce mode buttons as a list

Summary:

Fixed accessibility issue where Narrator screen reader was not properly announcing the mode buttons (Full page, Region, Article, Bookmark) as a list with selectable options in the OneNote Web Clipper extension.

Changes Made:

  • Removed aria-hidden="true" from the listbox container in modeButtonSelector.tsx
  • Changed role="button" to role="option" in modeButton.tsx to properly implement ARIA listbox pattern
  • Reverted unintentional package-lock.json changes
  • Verified changes with code review - No issues found
  • Security scan completed - No vulnerabilities found
  • Responded to feedback from @aanchalbhansali

Technical Details:

Root Cause: The ARIA listbox pattern was incomplete:

  1. The container had role="listbox" but with aria-hidden="true" preventing screen reader access
  2. Child elements had role="button" instead of the required role="option" for listbox semantics

Fix:

  1. Commit d8bb0cd: Removed aria-hidden="true" from line 157 in modeButtonSelector.tsx
  2. Commit 5ed11a1: Changed role="button" to role="option" on line 40 in modeButton.tsx
  3. Commit [latest]: Reverted unintentional package-lock.json changes

Proper ARIA Listbox Pattern:

  • Container: role="listbox"
  • Children: role="option" ✓ (was role="button")
  • With aria-selected, aria-setsize, and aria-posinset attributes ✓

Impact:

  • Screen readers like Narrator will now properly announce the mode buttons as a list with selectable options (not individual buttons)
  • Users with no vision will understand they can use arrow keys to navigate between options
  • Improves compliance with MAS 4.2.1 – Object Information accessibility standards

Security Summary:

No security vulnerabilities were discovered or introduced by these changes.

Original prompt

This section details on the original issue you should resolve

<issue_title>Bug 7396201: A11y_OneNoteClipper_Verify accessibility with Clip_ScreenReader: Narrator is not announcing “list”, for the list of buttons such as “Full page, Region, Article and Bookmark”.</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 Narrator is not announcing “list”, for the list of buttons such as “Full page, Region, Article and Bookmark”. or not.
Actual:
Narrator is not announcing “list”, for the list of buttons such as “Full page, Region, Article and Bookmark”.
Expected:
Narrator should announce “list”, for the list of buttons such as “Full page, Region, Article and Bookmark”.

User Experience:
User with No vision might miss out on the other available buttons, as “list” is not being announced and user may press “Tab” key, instead of “Arrow” key.
MAS Reference:
MAS 4.2.1 – Object Information</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.

Removed aria-hidden="true" attribute from the listbox element in
modeButtonSelector.tsx to allow screen readers like Narrator to
announce the list of mode buttons (Full page, Region, Article,
Bookmark) properly. This enables users with no vision to know they
can use arrow keys to navigate between options instead of tab keys.

Co-authored-by: aanchalbhansali <185747873+aanchalbhansali@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix Narrator not announcing list of buttons in OneNote Clipper Remove aria-hidden from mode button listbox to enable screen reader list announcement Dec 29, 2025
@aanchalbhansali
Copy link
Contributor

@copilot the fix is incorrect. Currently the narrator is announcing different clipping modes as individual buttons instead of options as list, please help fix that.

Changed role="button" to role="option" in modeButton.tsx to properly
implement the ARIA listbox pattern. A listbox container requires child
elements with role="option" (not role="button") for screen readers to
announce it as a list with selectable options.

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

Copilot AI commented Dec 29, 2025

@copilot the fix is incorrect. Currently the narrator is announcing different clipping modes as individual buttons instead of options as list, please help fix that.

Fixed in commit 5ed11a1. Changed role="button" to role="option" in the mode buttons to properly implement the ARIA listbox pattern. Screen readers now recognize the mode buttons as options in a list rather than individual buttons.

Copilot AI changed the title Remove aria-hidden from mode button listbox to enable screen reader list announcement Implement proper ARIA listbox pattern for mode buttons to enable screen reader list announcement Dec 29, 2025
@aanchalbhansali aanchalbhansali changed the base branch from master to user/abhansali/fix-ally-bugs December 29, 2025 09:50
@aanchalbhansali
Copy link
Contributor

aanchalbhansali commented Dec 29, 2025

@copilot why changes were made to package-lock.json file....please undo the changes

Reverted package-lock.json to its original state. The graceful-fs version
change was unintentional and occurred during npm install.

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

Copilot AI commented Dec 29, 2025

@copilot why changes were made to package-lock.json file....please undo the changes

Reverted in commit f2d32d0. The package-lock.json change was unintentional and occurred during npm install. The file has been restored to its original state.

@aanchalbhansali aanchalbhansali marked this pull request as ready for review December 29, 2025 10:02
@aanchalbhansali aanchalbhansali changed the title Implement proper ARIA listbox pattern for mode buttons to enable screen reader list announcement A11y Bug 7396201: Implement proper ARIA listbox pattern for mode buttons to enable screen reader list announcement Dec 29, 2025
@aanchalbhansali aanchalbhansali merged commit 7145052 into user/abhansali/fix-ally-bugs Dec 29, 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

2 participants