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

Perf: Use more modern screen-reader only styles #796

Merged
merged 1 commit into from
Sep 20, 2021

Conversation

kurtextrem
Copy link
Contributor

Description

See: https://a11y-guidelines.orange.com/en/web/components-examples/accessible-hiding/.

This improves performance, since the previously used left: -1000px technique created huge layers when the div was close to (or overlapped) an element which got promoted to its own layer.

Type of Change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

See screenshot: https://prnt.sc/1qae4pk
After swapping the css, the layers are gone.

Checklist: (Feel free to delete this section upon completion)

See: https://a11y-guidelines.orange.com/en/web/components-examples/accessible-hiding/. 

This also improves performance, since the previously used `left: -1000px` technique created huge layers when the div was close to (or overlapped) an element which got promoted to its own layer.
overflow: 'hidden',
padding: 0,
margin: '-1px',
clip: 'rect(0, 0, 0, 0)',
Copy link

@XavierMeunier XavierMeunier Sep 17, 2021

Choose a reason for hiding this comment

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

clip is going to be deprecated and clip-path seems to be the new way to go.

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.

3 participants