Skip to content

Commit c522d13

Browse files
authored
feat: improved accessibility (#300)
* feat: improved accessibility (#299) * feat: add role attribute to InternalSegmentedOption for improved accessibility * fix: update role and aria attributes * test: update snapshot * chore: add @rc-component/np dependency and remove np package * chore: add np package for release management
1 parent 8afca79 commit c522d13

File tree

3 files changed

+83
-42
lines changed

3 files changed

+83
-42
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,4 +91,4 @@
9191
"tnpm": {
9292
"mode": "npm"
9393
}
94-
}
94+
}

src/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,8 @@ const InternalSegmentedOption: React.FC<{
134134
<div
135135
className={`${prefixCls}-item-label`}
136136
title={title}
137-
aria-selected={checked}
137+
role="radio"
138+
aria-checked={checked}
138139
>
139140
{label}
140141
</div>

0 commit comments

Comments
 (0)