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

Site Editor: prevent navigation panel focus when hidden #29600

Merged
merged 2 commits into from
Mar 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,25 @@
}
}

.edit-site-navigation-panel.is-open {
width: $nav-sidebar-width;
}

.edit-site-navigation-panel__inner {
position: relative;
width: $nav-sidebar-width;
height: 100%;
overflow: hidden;
// Inner container is hidden to remove menu from the accessibility tree when not visible.
// Setting visibility here (rather than on the parent container) preserves the slide transition.
visibility: hidden;
// Transition settings should match parent container.
transition: visibility 100ms linear;
@include reduce-motion("transition");
}

.edit-site-navigation-panel.is-open {
width: $nav-sidebar-width;

.edit-site-navigation-panel__inner {
visibility: visible;
}
}

.edit-site-navigation-panel__site-title-container {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
display: none;
position: absolute;
z-index: z-index(".edit-site-navigation-toggle");
height: $header-height + $border-width; // Cover header border
height: $header-height;
width: $header-height;

@include break-medium() {
Expand All @@ -14,27 +14,18 @@

body.is-navigation-sidebar-open & {
display: flex;

.edit-site-navigation-toggle__button {
Copy link
Member

@vindl vindl Mar 11, 2021

Choose a reason for hiding this comment

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

This was added recently in #29093 to address the following issue #29094. Do you all think we should still keep it? cc @jeyip

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think something else changed since then that makes this override unnecessary. Here's what I see (using this branch)... looks like border is visible underneath the icon (at least to my eyes)

Firefox Safari Chrome
Firefox Safari Chrome

border-bottom: 1px solid transparent;
border-radius: 0;
}
}
}

.edit-site-navigation-toggle__button {
align-items: center;
background: $gray-900;
border-radius: 0;
color: $white;
height: $header-height + $border-width; // Cover header border
height: $header-height;
width: $header-height;
z-index: 1;

// Adds a bottom border to match the header toolbar
border-bottom: 1px solid $gray-200;
// Prevents the bottom border from being clipped by border-bottom radius
border-radius: 2px 2px 0 0;

&.has-icon {
min-width: $header-height;

Expand Down