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

WIP: working on keyboard nav extensions #13118

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
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
5 changes: 5 additions & 0 deletions shell/assets/styles/base/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -160,3 +160,8 @@
// Focus for form like elements (not to be confused with basic :focus style)
outline: 2px solid var(--primary-keyboard-focus);
}

@mixin focus-outline-primary {
// Focus for form like elements (not to be confused with basic :focus style)
outline: 2px solid var(--body-bg);
}
11 changes: 11 additions & 0 deletions shell/assets/styles/global/_button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ button,
background-color: var(--primary-hover-bg);
color: var(--primary-text);
}

&:focus-visible {
@include focus-outline-primary;
outline-offset: -2px;
}
}

.role-secondary {
Expand Down Expand Up @@ -138,6 +143,12 @@ button,
border: solid thin var(--primary);
color: var(--primary);
border-radius: 2px;


&:focus-visible {
@include focus-outline-primary;
outline-offset: -2px;
}
}

.icon-group i {
Expand Down
9 changes: 9 additions & 0 deletions shell/components/Tabbed/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,10 @@ export default {
:aria-controls="'#' + tab.name"
:aria-selected="tab.active"
role="tab"
tabindex="0"
@click.prevent="select(tab.name, $event)"
@keyup.enter="select(tab.name, $event)"
@keyup.space="select(tab.name, $event)"
>
<span>{{ tab.labelDisplay }}</span>
<span
Expand Down Expand Up @@ -403,6 +406,12 @@ export default {
text-decoration: underline;
}
}

&:focus-visible {
@include focus-outline;
outline-offset: -4px;
text-decoration: none;
}
}

.conditions-alert-icon {
Expand Down
8 changes: 8 additions & 0 deletions shell/pages/c/_cluster/uiplugins/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -805,7 +805,10 @@ export default {
:key="i"
class="plugin"
:data-testid="`extension-card-${plugin.name}`"
tabindex="0"
@click="showPluginDetail(plugin)"
@keyup.enter="showPluginDetail(plugin)"
@keyup.space="showPluginDetail(plugin)"
>
<!-- plugin icon -->
<div
Expand Down Expand Up @@ -1090,6 +1093,11 @@ export default {
margin-bottom: 20px;
cursor: pointer;

&:focus-visible {
@include focus-outline;
outline-offset: -2px;
}

.plugin-icon {
font-size: 40px;
margin-right:10px;
Expand Down
Loading