Skip to content
This repository has been archived by the owner on Aug 9, 2024. It is now read-only.

Commit

Permalink
Bugfix to option menu (#145)
Browse files Browse the repository at this point in the history
* Bugfix to option menu

* Add button role
  • Loading branch information
philschanely authored Apr 6, 2020
1 parent 5b6be53 commit 486a171
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ $-live-option-menu-width: rem(224px);
.sage-live-option-menu-anchor {
position: relative;

&:focus {
outline: none;
}

// Fill the window to create active space to click off of to turn off menu
&[aria-expanded="true"]::before {
content: "";
Expand Down Expand Up @@ -48,7 +52,7 @@ $-live-option-menu-width: rem(224px);
.sage-live-option-menu {
position: absolute;
top: $-live-option-menu-offset-block;
z-index: sage-z-index(modal);
z-index: sage-z-index(default, -1);
transform: rotate3d(1, 0, 0, -90deg);
transform-origin: top center;
min-width: min-content;
Expand All @@ -57,14 +61,15 @@ $-live-option-menu-width: rem(224px);
background-color: sage-color(white);
box-shadow: sage-shadow(md);
transition: $sage-transition;
transition-property: transform;
transition-property: transform, z-index;

&:not(.sage-live-option-menu--anchored-left) {
right: $-live-option-menu-offset-inline;
}

[aria-expanded="true"] & {
transform: rotate3d(0, 0, 0, 0);
z-index: sage-z-index(modal);
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="sage-live-option-menu-anchor" aria-has-popup="true" aria-expanded="false">
<div class="sage-live-option-menu-anchor" aria-has-popup="true" aria-expanded="false" tabindex="0" role="button">
<ul class="sage-live-option-menu" role="menu" aria-label="Participant options">
<li role="none" class="sage-live-option-menu__item">
<button role="menuitem" class="sage-live-option-menu__command">
Expand Down

0 comments on commit 486a171

Please sign in to comment.