-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Fix accessibility issues with saved object finder #13152
Changes from 2 commits
bbc77cb
d0d3972
6ac6015
ae0325b
98147ae
5295896
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,10 @@ | ||
$tabBackgroundColor: #FFF; | ||
$tabHoverBackgroundColor: #F2F2F2; | ||
|
||
// Dark theme colors | ||
$tabColor--darkTheme: #cecece; | ||
$tabBackgroundColor--darkTheme: #333333; | ||
$tabHoverBackgroundColor--darkTheme: #777777; | ||
$tabBorderColor--darkTheme: #777777; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is fantastic! I'd just suggest looking for global color variables (in https://github.com/elastic/kibana/blob/master/ui_framework/components/_variables.scss#L47), to which you can assign these variables. For example: $tabColor--darkTheme: $globalTextColor--darkTheme;
$tabBackgroundColor--darkTheme: $globalBackgroundColor--darkTheme;
// etc... This way all of the components will derive the same color palette from a shared source of truth. If there are any colors which don't exist in the |
||
|
||
@import "tabs"; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
.kuiTabs { | ||
display: flex; | ||
border-bottom: $globalBorderThin; | ||
|
||
@include darkTheme { | ||
border-bottom: 1px solid $tabBorderColor--darkTheme; | ||
} | ||
} | ||
|
||
|
||
|
@@ -23,6 +27,11 @@ | |
border-radius: 0; /* 1 */ | ||
margin-bottom: -1px; /* 3 */ | ||
|
||
@include darkTheme { | ||
background-color: $tabBackgroundColor--darkTheme; | ||
border-color: $tabBorderColor--darkTheme; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we'll also need to add a color: $globalLinkColor--darkTheme; Similar changes will need to be made to the hover and focus states. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
} | ||
|
||
& + & { | ||
border-left: none; | ||
|
||
|
@@ -44,16 +53,32 @@ | |
z-index: 1; | ||
color: $globalLinkColor; | ||
border: 1px solid $globalSelectedBorderColor !important; | ||
|
||
@include darkTheme { | ||
color: $tabColor--darkTheme; | ||
background-color: $tabBackgroundColor--darkTheme; | ||
border-color: $tabBorderColor--darkTheme !important; | ||
} | ||
} | ||
|
||
&:hover:not(.kuiTab-isSelected) { | ||
color: $globalLinkHoverColor; | ||
background-color: $tabHoverBackgroundColor; | ||
|
||
@include darkTheme { | ||
background-color: $tabHoverBackgroundColor--darkTheme; | ||
} | ||
} | ||
|
||
&.kuiTab-isSelected { | ||
cursor: default; | ||
color: $globalFontColor; | ||
border-bottom-color: $tabBackgroundColor; | ||
|
||
@include darkTheme { | ||
color: $tabColor--darkTheme; | ||
background-color: $tabBackgroundColor--darkTheme; | ||
border-bottom-color: $tabBackgroundColor--darkTheme; | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These can be
<button>
elements, and then we won't needkbn-accessible-click
any more. That directive is meant to be used as a last resort, if you can't use a<button>
or<a>
with anhref
.