-
Notifications
You must be signed in to change notification settings - Fork 2.2k
[a11y]: OverflowMenuItem does not set aria-disabled attribute when disabled prop is used #22470
Copy link
Copy link
Open
Open
Copy link
Labels
a11y: JAWSScreen reader issues, specifically JAWSScreen reader issues, specifically JAWSa11y: NVDAScreen reader issues, specifically NVDAScreen reader issues, specifically NVDAa11y: VoiceOverScreen reader issues, specifically VoiceoverScreen reader issues, specifically Voiceoveradopter: strategic-productWork-stream that directly effects the Product-led Growth initiative.Work-stream that directly effects the Product-led Growth initiative.browser: chromebrowser: firefoxpackage: @carbon/react@carbon/react@carbon/reactplatform: macosseverity: 2https://ibm.biz/carbon-severityhttps://ibm.biz/carbon-severitystatus: needs triage 🕵️♀️type: a11y ♿type: bug 🐛
Metadata
Metadata
Assignees
Labels
a11y: JAWSScreen reader issues, specifically JAWSScreen reader issues, specifically JAWSa11y: NVDAScreen reader issues, specifically NVDAScreen reader issues, specifically NVDAa11y: VoiceOverScreen reader issues, specifically VoiceoverScreen reader issues, specifically Voiceoveradopter: strategic-productWork-stream that directly effects the Product-led Growth initiative.Work-stream that directly effects the Product-led Growth initiative.browser: chromebrowser: firefoxpackage: @carbon/react@carbon/react@carbon/reactplatform: macosseverity: 2https://ibm.biz/carbon-severityhttps://ibm.biz/carbon-severitystatus: needs triage 🕵️♀️type: a11y ♿type: bug 🐛
Type
Fields
Give feedbackSeverity
High
Projects
StatusShow more project fields
No status
Package
@carbon/react
Browser
Firefox
Operating System
MacOS
Package version
v1.81.0 (also affects earlier versions)
React version
v18.x
Automated testing tool and ruleset
IBM Equal Access Accessibility Checker - Latest Deployment
Assistive technology
JAWS, MacOS VoiceOver
Description
The OverflowMenuItem component does not properly announce its disabled state to screen readers. When the disabled prop is set to true, the component only sets the HTML disabled attribute on the button element but does not set the aria-disabled attribute. This violates WCAG 2.1 Success Criterion 4.1.2 Name, Role, Value (Level A).
Current behavior:
When disabled={true} is set, only the HTML disabled attribute is applied
Screen readers (JAWS, NVDA, VoiceOver) do not consistently announce the disabled state
The button becomes non-focusable, making it difficult for keyboard users to discover
Expected behavior:
The component should set aria-disabled="true" when disabled={true}
Screen readers should announce "disabled" or "unavailable" when the item is focused
The item should remain in the accessibility tree for discovery
WCAG 2.1 Violation
Success Criterion: 4.1.2 Name, Role, Value (Level A)
Reproduction/example
Screen reader users cannot determine that certain menu items are disabled, leading to confusion about why actions cannot be performed.
Steps to reproduce
Create an OverflowMenu with an OverflowMenuItem that has disabled={true}
Enable a screen reader (JAWS with Firefox, or NVDA with Chrome)
Navigate to the overflow menu and open it
Tab to or hover over the disabled menu item
Observe that the screen reader does not announce the disabled state
Suggested Severity
Severity 2 = User cannot complete task, and/or no workaround within the user experience of a given component.
Code of Conduct