Skip to content

[EuiMark] Fix screen-reader only CSS causing scroll issues in Chrome#5921

Merged
cee-chen merged 4 commits intoelastic:mainfrom
cee-chen:mark/fix-scroll-issues
May 23, 2022
Merged

[EuiMark] Fix screen-reader only CSS causing scroll issues in Chrome#5921
cee-chen merged 4 commits intoelastic:mainfrom
cee-chen:mark/fix-scroll-issues

Conversation

@cee-chen
Copy link
Copy Markdown
Contributor

@cee-chen cee-chen commented May 23, 2022

Summary

EuiMark's pseudo ::before/::after elements had some custom screen reader only CSS that wasn't the actual CSS in our .euiScreenReaderOnly utility. The CSS we're using in our existing mixin has been battle-tested and accounts for many cross-browser shenanigans (see #5130, #5152), and we shouldn't be deviating from it.

This PR fixes the Emotion euiScreenReaderOnly mixin to match our Sass mixin w/ comments and then updates EuiMark to use said mixin.

Before / After:

before after

Checklist

  • Checked in Chrome, Safari, Edge, and Firefox
  • Added documentation
  • Added or updated jest and cypress tests
  • Checked for breaking changes and labeled appropriately
  • Checked for accessibility including keyboard-only and screenreader modes
  • A changelog entry exists and is marked appropriately

cee-chen added 4 commits May 23, 2022 13:24
- Match CSS (+ comments) to existing Sass with comments

- Match exported name to other mixins (e.g., text utilities)
@cee-chen cee-chen marked this pull request as ready for review May 23, 2022 20:59
@cee-chen cee-chen requested review from 1Copenut and thompsongl May 23, 2022 20:59
@kibanamachine
Copy link
Copy Markdown

Preview documentation changes for this PR: https://eui.elastic.co/pr_5921/

Copy link
Copy Markdown
Contributor

@thompsongl thompsongl left a comment

Choose a reason for hiding this comment

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

LGTM! Confirmed the scrollbar fix.

Linking #5846 as I'll need to reconcile these changes

Copy link
Copy Markdown
Contributor

@1Copenut 1Copenut left a comment

Choose a reason for hiding this comment

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

LGTM!

@cee-chen cee-chen merged commit 404ac83 into elastic:main May 23, 2022
@cee-chen cee-chen deleted the mark/fix-scroll-issues branch May 23, 2022 22:00
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.

4 participants