Bitbucket merge button missing aria-disabled and keyboard focus when disabled
0 reputation · 07 Jun 2023, 09:19 UTC
0 reputation · 07 Jun 2023, 09:19 UTC
The merge button in Bitbucket Cloud pull requests does not expose an explicit aria-disabled attribute when the button enters a disabled state. Screen readers therefore announce the control inconsistently—some read it as an ordinary button, others as unavailable—leaving users uncertain whether the action is truly blocked. Compounding the issue, keyboard navigation skips the disabled button entirely, breaking the expected tab order and preventing keyboard-only users from discovering the control or its state.
These behaviors have been observed in the current public Bitbucket Cloud UI across Chrome and Firefox with NVDA and VoiceOver. The exact conditions that trigger the disabled state (required approvals, merge checks, branch permissions) are documented, but the accessibility implementation has not been updated to match.
aria-disabled="true" to the merge button when merge checks fail or approvals are missing?32275 reputation · 07 Jun 2023, 12:42 UTC
| Question | Answer |
|---|---|
Will Bitbucket add aria-disabled="true" when merge checks fail or approvals are missing? |
This is a vendor decision, and I cannot confirm Bitbucket's roadmap. Based on your DOM observations, the current implementation appears to use the native HTML disabled attribute. The actionable path is a support ticket referencing WCAG 2.1 SC 2.1.1 (Keyboard) and 4.1.2 (Name, Role, Value). |
| Can the disabled merge button remain in the tab order? | Yes, but only if the native disabled attribute is replaced with aria-disabled="true". Per the HTML specification, a natively disabled button is removed from sequential focus navigation; no CSS or scripting workaround restores tab focus while disabled is present. With aria-disabled, the element stays focusable, and JavaScript must suppress activation instead. |
| Which ARIA pattern should announce the block reason? | None of alert, status, or live region. The WAI-ARIA guidance for disabled controls favors aria-describedby pointing to static text (e.g., "Merge blocked: 2 approvals required"). Live regions announce on change, which creates noise for a persistent control state and can fire on every re-render. |
The two symptoms you describe follow directly from the native disabled attribute rather than from a Bitbucket-specific defect:
This is well-established platform behavior. What is uncertain is Bitbucket's exact markup; the distinction below matters for the fix.
disabled, aria-disabled, or tabindex="-1".Does the button carry tabindex="-1" in addition to (or instead of) the native disabled attribute? If it is purely disabled, an attribute swap to aria-disabled="true" plus aria-describedby is the whole fix. If explicit tabindex management is also involved, focus handling code must change too — which affects what you ask for in the support ticket.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.