Skip to content

[EuiScreenReaderOnly] Add preventCopy prop - #6806

Closed
cee-chen wants to merge 7 commits into
elastic:mainfrom
cee-chen:sr-only-copy
Closed

cee-chen wants to merge 7 commits into
elastic:mainfrom
cee-chen:sr-only-copy

Conversation

@cee-chen

@cee-chen cee-chen commented May 23, 2023 •

Copy link
Copy Markdown
Contributor

Summary

closes #6804
reverts #6817 (isFocused workaround should no longer be needed)

This PR adds a preventCopy prop to EuiScreenReaderOnly, and applies said functionality to EuiDataGrid to prevent customers copying data from grabbing the SR information about row/column count.

I recommend, as always, following along by commit to separate out cleanup tasks.

QA


General checklist

  • Checked in Chrome, Safari, Edge, and Firefox
  • Checked for accessibility including keyboard-only and screenreader modes
  • Props have proper autodocs (using @default if default values are missing) and playground toggles
  • Added documentation
  • Added or updated jest and cypress tests
  • A changelog entry exists and is marked appropriately

- [ ] Checked in both light and dark modes
- [ ] Checked in mobile
- [ ] Checked Code Sandbox works for any docs examples
- [ ] Checked for breaking changes and labeled appropriately
- [ ] Updated the Figma library counterpart

@cee-chen
cee-chen requested a review from 1Copenut May 23, 2023 23:02
@cee-chen

cee-chen commented May 23, 2023 •

Copy link
Copy Markdown
Contributor Author

lol F, this works for Firefox and Safari with richtext paste but not Chrome/Edge (only works on plain paste). 💀

https://stackoverflow.com/questions/65021694/user-selectnone-still-part-of-copied-rich-text-in-chrome

https://bugs.chromium.org/p/chromium/issues/detail?id=1083125

Looks like this might be fixed soon on Chromium's end (fingers crossed) 😬 - rather than trying to do JS shenanigans with onCopy, it might be better to wait until a little bit / keep this PR dangling until Chrome pushes a fix

@kibanamachine

Copy link
Copy Markdown
Contributor

@1Copenut 1Copenut left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I reviewed the PR and tried out the recommended QA tasks for the EuiScreenReaderOnly and EuiDataGrid components. They worked as expected using the keyboard and VoiceOver on Safari.

I'm okay letting this hang out for a bit if you feel Chromium is going to ship a fix soon. I generally like to ship even partial fixes if it improves the experience for users without degrading it for others. In this case, you've improved the experience for Firefox and Safari users, and AFAIK the experience is the same for Chromium.

@cee-chen

Copy link
Copy Markdown
Contributor Author

I'm going to wait for Chromium I think. I guarantee if we release a prop promising to do something that doesn't work quite correctly for the largest market share of browsers, people will be flooding our GitHub issues 😅

@1Copenut

Copy link
Copy Markdown
Contributor

I'm going to wait for Chromium I think. I guarantee if we release a prop promising to do something that doesn't work quite correctly for the largest market share of browsers, people will be flooding our GitHub issues 😅

Excellent point, this ^^.

@kibanamachine

Copy link
Copy Markdown
Contributor

@github-actions

Copy link
Copy Markdown

👋 Hey there. This PR hasn't had any activity for 90 days. We'll automatically close it if that trend continues for another week. If you feel this issue is still valid and needs attention please let us know with a comment.

@github-actions github-actions Bot added the stale-pr (Don't delete - used for automation) label Aug 29, 2023
@cee-chen

Copy link
Copy Markdown
Contributor Author

Removing the stale PR label for now in hopes that Chromium eventually fixes the bug 🤞

@cee-chen cee-chen removed the stale-pr (Don't delete - used for automation) label Aug 29, 2023
@github-actions

Copy link
Copy Markdown

👋 Hey there. This PR hasn't had any activity for 90 days. We'll automatically close it if that trend continues for another week. If you feel this issue is still valid and needs attention please let us know with a comment.

@github-actions github-actions Bot added the stale-pr (Don't delete - used for automation) label Nov 27, 2023
@cee-chen cee-chen removed the stale-pr (Don't delete - used for automation) label Nov 27, 2023
@cee-chen

cee-chen commented Feb 5, 2024

Copy link
Copy Markdown
Contributor Author

I'm just gonna move this back to draft since Chromium doesn't appear to be resolving the bug anytime soon. 🥲

@github-actions

github-actions Bot commented May 6, 2024

Copy link
Copy Markdown

👋 Hey there. This PR hasn't had any activity for 90 days. We'll automatically close it if that trend continues for another week. If you feel this issue is still valid and needs attention please let us know with a comment.

@github-actions github-actions Bot added the stale-pr (Don't delete - used for automation) label May 6, 2024
@github-actions

Copy link
Copy Markdown

❌ We're automatically closing this PR due to lack of activity. Please comment if you feel this was done in error.

@github-actions github-actions Bot added the stale-pr-closed (Don't delete - used for automation) label May 13, 2024
@github-actions github-actions Bot closed this May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blocked stale-pr (Don't delete - used for automation) stale-pr-closed (Don't delete - used for automation)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[EuiDataGrid] Skip screen reader text when selecting text from grid

3 participants