fluentui icon indicating copy to clipboard operation
fluentui copied to clipboard

CommandBar: InConsistent CommandBar items role.

Open bhaveshbhati opened this issue 9 years ago • 9 comments

Bug Report

  • Package version(s): (2.23.3)
  • Browser and OS versions: (fill this out if relevant)

Priorities and help requested (not applicable if asking question):

Are you willing to submit a PR to fix? (Yes, No)

Requested priority: (Blocking, High, Normal, Low)

Products/sites affected: (if applicable)

Describe the issue:

See this command bar:

image

Now, Upload and New button has role set to menuitem image

But Child items of New like Email message and Calendar event

image

doesn't have the role as menuitem

Is it expected that only parent items button will have role as menuitem ?

Actual behavior:

Not all buttons have role as menuitem set

Expected behavior:

All buttons should have consistent role ?

If applicable, please provide a codepen repro:

http://codepen.io/anon/pen/ZKGRBQ

bhaveshbhati avatar May 04 '17 10:05 bhaveshbhati

Commands with menus should be sub menus. Just simple commands would be menu items.

Alternately, @cschlechty suggested they all are buttons, and ones with menus use "haspopup", but menu item and sub menu work for me.

betrue-final-final avatar May 04 '17 14:05 betrue-final-final

@mdahamiwal @micahgodbolt In current master, the sub menu is also has a role of "menuitem". What is the guidance here. Should submenu items should have role "menuitem" or "submenu" . We marked them as "menuitem" in this PR: https://github.com/OfficeDev/office-ui-fabric-react/pull/1868

aadhars avatar Jun 13 '17 05:06 aadhars

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions to Fabric React!

stale[bot] avatar Apr 11 '18 01:04 stale[bot]

submenu isn't a valid ARIA role, it should be a menu with menuitems. The button should be a menuitem

cschlechty avatar Apr 11 '18 21:04 cschlechty

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?

stale[bot] avatar Jun 10 '18 21:06 stale[bot]

I'm guessing that this concern is still valid for the new 6.0 commandbar. But if you haven't tried it yet, please give it a shot. 100% rewrite.

micahgodbolt avatar Aug 06 '18 20:08 micahgodbolt

I think the OP might have missed the fact that the in the 2nd example the <li>'s all have menuitem roles already (just not directly in the button). Is this really a bug? Or that the bug is that we need it inside the button instead of li?

kenotron avatar Aug 27 '18 21:08 kenotron

@kenotron the OP was talking about the 5.x command bar, so I wanted to make sure our current command bar was actually to spec.

micahgodbolt avatar Aug 27 '18 23:08 micahgodbolt

Okay, so I looked at the implementation on https://developer.microsoft.com/en-us/fabric#/components/commandbar

It looks like the BUTTON now has the menuitem role. So, I would think that this can be closed for 6.x branch.

kenotron avatar Aug 27 '18 23:08 kenotron