Repository navigation
fix: keyboard navigation when using position fixed - #5792
Merged
Merged
Conversation
|
Kudos, SonarCloud Quality Gate passed!
|
sissbruecker
commented
Apr 27, 2023
|
|
||
| it('should return false when using fixed positioning', () => { | ||
| element.style.position = 'fixed'; | ||
| expect(isElementHidden(element)).to.be.false; |
Member
Author
There was a problem hiding this comment.
Also wanted to check the child's visibility here, but in case of these nested divs, the child's offset parent is actually the parent div. In case of tabs being used within the app layouts drawer there must be some additional detail that causes the offset parent to become null.
vursen
approved these changes
Apr 27, 2023
vaadin-bot
pushed a commit
that referenced
this pull request
Apr 27, 2023
vaadin-bot
pushed a commit
that referenced
this pull request
Apr 27, 2023
sissbruecker
added a commit
that referenced
this pull request
Apr 27, 2023
sissbruecker
added a commit
that referenced
this pull request
Apr 27, 2023
7 of 8 tasks
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.








Description
Keyboard navigation for tab bar is currently broken when the element is within the app layout's drawer. The cause is the following check which incorrectly identifies all tabs as hidden:
web-components/packages/a11y-base/src/focus-utils.js
Lines 148 to 153 in 7a9fbf1
The problem is that
offsetParentis also null if the element is using fixed positioning. It can also be null for nested elements in a container with fixed positioning, such as for the tabs being in the app layouts drawer.This change adds an additional check to verify that items have no client size which would be another indicator that
display: noneis being used in the hierarchy.Fixes #5706
Type of change