Skip to content

Commit

Permalink
fix: move aria-label to handle container button element, closes #130
Browse files Browse the repository at this point in the history
  • Loading branch information
nerdyman committed Feb 8, 2024
1 parent 0353d78 commit 54a715c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
1 change: 1 addition & 0 deletions lib/src/Container.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ export const ContainerHandle = forwardRef<
return (
<button
ref={ref}
aria-label="Drag to move or focus and use arrow keys"
aria-orientation={portrait ? 'vertical' : 'horizontal'}
aria-valuemin={0}
aria-valuemax={100}
Expand Down
7 changes: 1 addition & 6 deletions lib/src/ReactCompareSliderHandle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,7 @@ export const ReactCompareSliderHandle: FC<
};

return (
<div
{...props}
aria-label={props['aria-label'] || 'Drag to move'}
className={className}
style={_style}
>
<div {...props} className={className} style={_style}>
<div className="__rcs-handle-line" style={_linesStyle} />
<div className="__rcs-handle-button" style={_buttonStyle}>
<ThisArrow />
Expand Down

0 comments on commit 54a715c

Please sign in to comment.