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

[Accessibility Handbook] Update screen-reader-text CSS Class and Documentation for Modern Browser Standards #1744

Open
dhruvang21 opened this issue Oct 17, 2024 · 3 comments
Labels
[Status] To do Issue marked as Todo

Comments

@dhruvang21
Copy link

Issue Description

The screen-reader-text CSS class and its documentation need to be updated in accordance with recent changes in the block editor repository, which simplify the class by removing outdated styles such as clip: rect(1px, 1px, 1px, 1px); and prefixed versions of clip-path, e.g., -webkit-clip-path: inset(50%).

URL of the Page with the Issue

https://make.wordpress.org/accessibility/handbook/markup/the-css-class-screen-reader-text/

Section of Page with the issue

https://make.wordpress.org/accessibility/handbook/markup/the-css-class-screen-reader-text/#the-css

Why is this a problem?

The current documentation and implementations contain outdated CSS that is no longer necessary. Modern browsers no longer require styles like clip: rect(1px, 1px, 1px, 1px); and prefixed versions of clip-path. Updating the documentation is important to ensure developers are using the most up-to-date and optimized code.

Originally posted on core trac:- https://core.trac.wordpress.org/ticket/62238

Suggested Fix

  • Remove clip: rect(1px, 1px, 1px, 1px); from the CSS class.
  • Remove any prefixed versions of clip-path, such as -webkit-clip-path: inset(50%);.
  • Update the entire codebase, including bundled themes and documentation, to reflect these changes.
@dhruvang21 dhruvang21 added the [Status] To do Issue marked as Todo label Oct 17, 2024
Copy link

Heads up @WordPress/docs-issues-coordinators, we have a new issue open. Time to use 'em labels.

@DrewAPicture
Copy link
Member

Just noting that even if we drop the clip() line from the CSS, we may need to add a note below the .screen-reader-text example explaining why it should still be used if there is a need to support older browsers. See this note on the core PR.

@atachibana atachibana changed the title Update screen-reader-text CSS Class and Documentation for Modern Browser Standards [Accessibility Handbook] Update screen-reader-text CSS Class and Documentation for Modern Browser Standards Jan 7, 2025
@joedolson
Copy link

FYI, this is mostly being tracked in https://core.trac.wordpress.org/ticket/62238, so that everything can be synchronized.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Status] To do Issue marked as Todo
Projects
None yet
Development

No branches or pull requests

3 participants