Separator adds a redundant role="separator" to its default <hr>
Maintainers usually reply within 1 day
@Janani-bn is already working on this.
Since Nov 2, 2026.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 74/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- html, react, typescript
- Domain
- accessibility, frontend
Research direction
Read the Separator implementation and the useSeparator logic it calls, focusing on how the default hr element type is passed through. Reproduce the issue with <Separator />, then verify that the rendered hr has no redundant role while explicitly chosen non-hr elements retain their intended behavior.
Written by the indexing model from the issue text.
Description
Provide a general summary of the issue here
<Separator /> renders <hr role="separator">.
Separator falls back to 'hr' (let Element = elementType || 'hr') but passes the original, undefined elementType to useSeparator, whose if (props.elementType !== 'hr') then adds the role. Passing elementType="hr" explicitly avoids it.
HTML validators flag the redundant role (html-validate no-redundant-role).
🤔 Expected Behavior?
an <hr> without role="separator".
😯 Current Behavior
<hr role="separator">, because Separator passes the original elementType (undefined) to useSeparator, not the 'hr' it renders.
💁 Possible Solution
pass elementType: Element to useSeparator.
🔦 Context
🖥️ Steps to Reproduce
<Separator />
Version
react-aria-components 1.21.1
What browsers are you seeing the problem on?
Chrome
If other, please specify.
No response
What operating system are you using?
OS X
🧢 Your Company/Team
No response
🕷 Tracking Issue
No response
- Dominant language
- TypeScript
- Stars
- 16k
- Forks
- 1.6k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 41
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from adobe/react-spectrum
-
Difficulty 2/5 Under an hour Newbie friendliness 88/100
adobe/react-spectrum#10909 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
adobe/react-spectrum#10900 · 2 comments ·
Maintainers usually reply within 1 day
-
ComboBox with selectionMode="multiple": Cmd/Ctrl+A does nothing while the popover is openPossibly taken @mangeshraut712 claimed this 6 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
adobe/react-spectrum#10866 ·
Maintainers usually reply within 1 day
-
CheckboxGroup: `validationBehavior="aria"` is ignored by its checkboxes since 1.18Possibly taken @mangeshraut712 claimed this 7 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
adobe/react-spectrum#10856 ·
Maintainers usually reply within 1 day
-
ComboBox fires change events on blur when isReadOnly, clearing a fully controlled value that is not in the collectionPossibly taken @mangeshraut712 claimed this 6 days ago. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
adobe/react-spectrum#10846 ·
Maintainers usually reply within 1 day
All issues in adobe/react-spectrum
Similar issues
-
needs-area
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Azure/typespec-azure#5936 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 Half a day Newbie friendliness 72/100
vercel-labs/scriptc#2910 ·
Maintainers usually reply within 1 day
-
automation missing-model model-sync provider:fireworks-ai
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
anomalyco/models.dev#12458 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day