Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BITV] 9.4.1.2/2.6 - The "Weather" menu - The implementation as an application menu is not complete as only role="menu" was used and also not appropriate in this case. Implementing it as a normal list with interactive elements would be a better alternative. (1) #37099

Closed
AndyScherzinger opened this issue Mar 7, 2023 · 7 comments · Fixed by nextcloud-libraries/nextcloud-vue#4835
Assignees
Labels
1. to develop Accepted and waiting to be taken care of accessibility

Comments

@AndyScherzinger
Copy link
Member

AndyScherzinger commented Mar 7, 2023

Details

https://report.bitvtest.de/default-en/d63601ac-cb34-4645-8256-66bec78964a0.html#checkpoint-bfbf07e5c3-v2-n6

@AndyScherzinger AndyScherzinger added 1. to develop Accepted and waiting to be taken care of accessibility labels Mar 7, 2023
@ShGKme ShGKme self-assigned this Oct 4, 2023
@JuliaKirschenheuter
Copy link
Contributor

Dear @michaelnissenbaum,

I've looked through menu examples on the https://www.w3.org/WAI/tutorials/menus/ page and haven't seen any specific requirements for the action menu in our case, like:

Screenshot from 2023-10-30 14-14-33
Screenshot from 2023-10-30 14-11-36

Would it be enough to leave a menu in form of the only list with "interactive elements"? Would it be enough to remove role="menu" on the <ul> elements to resolve this issue?

Thanks a lot!

@michaelnissenbaum
Copy link

Hello @JuliaKirschenheuter, In my opinion, if you remove the two roles "menu" and "menuitem," everything should be fine. Attached is the link to an article that describes the differences and use cases for both variants - https://inclusive-components.design/menus-menu-buttons/.

@JuliaKirschenheuter JuliaKirschenheuter self-assigned this Nov 2, 2023
@JuliaKirschenheuter
Copy link
Contributor

We have different types of menu:

  1. Menu with action buttons, like:
    Screenshot from 2023-11-02 11-36-13

  2. Menu with mixed elements (action buttons, input fields) like:
    Screenshot from 2023-11-02 11-41-48

  3. Menu with links, like:
    Screenshot from 2023-11-02 11-45-13


Action menu and navigation menu functionalities shouldn't be mixed

https://marcus.io/blog/menu-or-not

If menu contains only links, then any role="menu" and role="menuitem" should not be used.

Don’t use ARIA, if the underlying HTML is sufficient for communicating what this thing is. In the case of a navigation menu, that’s a nested list of links.
https://terrillthompson.com/1226
https://inclusive-components.design/menus-menu-buttons/

Requirements regarding menu button: https://www.w3.org/WAI/ARIA/apg/patterns/menu-button/

Does it mean, that role="menuitem" and role="menu" are needed only on nested navigation menus?

https://www.w3.org/WAI/ARIA/apg/patterns/menubar/

We should not use role="menu" and role="menuitem" on action menu with buttons and action menu with mixed components.

Also that role="menu" is a beast of its own, should be used with caution even in an "action menu" context, and that it does not always pay off to try something "smart" but to go for the simple route
https://marcus.io/blog/menu-or-not

The issue with this pattern is that the document does not make it clear that this pattern should only be used when trying to replicate an application menu.
https://adrianroselli.com/2017/10/dont-use-aria-menu-roles-for-site-nav.html

Dear @michaelnissenbaum, just to be sure: have i understood correctly that we should remove role="menu" and role="menuitem" on every type of our menu (three examples above)? Thanks a lot!

@ShGKme
Copy link
Contributor

ShGKme commented Nov 2, 2023

We also have a classic menu like in text, which definitely should have role="menu":
image

@michaelnissenbaum
Copy link

Hi @JuliaKirschenheuter , the decision on which type of menu to use can be made based on the description of the "menu" role (ARIA 1.2) - "A menu is often a list of common actions or functions that the user can invoke. The menu role is appropriate when a list of menu items is presented in a manner similar to a menu on a desktop application.". If a menu is used for navigation purposes, then ARIA "menu" roles should not be used. The FlyOut Pattern is applied - https://www.w3.org/WAI/tutorials/menus/flyout/. My recommendation would be to use the "menu" role for Example 1 and not for 2 and 3.

@JuliaKirschenheuter
Copy link
Contributor

Conclusion about which "menu" have to have role="menu" and role="menuitem":

  1. Is not a menu and have to be re-done as usual NcSelect (follow-up ticket)
    image

  2. Is not a menu because several components are mixed (input, action button...)
    image

  3. Not a menu because contains only links
    image

  4. Menu because have only action buttons inside
    image

  5. If there is a typical navigation -> should not be a menu too


Menu is only in case if all elements have only buttons. It should looks like a "real desktop application menu"

@ShGKme
Copy link
Contributor

ShGKme commented Nov 9, 2023

Some comments from my side.

It should looks like a "real desktop application menu" is not very specific, we have no menus like that. The only close to "desktop-like" is text with the menubar.

Possible elements

In the actions we may have:

  1. Clickable items that can have semantics of menu items
    • Links:
      • Hyperlink NcActionLink
      • In-app JS link NcActionRouter
    • Button NcActionButton
    • Menu form elements:
      • Checkbox: NcActionCheckbox
      • Radio: NcActionRadio
      • In Process: pressed state button (alternative to checkbox)
    • Additionally, a "radio group item". Can be considered a menu item with a sub-menu: NcActionButtonGroup
  2. Data input items that should not be elements of menu:
    • Text, date, color, select: NcActionInput
    • Textarea: NcActionTextEditable
  3. Misc.:
    • Text NcActionText
    • Separator NcActionSeparator
    • Caption NcActionCaption

Criteria

Let's make such criteria to be a semantic menu.

NcActions is considered a menu if at the same time:

  • It has at least one Clickable item
  • It has no Data input
  • It has not only Links as Clickable items, otherwise it is a navigation

Otherwise, it is just a popover.

Examples

Menus

Menubar Buttons With checkbox and links Buttons with text and separators Button group
Text File actions Contact settings Text Mail
image image image image image
. user management Mail .
. image image . .

Navigation (no role)

image

Just popovers (no role)

Weather status Group edit
image image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop Accepted and waiting to be taken care of accessibility
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants