Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Modify screen-reader-only class to improve Orca's reading behavior #4901

Merged
merged 2 commits into from
Nov 19, 2021

Conversation

jalkire
Copy link
Contributor

@jalkire jalkire commented Nov 18, 2021

Details

Currently, we use a screen-reader-only class that makes elements offscreen and 1px x 1px. Unfortunately, shortening the element's width to 1px causes the Orca screen reader to behave in an undesirable manner wherein it reads one word at a time and re-reads the element type with each word. To fix this, this PR removes width: 1px from the screen-reader-only class. Instead, clip-path is used to ensure the element is not visible.

Motivation

Addresses accessibility issue in AI-Android (and AI-Web) on Linux.

Context

I considered simply eliminating width since the class already sets left:-10000px, but decided to add the clip-path as a redundancy.

This should have no visible impact and no impact to other screen readers' behavior.

Pull request checklist

  • Addresses an existing issue: ADO 1886155
  • Ran yarn fastpass
  • Added/updated relevant unit test(s) (and ran yarn test)
  • Verified code coverage for the changes made. Check coverage report at: <rootDir>/test-results/unit/coverage
  • PR title AND final merge commit title both start with a semantic tag (fix:, chore:, feat(feature-name):, refactor:). See CONTRIBUTING.md.
  • [n/a] (UI changes only) Added screenshots/GIFs to description above
  • (UI changes only) Verified usability with NVDA/JAWS

@jalkire jalkire requested a review from a team as a code owner November 18, 2021 01:12
Copy link
Contributor

@lisli1 lisli1 left a comment

Choose a reason for hiding this comment

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

LGTM

@jalkire jalkire merged commit 377a736 into microsoft:main Nov 19, 2021
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