Feature: <Dropdown.Menu/> custom `aria-labelledby` property

Open
#6,249 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
react, typescript

Research direction

Start with the <Dropdown.Menu/> component and trace how the @restart/ui useDropdownMenu() hook applies aria-labelledby. Determine whether an opt-out flag or reapplication in Dropdown.Menu fits the existing behavior; done means a custom aria-labelledby value is preserved without breaking the generated toggler relationship.

Written by the indexing model from the issue text.

Description

enhancement
Is your feature request related to a problem? Please describe

Currently, <Dropdown.Menu/> component doesn't accept a custom aria-labelledby property.

The properties generated by @restart/ui useDropdownMenu() hook overwrite any custom-passsed aria-labelledby property with a toggler element id which is not correct:
https://github.com/react-restart/ui/issues/50

Describe the solution you'd like

The solution would be @restart/ui adding an opt-out flag or something.
Or maybe <Dropdown.Menu/> component re-applying a custom aria-labelledby property over the one generated by @restart/ui useDropdownMenu() hook.

Describe alternatives you've considered

No response

Additional context

No response

Dominant language
TypeScript
Stars
22.6k
Forks
3.6k
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from react-bootstrap/react-bootstrap

All issues in react-bootstrap/react-bootstrap

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.