Skip to content

Commit 0762df9

Browse files
fixed checkbox focus issue in high constrast mode (#5265)
* fixed checkbox focus issue in high constrast mode * added the fallback token * added release notes * added token * The Patch number updated to v2.22.1 --------- Co-authored-by: Manjunath Kalburgi <[email protected]>
1 parent 1a2c2c3 commit 0762df9

File tree

3 files changed

+21
-0
lines changed

3 files changed

+21
-0
lines changed

RELEASENOTES.general.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
## 2.22.0 - August 16, 2023
55

6+
- Fixed the checkbox to high contrast when the focus is placed on it.
67
- Updated icons to `v10.7.0`
78
- Standard Set:
89
- Added `attribute_based_pricing`

ui/components/checkbox/RELEASENOTES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
# Checkbox Release Notes
44

55
<!-- ## [Unreleased] -->
6+
## 2.22.1
7+
8+
### Fixed
9+
- Fixed the checkbox to high contrast when the focus is placed on it.
610

711
## 2.18.0
812

ui/components/checkbox/base/_index.scss

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@
106106
+ .slds-checkbox__label .slds-checkbox--faux {
107107
// @todo consider shared hooks for inputs
108108

109+
outline: 1px solid var(--slds-g-color-brand-base-80, #{$palette-blue-80});
110+
outline-offset: 0px;
109111
/*! @css-var-fallback border-color */
110112
--slds-c-checkbox-color-border: var(--slds-c-checkbox-color-border-focus, var(--sds-c-checkbox-color-border-focus, var(--slds-g-color-brand-base-60, #{$color-border-input-active})));
111113

@@ -125,6 +127,20 @@
125127
}
126128
}
127129

130+
&:focus-visible {
131+
132+
+ .slds-checkbox_faux,
133+
+ .slds-checkbox--faux,
134+
~ .slds-checkbox_faux,
135+
~ .slds-checkbox--faux,
136+
+ .slds-checkbox__label .slds-checkbox_faux,
137+
+ .slds-checkbox__label .slds-checkbox--faux {
138+
// @todo consider shared hooks for inputs
139+
outline: 1px solid var(--slds-g-color-brand-base-80, #{$palette-blue-80});
140+
outline-offset: 0px;
141+
}
142+
}
143+
128144
&:indeterminate + .slds-checkbox_faux,
129145
&:indeterminate + .slds-checkbox--faux,
130146
&:indeterminate ~ .slds-checkbox_faux,

0 commit comments

Comments
 (0)