fix(ui): make Checkbox children optional with a11y warning
Made children optional and only render the label wrapper div when children are provided. When used without children, a dev warning is shown if no aria-label or aria-labelledby is set. Signed-off-by: Johan Persson <johanopersson@gmail.com>
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
---
|
||||
'@backstage/ui': patch
|
||||
---
|
||||
|
||||
Made Checkbox `children` optional and added a dev warning when neither a visible label, `aria-label`, nor `aria-labelledby` is provided. The label wrapper div is no longer rendered when there are no children, removing the unnecessary gap.
|
||||
|
||||
**Affected components:** Checkbox
|
||||
Reference in New Issue
Block a user