Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: correct role for a11y #195

Merged
merged 2 commits into from
Jan 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/Rate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,6 @@ function Rate(props: RateProps, ref: React.Ref<RateRef>) {
onBlur={disabled ? null : onInternalBlur}
onKeyDown={disabled ? null : onInternalKeyDown}
ref={rateRef}
role="radiogroup"
{...pickAttrs(restProps, { aria: true, data: true, attr: true })}
>
{starNodes}
Expand Down
7 changes: 0 additions & 7 deletions tests/__snapshots__/simple.spec.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
exports[`rate allowHalf render works 1`] = `
<ul
class="rc-rate custom"
role="radiogroup"
tabindex="0"
>
<li
Expand Down Expand Up @@ -78,7 +77,6 @@ exports[`rate allowHalf render works 1`] = `
exports[`rate allowHalf render works in RTL 1`] = `
<ul
class="rc-rate custom rc-rate-rtl"
role="radiogroup"
tabindex="0"
>
<li
Expand Down Expand Up @@ -153,7 +151,6 @@ exports[`rate allowHalf render works in RTL 1`] = `
exports[`rate allowHalf render works more than half 1`] = `
<ul
class="rc-rate custom"
role="radiogroup"
tabindex="0"
>
<li
Expand Down Expand Up @@ -228,7 +225,6 @@ exports[`rate allowHalf render works more than half 1`] = `
exports[`rate full render works 1`] = `
<ul
class="rc-rate custom"
role="radiogroup"
tabindex="0"
>
<li
Expand Down Expand Up @@ -303,7 +299,6 @@ exports[`rate full render works 1`] = `
exports[`rate full render works in RTL 1`] = `
<ul
class="rc-rate custom rc-rate-rtl"
role="radiogroup"
tabindex="0"
>
<li
Expand Down Expand Up @@ -378,7 +373,6 @@ exports[`rate full render works in RTL 1`] = `
exports[`rate full render works with character function 1`] = `
<ul
class="rc-rate"
role="radiogroup"
tabindex="0"
>
<li
Expand Down Expand Up @@ -453,7 +447,6 @@ exports[`rate full render works with character function 1`] = `
exports[`rate full render works with character node 1`] = `
<ul
class="rc-rate"
role="radiogroup"
tabindex="0"
>
<li
Expand Down
Loading