-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Focus State for Tabbable Elements (#1963)
* Add focus state styling for tabbable fields via Plugin
- Loading branch information
Showing
20 changed files
with
196 additions
and
52 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
// Mixin for focus-visible styles with default values | ||
@mixin focus-visible-style($outline-offset: 2px, $border-radius: null) { | ||
outline: 2px solid $focus-outline; | ||
box-shadow: 0 0 0 2px #fff; | ||
outline-offset: $outline-offset; | ||
transition: none; | ||
|
||
// Only apply border-radius if a value is provided | ||
@if $border-radius != null { | ||
border-radius: $border-radius; | ||
} | ||
} | ||
|
||
// General styles for elements after focus | ||
.v-btn:after, | ||
.v-list-item:after, | ||
.v-selection-control--focus-visible .v-selection-control__input:before { | ||
content: none; | ||
} | ||
|
||
// Prevent color changes in buttons when focus visible | ||
.v-btn:focus-visible .v-btn__overlay { | ||
opacity: 0; | ||
} | ||
|
||
a { | ||
padding: 0 4px; | ||
|
||
&:focus-visible { | ||
@include focus-visible-style(2px, 4px) | ||
} | ||
} | ||
|
||
// Focus visible styles for radio buttons, buttons, and tabs | ||
.v-btn:focus-visible, | ||
.tab-focused .v-field { | ||
@include focus-visible-style(2px); | ||
z-index: 1; | ||
} | ||
|
||
.v-radio.v-selection-control--focus-visible { | ||
@include focus-visible-style(2px, 4px); | ||
} | ||
|
||
// Checkbox button focus visible styling | ||
.v-checkbox-btn.v-selection-control--focus-visible .v-selection-control__wrapper { | ||
@include focus-visible-style(-8px, 10px); | ||
} | ||
|
||
// Dropdown items focus visible styling | ||
.v-list-item:focus-visible { | ||
@include focus-visible-style(-2px, 4px); | ||
} | ||
|
||
// Help icons focus visible styling | ||
.v-icon:focus-visible { | ||
outline: 2px solid $focus-outline; | ||
box-shadow: 0px 0px 0px 2px #fff; | ||
border-radius: 50%; | ||
} | ||
|
||
.v-slide-group__container { | ||
contain: unset; | ||
overflow: unset; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
@import 'theme.scss'; | ||
@import 'accessibility.scss'; | ||
|
||
@font-face { | ||
font-family: 'BCSans'; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,6 +14,7 @@ | |
class="mt-n1" | ||
color="primary" | ||
v-bind="props" | ||
tabindex="0" | ||
> | ||
mdi-information-outline | ||
</v-icon> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -80,6 +80,7 @@ | |
color="primary" | ||
v-bind="props" | ||
class="mt-n1" | ||
tabindex="0" | ||
> | ||
mdi-information-outline | ||
</v-icon> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,6 +19,7 @@ | |
color="primary" | ||
v-bind="props" | ||
class="mr-1" | ||
tabindex="0" | ||
> | ||
mdi-information-outline | ||
</v-icon> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.