-
Notifications
You must be signed in to change notification settings - Fork 108
Closed
Labels
Description
❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.
Current behavior
The only way to pass a label is via the label prop.
Desired behavior
- Label can be passed either via
labelprop orlabelslot - There is validation that throws a warning in case a label is not passed via one of them
- There is a documentation on how to use and not use the
labelslot
Value add
- Supports use-cases when displaying a label visually is not desired (e.g. token readonly input in Studio's channel collections table)
<KTextbox>
<template #label>
<span class="visuallyhidden">Label</span>
</template>
</KTextbox>
-
Will allow to get rid of implementations when visual requirements led to label being bypassed by
label=" ", such as here and other places, resulting in poor a11y due to missing labels. -
Allows for any future customization of labels, should the need arise
Possible tradeoffs
General tradeoffs related to allowing anything be passed. Documentation will have guidance though.
