Skip to content

Commit 9fabf82

Browse files
committed
refactor(checkbox): targetting checkbox through instead of new class
1 parent 247f6d6 commit 9fabf82

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

core/src/components/checkbox/checkbox.scss

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -102,14 +102,6 @@
102102
@include margin(null, null, $checkbox-item-label-margin-bottom, null);
103103
}
104104

105-
/**
106-
* The native control it must be hidden with display:none instead of aria-hidden="true"
107-
* to avoid nested interactive elements accessibility issues
108-
*/
109-
.checkbox-native-control {
110-
display: none;
111-
}
112-
113105
/**
114106
* If no label text is placed into the slot
115107
* then the element should be hidden otherwise
@@ -119,8 +111,12 @@
119111
display: none;
120112
}
121113

114+
/**
115+
* The native control it must be hidden with display:none instead of aria-hidden="true"
116+
* to avoid nested interactive elements accessibility issues
117+
*/
122118
input {
123-
@include visually-hidden();
119+
display: none;
124120
}
125121

126122
.native-wrapper {

core/src/components/checkbox/checkbox.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,6 @@ export class Checkbox implements ComponentInterface {
298298
*/}
299299
<input
300300
type="checkbox"
301-
class="checkbox-native-control"
302301
checked={checked ? true : undefined}
303302
disabled={disabled}
304303
id={inputId}

0 commit comments

Comments
 (0)