[EuiSkipLink] Improve overrideLinkBehavior UX#5996
Merged
cee-chen merged 5 commits intoelastic:mainfrom Jun 24, 2022
Merged
Conversation
- Do not set tabIndex to -1 if the element is already tabbable - Remove the tabindex property on blur / once the user has moved focus off the element, to prevent focus hijinks after the fact + Add E2E Cypress tests to confirm behavior/prevent regressions
Unfortunately on Chrome `scrollIntoView` and `.focus()` without preventScroll keeps jumping down, which hides some content due to the sticky header As such I added a position and viewport check to only scroll to the item if it's below (half) the viewport or the user scrolled down past the top
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_5996/ |
cchaos
approved these changes
Jun 24, 2022
Contributor
cchaos
left a comment
There was a problem hiding this comment.
🙌 I can't attest to the code but the behavior is much nicer. Thank you!
Tested in Chrome, FF, and Safari
cee-chen
commented
Jun 24, 2022
Contributor
Author
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_5996/ |
cee-chen
commented
Jun 24, 2022
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_5996/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Before:
Note: Scroll jump + how black focus outline remains after clicking on the container
After:
Checklist
- [ ] Checked in both light and dark modes- [ ] Checked in mobile- [ ] Props have proper autodocs and playground toggles- [ ] Added documentation- [ ] Checked Code Sandbox works for any docs examples- [ ] Checked for breaking changes and labeled appropriately- [ ] Updated the Figma library counterpart