Skip to content

Commit

Permalink
feat: improve a11y (#242)
Browse files Browse the repository at this point in the history
  • Loading branch information
vagusX authored Aug 5, 2024
1 parent c659fe4 commit 3e7366a
Show file tree
Hide file tree
Showing 2 changed files with 94 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ const InternalSegmentedOption: React.FC<{
className={classNames(className, {
[`${prefixCls}-item-disabled`]: disabled,
})}
role="option"
aria-selected={checked}
>
<input
className={`${prefixCls}-item-input`}
Expand Down Expand Up @@ -173,6 +175,8 @@ const Segmented = React.forwardRef<HTMLDivElement, SegmentedProps>(

return (
<div
role="listbox"
aria-label="segmented control"
{...divProps}
className={classNames(
prefixCls,
Expand Down
Loading

0 comments on commit 3e7366a

Please sign in to comment.