fix(ui): improve screen reader output for Checkbox and Table selection
Added aria-hidden to the Checkbox indicator div to prevent screen readers from announcing decorative icons. Added aria-label to the Table header selection column wrapper. Signed-off-by: Johan Persson <johanopersson@gmail.com>
This commit is contained in:
@@ -49,7 +49,7 @@ export const Checkbox = forwardRef<HTMLLabelElement, CheckboxProps>(
|
||||
>
|
||||
{({ isIndeterminate }) => (
|
||||
<>
|
||||
<div className={classes.indicator}>
|
||||
<div className={classes.indicator} aria-hidden="true">
|
||||
{isIndeterminate ? (
|
||||
<RiSubtractLine size={12} />
|
||||
) : (
|
||||
|
||||
@@ -42,7 +42,7 @@ export const TableHeader = <T extends object>(props: TableHeaderProps<T>) => {
|
||||
maxWidth={40}
|
||||
className={classes.headSelection}
|
||||
>
|
||||
<Flex justify="center" align="center">
|
||||
<Flex justify="center" align="center" aria-label="Row selection">
|
||||
<Checkbox slot="selection" aria-label="Select all" />
|
||||
</Flex>
|
||||
</Column>
|
||||
|
||||
Reference in New Issue
Block a user