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

Navigation: Prioritize menu name and make it more prominent in the UI #59706

Open
afercia opened this issue Mar 8, 2024 · 3 comments
Open

Navigation: Prioritize menu name and make it more prominent in the UI #59706

afercia opened this issue Mar 8, 2024 · 3 comments
Labels
[Feature] Navigation Menus Any issue relating to Navigation Menus [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). Needs Design Needs design efforts. [Package] Block library /packages/block-library [Type] Bug An existing feature does not function as intended

Comments

@afercia
Copy link
Contributor

afercia commented Mar 8, 2024

Description

Splitting this out from #59440

On the front end, navigation menu must use a <nav> element. When there's more than one <nav> element (and this is likely the majority of the cases), each <nav> must be distinguished by the means of a meaningful aria-label attribute.
The label should not contain the word 'navigation' because screen readers alraedy announce a <nav> element as 'navigation'..

W3C tutorial and reference to success criteria:
https://www.w3.org/WAI/tutorials/page-structure/labels/

Instead, right now the editor ui:

  • Deprioritizes the menu name by hiding it in most cases or placeing it in a dropdown menu.
  • The UI doesn't explain to users that a menu name is extremly important because it is used on the front end for accessibility reasons adn as such it must be meaningful and unique.
  • The UI doesn't allo users to name a menu while creating it. Instead, it implements a mechanism to automatically name menus that is less than ideal. For example, automatically created menu names could be:
    • 'Header navigation 3', used on the front end as: aria-label="Header navigation 3"
    • 'Footer navigation' used on the front end as aria-label="Footer navigation".
  • Renaming a menu is well buried down in the UI especially in the navigation block inspector, where it is placed under Block > Navigation > Gear icon (Settings) > Advanced (collapsed by default) > Menu name.

Given the fundamental importance of giving a menu a meaningful name, the current design that deprioritizes the menu name misses a functional requirement and it's far from ideal.

Instead of making the naming automatic and deprioritizing the menu name in the UI, the design shoudl be reversed.

  • Naming a manu should be a first, prominent, step in the menu creation.
  • The UI should explain to users why providing a meaningful name is important.
  • The UI should explain to users why they have go avoid the word 'navigation' in the menu name.
  • The menu name should be required.
  • The menu name should be visually exposed in a prominent place wherever a menu editing UI is shown.
  • The UI to rename a menu name should be very discoverable and placed in a prominent place.

Cc @joedolson @alexstine

Step-by-step reproduction instructions

N/A

Screenshots, screen recording, code snippet

In the site editor navigation panel there is no way to creat a new menu. It's only meant to manage existing menus.
Manu names are clearly exposed and the 'rename' action is in the 'Actions' allipsis dropwodn menu:

Screenshot 2024-03-08 at 09 34 39

Instead, in the Navigation block inspector menu names are not visually exposed other than in the Actions dropdown menu. Newsly created menus are automatically named in a less than ideal way and the control to rename a menu is buried down in the UI:

Screenshot 2024-03-08 at 11 03 51

Environment info

No response

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@afercia afercia added [Type] Bug An existing feature does not function as intended [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). Needs Design Needs design efforts. [Package] Block library /packages/block-library [Feature] Navigation Menus Any issue relating to Navigation Menus labels Mar 8, 2024
@alexstine
Copy link
Contributor

Funny enough, I actually worked on adding the numbered output to the aria-label. Did I appreciate that? No. Was it the solution I had at the time? Yes. Do I like this issue better? Absolutely. Does anything change from here? I guess that's up to the Design Team.

@jasmussen
Copy link
Contributor

When you create a new page, you get this dialog:

screenshot of the site editor  add new page  modal dialog, with title, cancel, and create draft button to confirm

Would a similar modal, shown regardless of where you invoke "Create new menu" help address the issue?

@afercia
Copy link
Contributor Author

afercia commented Mar 20, 2024

I think, an intemediary, required, step to provide a the menu name in a dialog would work.
The UI should explain why a meaningful name is necessary though otherwise users may provide inappropriate / meaningless names.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Navigation Menus Any issue relating to Navigation Menus [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). Needs Design Needs design efforts. [Package] Block library /packages/block-library [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

3 participants