[Accessibility][CommandBar]: Disabled Menu items should be focusable
Hi, We are using the CommandBar control in our view for buttons such as "Save", "Queue", etc. These are typically important buttons and will show up at the top of the page. The buttons support enable/disable behavior based on the error state of the page.
We found that a disabled button in the command bar doesn't gets focus while using the Arrow keys. It directly jumps to the next enabled item.
This behavior is violating the ARIA design pattern for Menu bar. Following is the quote from WAI-ARIA-Practices-1.1 page (http://www.w3.org/TR/wai-aria-practices-1.1/#menu)
- Disabled menu items are focusable but cannot be activated.

Requesting you fix this issue as appropriate.
Thanks, Satish
Thanks for pointing this out; it's confusing because every application, including browser behavior, defaults to making disabled buttons non-tabstops. All the applications I've used skip over disabled buttons. And if you disable a button in the browser and set tabindex=0, it will still skip over it. Simple example:
http://codepen.io/dzearing/pen/KaQvwg
This implies that:
- Most apps are implementing it wrong
- We have to fight the browser to do the right thing
- Even if we do it right, every other app will have done it wrong
I'm not opposed to fixing so don't read this wrong. But there is a much larger discussion to be had here. I've looped in the Edge accessibility contact we have so see what their take is.
@dzearing, i think having something like https://jqueryui.com/menu/ will help. We don't need tabindex=0 as menu bar defines navigation using arrow keys.
@mdahamiwal not sure i follow. You need focus to be set on the active item for screenreader default behavior but also just in general for a variety of other reasons. But for disabled buttons, we just can't combine the native disabled state with focusability.
We already fake disabled states for anchors (Fabric Button with href, for example) because browsers don't natively support disabled anchor tags. So it wouldn't be difficult to drop the disabled attribute on buttons wholesale and have a rule that says "all disabled buttons are focusable". The more ambiguous thing here is if we only allow them to be focusable in some situations but not in others.
I've started a discussion internally with Edge and the Office Web Apps accessibility folks to make sure we're all following the same rules.
@dzearing Any update on this one?
@dzearing any update on this?
This issue has been automatically marked as stale because it has not activity for 30 days. It will be closed if no further activity occurs within 14 days of this comment. Thank you for your contributions to Fabric React! Why am I receiving this notification?