Skip to content

Commit

Permalink
minor fixes based on another PR comment
Browse files Browse the repository at this point in the history
  • Loading branch information
aalves08 committed Jan 6, 2025
1 parent 8aab29a commit 4a514ba
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pkg/rancher-components/src/components/Banner/Banner.vue
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export default defineComponent({
class="banner__content__closer"
tabindex="0"
role="button"
aria-label="close"
:aria-label="t('generic.close')"
@click="$emit('close')"
@keyup.enter="$emit('close')"
@keyup.space="$emit('close')"
Expand Down
2 changes: 1 addition & 1 deletion shell/assets/styles/base/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -159,4 +159,4 @@
@mixin focus-outline {
// Focus for form like elements (not to be confused with basic :focus style)
outline: 2px solid var(--primary-keyboard-focus);
}
}
4 changes: 2 additions & 2 deletions shell/assets/styles/global/_button.scss
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ button,
}

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

Expand Down
2 changes: 1 addition & 1 deletion shell/components/BannerGraphic.vue
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export default {
class="close-button"
data-testid="graphic-banner-close"
tabindex="0"
aria-label="close"
:aria-label="t('generic.close')"
@click="hide()"
@keyup.enter="hide()"
@keyup.space="hide()"
Expand Down
4 changes: 4 additions & 0 deletions shell/components/CommunityLinks.vue
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ export default {
v-if="link.value.startsWith('/') "
:to="link.value"
role="link"
:aria-label="link.label"
@keyup.space="$router.push(link.value)"
>
{{ link.label }}
Expand All @@ -121,6 +122,7 @@ export default {
rel="noopener noreferrer nofollow"
target="_blank"
role="link"
:aria-label="link.label"
> {{ link.label }} </a>
</div>
<slot />
Expand All @@ -131,6 +133,7 @@ export default {
<a
class="link"
tabindex="0"
:aria-label="t('footer.wechat.title')"
@click="show"
@keyup.enter="show"
@keyup.space="show"
Expand All @@ -154,6 +157,7 @@ export default {
<button
class="btn role-primary"
tabindex="0"
:aria-label="t('generic.close')"
@click="close"
@keyup.enter="close"
@keyup.space="close"
Expand Down
6 changes: 6 additions & 0 deletions shell/pages/home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,7 @@ export default defineComponent({
role="link"
target="_blank"
rel="noopener noreferrer nofollow"
:aria-label="t('landing.whatsNewLink')"
@click.stop="showWhatsNew"
@keyup.stop.enter="showWhatsNew"
@keyup.stop.space="showWhatsNew"
Expand All @@ -535,6 +536,7 @@ export default defineComponent({
<a
class="hand mr-20"
tabindex="0"
:aria-label="t('landing.landingPrefs.userPrefs')"
@click.prevent.stop="showUserPrefs"
@keyup.prevent.stop.enter="showUserPrefs"
@keyup.prevent.stop.space="showUserPrefs"
Expand Down Expand Up @@ -589,6 +591,7 @@ export default defineComponent({
class="btn btn-sm role-secondary"
data-testid="cluster-management-manage-button"
role="link"
:aria-label="t('cluster.manageAction')"
@keyup.space="$router.push(manageLocation)"
>
{{ t('cluster.manageAction') }}
Expand All @@ -599,6 +602,7 @@ export default defineComponent({
class="btn btn-sm role-primary"
data-testid="cluster-create-import-button"
role="link"
:aria-label="t('cluster.importAction')"
@keyup.space="$router.push(importLocation)"
>
{{ t('cluster.importAction') }}
Expand All @@ -609,6 +613,7 @@ export default defineComponent({
class="btn btn-sm role-primary"
data-testid="cluster-create-button"
role="link"
:aria-label="t('generic.create')"
@keyup.space="$router.push(createLocation)"
>
{{ t('generic.create') }}
Expand All @@ -626,6 +631,7 @@ export default defineComponent({
v-if="row.mgmt.isReady && !row.hasError"
:to="{ name: 'c-cluster-explorer', params: { cluster: row.mgmt.id }}"
role="link"
:aria-label="row.nameDisplay"
@keyup.space="$router.push({ name: 'c-cluster-explorer', params: { cluster: row.mgmt.id }})"
>
{{ row.nameDisplay }}
Expand Down

0 comments on commit 4a514ba

Please sign in to comment.