Skip to content

Dropdown ariaLabel not handled correctly #7041

@ConorWuertz

Description

@ConorWuertz

Environment Information

  • Package version(s): 6.47.0
    Also visible in the current source code in master

Actual behavior:

When we provide both a label and an ariaLabel prop to the Dropdown component, the rendered "listbox" role element includes the aria-label attribute and also contains an aria-labelledby attribute that refers to the label element.

Expected behavior:

The expected behavior in my opinion would be for there to be no aria-labelledby attribute in addition to the aria-label attribute if we include the ariaLabel prop. The problem here is that screen readers will ignore the aria-label if we have an aria-labelledby attribute as well. The current behavior makes it impossible to include a visual label and an ariaLabel and have the ariaLabel take precedence for screen readers.

Priorities and help requested:

Are you willing to submit a PR to fix? Yes

Requested priority: Normal

Products/sites affected: Microsoft Teams (Shifts app)

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions