Skip to content

Conversation

@Nitin-100
Copy link
Contributor

@Nitin-100 Nitin-100 commented Jan 11, 2026

Description

This PR fixes redundant screen reader announcements for the collapsible category buttons in the left navigation drawer.

Why

When using Windows Narrator with the app, expanding/collapsing a category in the navigation drawer caused the expanded/collapsed state to be announced twice. For example: "Basic Input, collapsed, button, collapsed, 1 of 11" - the "collapsed" state is announced twice.

This happened because:

  1. The accessibilityLabel prop contained the state text (e.g., "Basic Input, collapsed")
  2. The accessibilityState={{expanded: isExpanded}} prop also communicated the state to the screen reader

What

  • NewArch/src/App.tsx: Removed the expanded/collapsed state from the accessibilityLabel prop, keeping only the category label. The accessibilityState prop already handles communicating the expanded state to screen readers.
  • src/App.tsx: Added accessibilityState={{expanded: isExpanded}} to ensure the state is properly communicated (this file was missing the accessibility state prop).

Screenshots

N/A - Accessibility fix, no visual changes

Testing

  1. Open the app with Windows Narrator enabled
  2. Navigate to the left drawer navigation
  3. Focus on a collapsible category button (e.g., "Basic Input")
  4. Expand and collapse the category
  5. Verify Narrator announces the state only once (e.g., "Basic Input, collapsed, button, 1 of 11")
Microsoft Reviewers: Open in CodeFlow

Remove expanded/collapsed state from accessibilityLabel since accessibilityState prop already provides this information to screen readers, causing duplicate announcements.
Copy link
Contributor

@vineethkuttan vineethkuttan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be great if you add a screenshare video for the announcement or share the screenshot of speech recap after you open the narrator
image

@vineethkuttan
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@Nitin-100 Nitin-100 merged commit feeb72c into microsoft:main Jan 13, 2026
2 checks 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

Development

Successfully merging this pull request may close these issues.

2 participants