Skip to content

Commit

Permalink
fix(Divider): Hide from screen readers
Browse files Browse the repository at this point in the history
  • Loading branch information
eirikbacker committed Aug 12, 2024
1 parent 23192dd commit fac5cdd
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions packages/react/src/components/Divider/Divider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,15 @@ export type DividerProps = {
} & React.HTMLAttributes<HTMLHRElement>;

export const Divider = forwardRef<HTMLHRElement, DividerProps>(
({ color = 'default', className, ...rest }, ref) => {
return (
<hr
className={cl('ds-divider', `ds-divider--${color}`, className)}
ref={ref}
{...rest}
/>
);
},
({ color = 'default', className, ...rest }, ref) => (
// biome-ignore lint/a11y/noAriaHiddenOnFocusable: <hr> is not foucsable but biome thinks it is
<hr
aria-hidden='true'
className={cl('ds-divider', `ds-divider--${color}`, className)}
ref={ref}
{...rest}
/>
),
);

Divider.displayName = 'Divider';

Divider.displayName = 'Divider';

0 comments on commit fac5cdd

Please sign in to comment.