@@ -72,7 +72,7 @@ export const checkboxStyles: FoundationElementTemplate<
7272 cursor : pointer;
7373 }
7474
75- : host (. invalid ) .control {
75+ : host ([ aria- invalid= 'true' ] ) .control {
7676 border-color : ${ errorFillRest } ;
7777 }
7878
@@ -124,11 +124,11 @@ export const checkboxStyles: FoundationElementTemplate<
124124 border-color : ${ neutralStrokeActive } ;
125125 }
126126
127- : host (. invalid : not ([disabled ])) .control : hover {
127+ : host ([ aria- invalid= 'true' ] : not ([disabled ])) .control : hover {
128128 border-color : ${ errorFillHover } ;
129129 }
130130
131- : host (. invalid : not ([disabled ])) .control : active {
131+ : host ([ aria- invalid= 'true' ] : not ([disabled ])) .control : active {
132132 border-color : ${ errorFillActive } ;
133133 }
134134
@@ -137,7 +137,7 @@ export const checkboxStyles: FoundationElementTemplate<
137137 outline-offset : 2px ;
138138 }
139139
140- : host (. invalid : ${ focusVisible } ) .control {
140+ : host ([ aria- invalid= 'true' ] : ${ focusVisible } ) .control {
141141 outline-color : ${ errorFillFocus } ;
142142 }
143143
@@ -151,12 +151,13 @@ export const checkboxStyles: FoundationElementTemplate<
151151 border : calc (${ strokeWidth } * 1px ) solid ${ accentFillHover } ;
152152 }
153153
154- : host (. invalid [aria-checked = 'true' ]) .control {
154+ : host ([ aria- invalid= 'true' ] [aria-checked = 'true' ]) .control {
155155 background-color : ${ errorFillRest } ;
156156 border-color : ${ errorFillRest } ;
157157 }
158158
159- : host (.invalid [aria-checked = 'true' ]: not ([disabled ])) .control : hover {
159+ : host ([aria-invalid = 'true' ][aria-checked = 'true' ]: not ([disabled ]))
160+ .control : hover {
160161 background-color : ${ errorFillHover } ;
161162 border-color : ${ errorFillHover } ;
162163 }
@@ -178,7 +179,8 @@ export const checkboxStyles: FoundationElementTemplate<
178179 border : calc (${ strokeWidth } * 1px ) solid ${ accentFillActive } ;
179180 }
180181
181- : host (.invalid [aria-checked = 'true' ]: not ([disabled ])) .control : active {
182+ : host ([aria-invalid = 'true' ][aria-checked = 'true' ]: not ([disabled ]))
183+ .control : active {
182184 background-color : ${ errorFillActive } ;
183185 border-color : ${ errorFillActive } ;
184186 }
@@ -200,7 +202,7 @@ export const checkboxStyles: FoundationElementTemplate<
200202 outline-offset : 2px ;
201203 }
202204
203- : host (. invalid [aria-checked = "true" ]:${ focusVisible } :not ([disabled ])) .control {
205+ : host ([ aria- invalid= 'true' ] [aria-checked = "true" ]:${ focusVisible } :not ([disabled ])) .control {
204206 outline-color : ${ errorFillFocus } ;
205207 }
206208
@@ -226,7 +228,7 @@ export const checkboxStyles: FoundationElementTemplate<
226228 border-color : ${ SystemColors . FieldText } ;
227229 background : ${ SystemColors . Field } ;
228230 }
229- : host (. invalid ) .control {
231+ : host ([ aria- invalid= 'true' ] ) .control {
230232 border-style : dashed;
231233 }
232234 .checked-indicator {
0 commit comments