KCheckbox: render the default slot content in <label> #347
Labels
bug
category: library
Shared code library
DEV: frontend
P0 - critical
Priority: Release blocker or regression
TAG: a11y
type: issue
Something isn't working
Actual behavior
Content that is passed through the default slot of
KCheckbox
kolibri-design-system/lib/KCheckbox.vue
Lines 46 to 54 in 37dcf4f
is pretending to behave like a label thanks to our custom styles
kolibri-design-system/lib/KCheckbox.vue
Line 238 in 37dcf4f
However, in this case, no
<label>
element is rendered. This is insufficient for assistive technologies.(In some situations, this can be resolved by using
KCheckbox
'eslabel
property rather than the default slot, however that's not possible in more complex use-cases when we need to pass down another component via slot rather than plain text)Expected behavior
KCheckbox
renders the default slot's content in the<label for=...>
User-facing consequences
Proper labels are one of the most important things for checkboxes in regards to a11y.
The text was updated successfully, but these errors were encountered: