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

Move Navigation menu title and state info out from Actions button label. #59440

Open
wants to merge 4 commits into
base: trunk
Choose a base branch
from

Conversation

afercia
Copy link
Contributor

@afercia afercia commented Feb 28, 2024

Fixes #59431

What?

The label of the Navigation menu 'actions' button in the settings panel provides information about the currently selected menu title or state rather than the what the button does.

Why?

Any control must be labeled based on what it does or on what actions it gives access to. It's not a place to report selected values or states.
Also, consistency is key.

How?

  • Change button label to 'Actions'.
  • Moves the information about the currently selected menu or the state to a description after the panel heading.

Note:
the latest commit improves a little the 'Loading...' indicator. Previously, this 'Loading...' text stayed there forever after switching to another menu. It is now a little better but I don't think the underlying bug is fully solved. Specifically, I'm not sure the state props isCreatingMenu, isResolvingNavigationMenus, and hasResolvedNavigationMenus work as intended. Basically, when switching to another menu, isCreatingMenu is always true, which doesn't seem correct to me and causes at least another bug. I will split this to a separate issue with more details.

Testing Instructions

  • Go to Site editor, edit mode.
  • Select a navigation block.
  • In the settings panel, observe the currently selected navigation menu name is shown under the heading 'Menu'.
  • Onserve the label of the ellipsis button after the heading 'Menu' is now 'Actions'.
  • Open the Actions menu.
  • Click Create a new menu.
  • Observe the currently selected navigation menu name changes to Loading....
  • Onbserve that when the new menu is created, the Loading... text changes to the new menu name e.g. 'Header navigation 2'.
  • Open the Actions menu.
  • Switch to another menu.
  • Observe the currently selected menu name under the heading changes to the new selected menu name.

Testing Instructions for Keyboard

Screenshots or screencast

@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). [Package] Edit Site /packages/edit-site labels Feb 28, 2024
Copy link

github-actions bot commented Feb 28, 2024

Size Change: +52 B (0%)

Total Size: 1.75 MB

Filename Size Change
build/block-library/index.min.js 218 kB +52 B (0%)
ℹ️ View Unchanged
Filename Size
build/a11y/index.min.js 955 B
build/annotations/index.min.js 2.27 kB
build/api-fetch/index.min.js 2.32 kB
build/autop/index.min.js 2.1 kB
build/blob/index.min.js 578 B
build/block-directory/index.min.js 7.26 kB
build/block-directory/style-rtl.css 1.03 kB
build/block-directory/style.css 1.03 kB
build/block-editor/content-rtl.css 4.5 kB
build/block-editor/content.css 4.5 kB
build/block-editor/default-editor-styles-rtl.css 395 B
build/block-editor/default-editor-styles.css 395 B
build/block-editor/index.min.js 255 kB
build/block-editor/style-rtl.css 15.6 kB
build/block-editor/style.css 15.6 kB
build/block-library/blocks/archives/editor-rtl.css 61 B
build/block-library/blocks/archives/editor.css 60 B
build/block-library/blocks/archives/style-rtl.css 90 B
build/block-library/blocks/archives/style.css 90 B
build/block-library/blocks/audio/editor-rtl.css 150 B
build/block-library/blocks/audio/editor.css 150 B
build/block-library/blocks/audio/style-rtl.css 122 B
build/block-library/blocks/audio/style.css 122 B
build/block-library/blocks/audio/theme-rtl.css 133 B
build/block-library/blocks/audio/theme.css 133 B
build/block-library/blocks/avatar/editor-rtl.css 116 B
build/block-library/blocks/avatar/editor.css 116 B
build/block-library/blocks/avatar/style-rtl.css 104 B
build/block-library/blocks/avatar/style.css 104 B
build/block-library/blocks/block/editor-rtl.css 305 B
build/block-library/blocks/block/editor.css 305 B
build/block-library/blocks/button/editor-rtl.css 415 B
build/block-library/blocks/button/editor.css 414 B
build/block-library/blocks/button/style-rtl.css 627 B
build/block-library/blocks/button/style.css 626 B
build/block-library/blocks/buttons/editor-rtl.css 337 B
build/block-library/blocks/buttons/editor.css 337 B
build/block-library/blocks/buttons/style-rtl.css 332 B
build/block-library/blocks/buttons/style.css 332 B
build/block-library/blocks/calendar/style-rtl.css 239 B
build/block-library/blocks/calendar/style.css 239 B
build/block-library/blocks/categories/editor-rtl.css 113 B
build/block-library/blocks/categories/editor.css 112 B
build/block-library/blocks/categories/style-rtl.css 124 B
build/block-library/blocks/categories/style.css 124 B
build/block-library/blocks/code/editor-rtl.css 53 B
build/block-library/blocks/code/editor.css 53 B
build/block-library/blocks/code/style-rtl.css 121 B
build/block-library/blocks/code/style.css 121 B
build/block-library/blocks/code/theme-rtl.css 124 B
build/block-library/blocks/code/theme.css 124 B
build/block-library/blocks/columns/editor-rtl.css 108 B
build/block-library/blocks/columns/editor.css 108 B
build/block-library/blocks/columns/style-rtl.css 421 B
build/block-library/blocks/columns/style.css 421 B
build/block-library/blocks/comment-author-avatar/editor-rtl.css 125 B
build/block-library/blocks/comment-author-avatar/editor.css 125 B
build/block-library/blocks/comment-content/style-rtl.css 92 B
build/block-library/blocks/comment-content/style.css 92 B
build/block-library/blocks/comment-template/style-rtl.css 199 B
build/block-library/blocks/comment-template/style.css 198 B
build/block-library/blocks/comments-pagination-numbers/editor-rtl.css 123 B
build/block-library/blocks/comments-pagination-numbers/editor.css 121 B
build/block-library/blocks/comments-pagination/editor-rtl.css 222 B
build/block-library/blocks/comments-pagination/editor.css 209 B
build/block-library/blocks/comments-pagination/style-rtl.css 235 B
build/block-library/blocks/comments-pagination/style.css 231 B
build/block-library/blocks/comments-title/editor-rtl.css 75 B
build/block-library/blocks/comments-title/editor.css 75 B
build/block-library/blocks/comments/editor-rtl.css 840 B
build/block-library/blocks/comments/editor.css 839 B
build/block-library/blocks/comments/style-rtl.css 637 B
build/block-library/blocks/comments/style.css 636 B
build/block-library/blocks/cover/editor-rtl.css 647 B
build/block-library/blocks/cover/editor.css 650 B
build/block-library/blocks/cover/style-rtl.css 1.7 kB
build/block-library/blocks/cover/style.css 1.69 kB
build/block-library/blocks/details/editor-rtl.css 65 B
build/block-library/blocks/details/editor.css 65 B
build/block-library/blocks/details/style-rtl.css 86 B
build/block-library/blocks/details/style.css 86 B
build/block-library/blocks/embed/editor-rtl.css 322 B
build/block-library/blocks/embed/editor.css 322 B
build/block-library/blocks/embed/style-rtl.css 410 B
build/block-library/blocks/embed/style.css 410 B
build/block-library/blocks/embed/theme-rtl.css 133 B
build/block-library/blocks/embed/theme.css 133 B
build/block-library/blocks/file/editor-rtl.css 326 B
build/block-library/blocks/file/editor.css 327 B
build/block-library/blocks/file/style-rtl.css 280 B
build/block-library/blocks/file/style.css 281 B
build/block-library/blocks/file/view.min.js 324 B
build/block-library/blocks/footnotes/style-rtl.css 201 B
build/block-library/blocks/footnotes/style.css 199 B
build/block-library/blocks/form-input/editor-rtl.css 227 B
build/block-library/blocks/form-input/editor.css 227 B
build/block-library/blocks/form-input/style-rtl.css 343 B
build/block-library/blocks/form-input/style.css 343 B
build/block-library/blocks/form-submission-notification/editor-rtl.css 340 B
build/block-library/blocks/form-submission-notification/editor.css 340 B
build/block-library/blocks/form-submit-button/style-rtl.css 69 B
build/block-library/blocks/form-submit-button/style.css 69 B
build/block-library/blocks/form/view.min.js 471 B
build/block-library/blocks/freeform/editor-rtl.css 2.61 kB
build/block-library/blocks/freeform/editor.css 2.61 kB
build/block-library/blocks/gallery/editor-rtl.css 947 B
build/block-library/blocks/gallery/editor.css 952 B
build/block-library/blocks/gallery/style-rtl.css 1.72 kB
build/block-library/blocks/gallery/style.css 1.72 kB
build/block-library/blocks/gallery/theme-rtl.css 108 B
build/block-library/blocks/gallery/theme.css 108 B
build/block-library/blocks/group/editor-rtl.css 647 B
build/block-library/blocks/group/editor.css 647 B
build/block-library/blocks/group/style-rtl.css 57 B
build/block-library/blocks/group/style.css 57 B
build/block-library/blocks/group/theme-rtl.css 78 B
build/block-library/blocks/group/theme.css 78 B
build/block-library/blocks/heading/style-rtl.css 189 B
build/block-library/blocks/heading/style.css 189 B
build/block-library/blocks/html/editor-rtl.css 336 B
build/block-library/blocks/html/editor.css 337 B
build/block-library/blocks/image/editor-rtl.css 878 B
build/block-library/blocks/image/editor.css 878 B
build/block-library/blocks/image/style-rtl.css 1.6 kB
build/block-library/blocks/image/style.css 1.59 kB
build/block-library/blocks/image/theme-rtl.css 133 B
build/block-library/blocks/image/theme.css 133 B
build/block-library/blocks/image/view.min.js 1.54 kB
build/block-library/blocks/latest-comments/style-rtl.css 357 B
build/block-library/blocks/latest-comments/style.css 357 B
build/block-library/blocks/latest-posts/editor-rtl.css 213 B
build/block-library/blocks/latest-posts/editor.css 212 B
build/block-library/blocks/latest-posts/style-rtl.css 478 B
build/block-library/blocks/latest-posts/style.css 478 B
build/block-library/blocks/list/style-rtl.css 88 B
build/block-library/blocks/list/style.css 88 B
build/block-library/blocks/media-text/editor-rtl.css 306 B
build/block-library/blocks/media-text/editor.css 305 B
build/block-library/blocks/media-text/style-rtl.css 505 B
build/block-library/blocks/media-text/style.css 503 B
build/block-library/blocks/more/editor-rtl.css 431 B
build/block-library/blocks/more/editor.css 431 B
build/block-library/blocks/navigation-link/editor-rtl.css 668 B
build/block-library/blocks/navigation-link/editor.css 669 B
build/block-library/blocks/navigation-link/style-rtl.css 259 B
build/block-library/blocks/navigation-link/style.css 257 B
build/block-library/blocks/navigation-submenu/editor-rtl.css 296 B
build/block-library/blocks/navigation-submenu/editor.css 295 B
build/block-library/blocks/navigation/editor-rtl.css 2.26 kB
build/block-library/blocks/navigation/editor.css 2.26 kB
build/block-library/blocks/navigation/style-rtl.css 2.26 kB
build/block-library/blocks/navigation/style.css 2.25 kB
build/block-library/blocks/navigation/view.min.js 1.03 kB
build/block-library/blocks/nextpage/editor-rtl.css 395 B
build/block-library/blocks/nextpage/editor.css 395 B
build/block-library/blocks/page-list/editor-rtl.css 377 B
build/block-library/blocks/page-list/editor.css 377 B
build/block-library/blocks/page-list/style-rtl.css 175 B
build/block-library/blocks/page-list/style.css 175 B
build/block-library/blocks/paragraph/editor-rtl.css 235 B
build/block-library/blocks/paragraph/editor.css 235 B
build/block-library/blocks/paragraph/style-rtl.css 335 B
build/block-library/blocks/paragraph/style.css 335 B
build/block-library/blocks/post-author/style-rtl.css 175 B
build/block-library/blocks/post-author/style.css 176 B
build/block-library/blocks/post-comments-form/editor-rtl.css 96 B
build/block-library/blocks/post-comments-form/editor.css 96 B
build/block-library/blocks/post-comments-form/style-rtl.css 508 B
build/block-library/blocks/post-comments-form/style.css 508 B
build/block-library/blocks/post-content/editor-rtl.css 74 B
build/block-library/blocks/post-content/editor.css 74 B
build/block-library/blocks/post-date/style-rtl.css 61 B
build/block-library/blocks/post-date/style.css 61 B
build/block-library/blocks/post-excerpt/editor-rtl.css 71 B
build/block-library/blocks/post-excerpt/editor.css 71 B
build/block-library/blocks/post-excerpt/style-rtl.css 141 B
build/block-library/blocks/post-excerpt/style.css 141 B
build/block-library/blocks/post-featured-image/editor-rtl.css 666 B
build/block-library/blocks/post-featured-image/editor.css 662 B
build/block-library/blocks/post-featured-image/style-rtl.css 342 B
build/block-library/blocks/post-featured-image/style.css 342 B
build/block-library/blocks/post-navigation-link/style-rtl.css 215 B
build/block-library/blocks/post-navigation-link/style.css 214 B
build/block-library/blocks/post-template/editor-rtl.css 99 B
build/block-library/blocks/post-template/editor.css 98 B
build/block-library/blocks/post-template/style-rtl.css 409 B
build/block-library/blocks/post-template/style.css 408 B
build/block-library/blocks/post-terms/style-rtl.css 96 B
build/block-library/blocks/post-terms/style.css 96 B
build/block-library/blocks/post-time-to-read/style-rtl.css 69 B
build/block-library/blocks/post-time-to-read/style.css 69 B
build/block-library/blocks/post-title/style-rtl.css 100 B
build/block-library/blocks/post-title/style.css 100 B
build/block-library/blocks/preformatted/style-rtl.css 125 B
build/block-library/blocks/preformatted/style.css 125 B
build/block-library/blocks/pullquote/editor-rtl.css 135 B
build/block-library/blocks/pullquote/editor.css 135 B
build/block-library/blocks/pullquote/style-rtl.css 354 B
build/block-library/blocks/pullquote/style.css 353 B
build/block-library/blocks/pullquote/theme-rtl.css 174 B
build/block-library/blocks/pullquote/theme.css 174 B
build/block-library/blocks/query-pagination-numbers/editor-rtl.css 122 B
build/block-library/blocks/query-pagination-numbers/editor.css 121 B
build/block-library/blocks/query-pagination/editor-rtl.css 221 B
build/block-library/blocks/query-pagination/editor.css 211 B
build/block-library/blocks/query-pagination/style-rtl.css 288 B
build/block-library/blocks/query-pagination/style.css 284 B
build/block-library/blocks/query-title/style-rtl.css 63 B
build/block-library/blocks/query-title/style.css 63 B
build/block-library/blocks/query/editor-rtl.css 486 B
build/block-library/blocks/query/editor.css 486 B
build/block-library/blocks/query/view.min.js 958 B
build/block-library/blocks/quote/style-rtl.css 237 B
build/block-library/blocks/quote/style.css 237 B
build/block-library/blocks/quote/theme-rtl.css 233 B
build/block-library/blocks/quote/theme.css 235 B
build/block-library/blocks/read-more/style-rtl.css 140 B
build/block-library/blocks/read-more/style.css 140 B
build/block-library/blocks/rss/editor-rtl.css 149 B
build/block-library/blocks/rss/editor.css 149 B
build/block-library/blocks/rss/style-rtl.css 289 B
build/block-library/blocks/rss/style.css 288 B
build/block-library/blocks/search/editor-rtl.css 184 B
build/block-library/blocks/search/editor.css 184 B
build/block-library/blocks/search/style-rtl.css 690 B
build/block-library/blocks/search/style.css 689 B
build/block-library/blocks/search/theme-rtl.css 114 B
build/block-library/blocks/search/theme.css 114 B
build/block-library/blocks/search/view.min.js 478 B
build/block-library/blocks/separator/editor-rtl.css 146 B
build/block-library/blocks/separator/editor.css 146 B
build/block-library/blocks/separator/style-rtl.css 229 B
build/block-library/blocks/separator/style.css 229 B
build/block-library/blocks/separator/theme-rtl.css 194 B
build/block-library/blocks/separator/theme.css 194 B
build/block-library/blocks/shortcode/editor-rtl.css 323 B
build/block-library/blocks/shortcode/editor.css 323 B
build/block-library/blocks/site-logo/editor-rtl.css 754 B
build/block-library/blocks/site-logo/editor.css 754 B
build/block-library/blocks/site-logo/style-rtl.css 204 B
build/block-library/blocks/site-logo/style.css 204 B
build/block-library/blocks/site-tagline/editor-rtl.css 86 B
build/block-library/blocks/site-tagline/editor.css 86 B
build/block-library/blocks/site-title/editor-rtl.css 116 B
build/block-library/blocks/site-title/editor.css 116 B
build/block-library/blocks/site-title/style-rtl.css 57 B
build/block-library/blocks/site-title/style.css 57 B
build/block-library/blocks/social-link/editor-rtl.css 184 B
build/block-library/blocks/social-link/editor.css 184 B
build/block-library/blocks/social-links/editor-rtl.css 676 B
build/block-library/blocks/social-links/editor.css 675 B
build/block-library/blocks/social-links/style-rtl.css 1.48 kB
build/block-library/blocks/social-links/style.css 1.48 kB
build/block-library/blocks/spacer/editor-rtl.css 350 B
build/block-library/blocks/spacer/editor.css 350 B
build/block-library/blocks/spacer/style-rtl.css 48 B
build/block-library/blocks/spacer/style.css 48 B
build/block-library/blocks/table/editor-rtl.css 395 B
build/block-library/blocks/table/editor.css 395 B
build/block-library/blocks/table/style-rtl.css 639 B
build/block-library/blocks/table/style.css 639 B
build/block-library/blocks/table/theme-rtl.css 152 B
build/block-library/blocks/table/theme.css 152 B
build/block-library/blocks/tag-cloud/style-rtl.css 251 B
build/block-library/blocks/tag-cloud/style.css 253 B
build/block-library/blocks/template-part/editor-rtl.css 431 B
build/block-library/blocks/template-part/editor.css 431 B
build/block-library/blocks/template-part/theme-rtl.css 107 B
build/block-library/blocks/template-part/theme.css 107 B
build/block-library/blocks/term-description/style-rtl.css 111 B
build/block-library/blocks/term-description/style.css 111 B
build/block-library/blocks/text-columns/editor-rtl.css 95 B
build/block-library/blocks/text-columns/editor.css 95 B
build/block-library/blocks/text-columns/style-rtl.css 166 B
build/block-library/blocks/text-columns/style.css 166 B
build/block-library/blocks/verse/style-rtl.css 99 B
build/block-library/blocks/verse/style.css 99 B
build/block-library/blocks/video/editor-rtl.css 552 B
build/block-library/blocks/video/editor.css 555 B
build/block-library/blocks/video/style-rtl.css 185 B
build/block-library/blocks/video/style.css 185 B
build/block-library/blocks/video/theme-rtl.css 133 B
build/block-library/blocks/video/theme.css 133 B
build/block-library/classic-rtl.css 179 B
build/block-library/classic.css 179 B
build/block-library/common-rtl.css 1.11 kB
build/block-library/common.css 1.11 kB
build/block-library/editor-elements-rtl.css 75 B
build/block-library/editor-elements.css 75 B
build/block-library/editor-rtl.css 12.4 kB
build/block-library/editor.css 12.3 kB
build/block-library/elements-rtl.css 54 B
build/block-library/elements.css 54 B
build/block-library/reset-rtl.css 472 B
build/block-library/reset.css 472 B
build/block-library/style-rtl.css 14.8 kB
build/block-library/style.css 14.8 kB
build/block-library/theme-rtl.css 707 B
build/block-library/theme.css 713 B
build/block-serialization-default-parser/index.min.js 1.12 kB
build/block-serialization-spec-parser/index.min.js 2.87 kB
build/blocks/index.min.js 51.5 kB
build/commands/index.min.js 15.2 kB
build/commands/style-rtl.css 953 B
build/commands/style.css 951 B
build/components/index.min.js 222 kB
build/components/style-rtl.css 11.9 kB
build/components/style.css 11.9 kB
build/compose/index.min.js 12.6 kB
build/core-commands/index.min.js 2.77 kB
build/core-data/index.min.js 72.5 kB
build/customize-widgets/index.min.js 11.2 kB
build/customize-widgets/style-rtl.css 1.36 kB
build/customize-widgets/style.css 1.36 kB
build/data-controls/index.min.js 640 B
build/data/index.min.js 9 kB
build/date/index.min.js 17.9 kB
build/deprecated/index.min.js 451 B
build/dom-ready/index.min.js 324 B
build/dom/index.min.js 4.65 kB
build/edit-post/classic-rtl.css 579 B
build/edit-post/classic.css 579 B
build/edit-post/index.min.js 23.9 kB
build/edit-post/style-rtl.css 5.5 kB
build/edit-post/style.css 5.5 kB
build/edit-site/index.min.js 230 kB
build/edit-site/style-rtl.css 15 kB
build/edit-site/style.css 15 kB
build/edit-widgets/index.min.js 17.7 kB
build/edit-widgets/style-rtl.css 4.16 kB
build/edit-widgets/style.css 4.16 kB
build/editor/index.min.js 70.5 kB
build/editor/style-rtl.css 5.49 kB
build/editor/style.css 5.48 kB
build/element/index.min.js 4.83 kB
build/escape-html/index.min.js 537 B
build/format-library/index.min.js 8.07 kB
build/format-library/style-rtl.css 493 B
build/format-library/style.css 492 B
build/hooks/index.min.js 1.55 kB
build/html-entities/index.min.js 448 B
build/i18n/index.min.js 3.58 kB
build/interactivity/debug.min.js 16.2 kB
build/interactivity/file.min.js 447 B
build/interactivity/image.min.js 1.67 kB
build/interactivity/index.min.js 13 kB
build/interactivity/navigation.min.js 1.17 kB
build/interactivity/query.min.js 740 B
build/interactivity/router.min.js 1.36 kB
build/interactivity/search.min.js 618 B
build/is-shallow-equal/index.min.js 527 B
build/keyboard-shortcuts/index.min.js 1.3 kB
build/keycodes/index.min.js 1.46 kB
build/list-reusable-blocks/index.min.js 2.11 kB
build/list-reusable-blocks/style-rtl.css 851 B
build/list-reusable-blocks/style.css 851 B
build/media-utils/index.min.js 2.92 kB
build/modules/importmap-polyfill.min.js 12.2 kB
build/notices/index.min.js 948 B
build/nux/index.min.js 1.57 kB
build/nux/style-rtl.css 748 B
build/nux/style.css 744 B
build/patterns/index.min.js 6.38 kB
build/patterns/style-rtl.css 595 B
build/patterns/style.css 595 B
build/plugins/index.min.js 1.8 kB
build/preferences-persistence/index.min.js 2.06 kB
build/preferences/index.min.js 2.83 kB
build/preferences/style-rtl.css 710 B
build/preferences/style.css 712 B
build/primitives/index.min.js 975 B
build/priority-queue/index.min.js 1.52 kB
build/private-apis/index.min.js 1 kB
build/react-i18n/index.min.js 623 B
build/react-refresh-entry/index.min.js 9.47 kB
build/react-refresh-runtime/index.min.js 6.78 kB
build/redux-routine/index.min.js 2.7 kB
build/reusable-blocks/index.min.js 2.73 kB
build/reusable-blocks/style-rtl.css 256 B
build/reusable-blocks/style.css 256 B
build/rich-text/index.min.js 10 kB
build/router/index.min.js 1.88 kB
build/server-side-render/index.min.js 1.96 kB
build/shortcode/index.min.js 1.39 kB
build/style-engine/index.min.js 2.03 kB
build/token-list/index.min.js 582 B
build/url/index.min.js 3.74 kB
build/vendors/inert-polyfill.min.js 2.48 kB
build/vendors/react-dom.min.js 41.7 kB
build/vendors/react.min.js 4.02 kB
build/viewport/index.min.js 957 B
build/warning/index.min.js 249 B
build/widgets/index.min.js 7.23 kB
build/widgets/style-rtl.css 1.17 kB
build/widgets/style.css 1.17 kB
build/wordcount/index.min.js 1.02 kB

compressed-size-action

@afercia afercia force-pushed the fix/menu-actions-button-labeling branch from ce69ee3 to d7d1b4d Compare March 5, 2024 15:08
@afercia afercia marked this pull request as ready for review March 5, 2024 15:18
@afercia afercia requested a review from ajitbohra as a code owner March 5, 2024 15:18
Copy link

github-actions bot commented Mar 5, 2024

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Unlinked Accounts

The following contributors have not linked their GitHub and WordPress.org accounts: @helloakshat.

Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Unlinked contributors: helloakshat.

Co-authored-by: afercia <[email protected]>
Co-authored-by: alexstine <[email protected]>
Co-authored-by: draganescu <[email protected]>
Co-authored-by: joedolson <[email protected]>
Co-authored-by: jeryj <[email protected]>
Co-authored-by: andrewhayward <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Copy link
Contributor

@alexstine alexstine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@afercia Now there is no way to actually tell which menu is selected without having to move around this panel in browse mode. I agree we shouldn't be updating the label but taking away users ability to see what is selected in that dropdown is not great either. You have to open the dropdown to now see what is selected. Thoughts?

@afercia afercia force-pushed the fix/menu-actions-button-labeling branch from d7d1b4d to 0af5511 Compare March 6, 2024 11:05
@afercia
Copy link
Contributor Author

afercia commented Mar 6, 2024

@alexstine thanks for your feedback.

Now there is no way to actually tell which menu is selected without having to move around this panel in browse mode ... taking away users ability to see what is selected in that dropdown is not great either. You have to open the dropdown to now see what is selected.

In a way, that is true for all toggle buttons that open a dropdown menu, for example in the block toolbar: Heading level, Alignment and many other places in the editor.

A toggle button that opens a dropdown menu is not supposed to report the currently selected value. Rather, I wonderwhether a dropdown menu is the best UI for a selection in the first place. Also, the dropdown menu contains a mix of things that are logically different, which isn't great to me:

  • Selectiong an existing menu
  • Importing classic menus
  • Creating a new menu

Given the mixed content within the menu, I don't think the toggle button should ever contain information about the currently selected menu.

In my opinion there are more things that would beed improvements and I'm totally in favor of making the selected menu information available in focus mode as well, in some way.

I'm open to suggestions. With this PR, the information structure is the following one:

  • h2 heading: Menu. This could be improved as it doesn't actually explain well this is the currently selected menu.
  • button: Actions
  • paragraph with selected menu name e.g.: Social menu, or 'Loading...' indicator.
  • role="application" labeled: Block navigation structure
  • role="treegrid" labeled: Block navigation structure (again)
  • the treegrid also has a description with the selected menu name e.g.: Structure for navigation menu: Social menu

All this labeling could be certainly improved. Thoughts?

@afercia
Copy link
Contributor Author

afercia commented Mar 6, 2024

While fixing the NavigationMenuSelector test I realized that also the label of the dropdown menu with role=menu was changing dynamically form 'Loading...' to Choose or create a Navigation menu to the menu name when selected, which is... far from ideal.

@alexstine
Copy link
Contributor

@afercia I agree, labeling needs to be cleaned up for the list view. Adding the application role was necessary though due to the fact NVDA will always switch to browse mode if you pressed right arrow and landed on the block options button. The bug has been reported to NVDA developers and will not be fixed without additional funding.

What is frustrating about the submenus is these are used all over, as you said, to select/change UI views. There is no good way to communicate the currently selected value and I bet you 100% we're not going to start replacing them with something that makes sense such as a simple HTML select. I have no ideas on how to improve something that is by default, an inaccessible misused pattern.

@afercia
Copy link
Contributor Author

afercia commented Mar 7, 2024

such as a simple HTML select

Oh yes I would have liked to see a selection feature actually use a control that is made to... well... select.
It appears the design here, and in many other parts of the editor UI, doesn't fully understand that buttons aren't the right pkace to communicate values or states.

@alexstine what if we change the heading? Currently, it's 'Menu', which doesn't help much.
In the classic menus, WordPress uses the terminology 'Assigned Menu' to indicate the association between menu locations and menus. We could borrow that terminology to indicate the association between the Navigation block and its assigned menu. The heading could contain the menu name, when assigned.

@draganescu
Copy link
Contributor

draganescu commented Mar 7, 2024

I looked at this and it looks like below:

navigation-label.mp4

Although it does solve a legit problem the resulting UI is quite out of place. If we intend to address the problem via UI we need to integrate things a bit better into the overall design.

The thing that is hardest is that, despite its existence, the name of the currently selected "menu" is not important in most cases. And in the cases where it's important it's because there is a slew of other menus, and seeing the active one in a list of all is more useful for sighted users.

OTOH, for sight assisted interaction the fact that the selector announces the name of the selected menu is quite useless, and the currently selected menu becomes a matter of hunting for it. Can we solve this without bubbling it up as a visible update to the UI? If we have to update the UI we need some sort of polish to the solution IMO.

@afercia afercia force-pushed the fix/menu-actions-button-labeling branch from ecdc501 to 129de9c Compare March 7, 2024 14:39
@afercia
Copy link
Contributor Author

afercia commented Mar 7, 2024

Rebased on top of latest trunk after #59667

@alexstine
Copy link
Contributor

@draganescu Could you please explain your comment?

The thing that is hardest is that, despite its existence, the name of the currently selected "menu" is not important in most cases. And in the cases where it's important it's because there is a slew of other menus, and seeing the active one in a list of all is more useful for sighted users.

It sounds like once again, we're going to do everything in our power to ensure sighted users have a great experience and people without sight, well, get left out. I'm of the opinion that a visible menu name would be an improvement that saves clicks for everyone but I guess not.

@draganescu
Copy link
Contributor

Oh the coldness of the comment box strikes again 🥲

By all means @alexstine I was trying to convey precisely that the fact that:

The label of the Navigation menu 'actions' button in the settings panel provides information about the currently selected menu title or state rather than the what the button does.

is a serious bug for sight assisted interaction because there is no way to know that from a control named "Header Navigation" one can switch to another menu 🤦🏻 .

What I want to add to this is that in solving this bug we need to think if there is a way in which to not prominently show the navigation name in the UI since in 80% of the cases it's irrelevant, users generally building one menu, maybe two. Also, if we can't do it any other way, and must show the label then and there, we need to do some massaging to that label's integration b/c for now it looks quite patched on top of the UI. For instance, if I have a menu labeled Navigation it the visual hierarchy is very confusing since I am already in a panel with a big bold title Navigation.

@alexstine
Copy link
Contributor

@draganescu Why not something like "Currently editing: menu_name"? I think a lot of Gutenberg's UI challenges could be made better for everyone if it were obvious to all. I think the bus starts falling off the road when we make assumptions about the UI and what is useful or not useful. That's what I like about classic WordPress, the UI was so clear, not always the best organized, but clear. I find the whole experience with guessing UX to be quite inaccessible and I know I've seen other feedback where even sighted people get confused. Not sure if I disagree with the 80% here and even if I did, making it clear has really no drawbacks. One extra sentence in the UI hurts no one.

This could also be solved with a simple HTML select with a create new menu button right next to it. Sometimes I feel like we as developers/designers try to make a UI so simple that it actually becomes more complex.

Anyway, just my take.

@joedolson
Copy link
Contributor

I'd agree with @alexstine that overall, the biggest challenge I see in the editor environment is how difficult it is to get clear information in the pursuit of having a "clean" interface. I don't think there's any scenario where it's harmful to have a visible name that gives you context about what you're editing, and many scenarios where it's critical. So on balance, I think it's very important to have visible.

@draganescu As a note on your video: your comments definitely sound like you're critical of how this PR makes things look, but you didn't include any specifics. I don't see anything in the video that I'd have a problem with visually; can you provide some written description of what you find out of place in that UX? I just don't see what the issue is.

@draganescu
Copy link
Contributor

draganescu commented Mar 7, 2024

@alexstine I think this bit:

and seeing the active one in a list of all is more useful for sighted users

... is really poorly phrased on my side. I wanted to say that having a checkmark in a list does a better job for sighted users but not great for everyone else and we want to improve this, since the checkbox is useful if you can see the list, otherwise the checkbox is not useful. My intent is to say it's not good enough for everyone :) but I can totally understand how it does not convey that.

@joedolson the problem is that the label is disconnected from the control below it and looks out of place in general - for example the spacing is wrong because the label is placed in the horizontal layout of the panel title. Also it is raising the importance of the menu's name to the highest UI hierarchy level, whereas this is a power user detail. It is not important in general, not even if there are two or three menus. So while we can show this name it's not helpful but makes things more confusing.

@alexstine I think if we just solve the problem with the label of the toggle of the drop down the fact that the name fo the menu is available in focus mode for assitive tech users or via diving in the UI for not assisted use, sort of having this information in a secondary level, for everyone is good enough for a feature which we want to be discovered not assumed.

@jeryj
Copy link
Contributor

jeryj commented Mar 7, 2024

The label of the Navigation menu 'actions' button in the settings panel provides information about the currently selected menu title or state rather than the what the button does.

I definitely agree that the name of this action button should be changed to a consistent label.

It seems like the direction of the navigation menus is to deemphasize named menus. However, as @draganescu is saying, access to this information is easier for sighter users, and it should be easy for everyone who wants that information.

I understand @draganescu's point that putting it into the main UI makes the UX worse because the name of the menu should not be important. We want the selected menu name to be deprioritized for everyone. Would attaching the currently selected menu name via aria-describedby be useful to make it deprioritized but easy to access?

the biggest challenge I see in the editor environment is how difficult it is to get clear information in the pursuit of having a "clean" interface. I don't think there's any scenario where it's harmful to have a visible name that gives you context about what you're editing, and many scenarios where it's critical. So on balance, I think it's very important to have visible.

FWIW, this is my personal preference too. If it were 100% up to me, I would make the title something like, "Menu: [name of selected menu]"

@afercia
Copy link
Contributor Author

afercia commented Mar 8, 2024

@draganescu thanks for your feedback. I'm not sure I can agree with most of your points though.

the problem is that the label is disconnected from the control below it and looks out of place in general

Honestly, this is is a very subjective perspective.

(the menu name) It is not important in general, not even if there are two or three menus

I'm not sure I understand how the menu name is not important. In the admin, it is important because it gives users immediate feedback on what the selected menu is without having to scan the entirety of the menu to understand it, and the menu could potentially be made of dozens of items.

More importantly, on the front end the menu name is what is used to label the <nav> element. E.g. aria-label="Social menu". It is extremely important to visually expose the menu name and it should further be improved becausel:

  • The UI doesn't explain this name is important and should be meaningful and unique for each menu. In fact, all <nav> elements on the front end must be distinguished by the means of a meaningful label.
  • It's not easy to understand how to rename a menu in the inspector. Right now, the name input field iiss well buried down under Block > Navigation > Gear icon (Settings) > Advanced (collapsed by default) > Menu name.
  • Giveb the menu name is of fundamental importance, I'd also say naming the menu should be the first step when creating a new menu. Instead, right now a new menu is automatically named for example it may a name 'Header navigation 2' which is far from ideal.
  • Overall, the current design misses a very fundamental point as it appears designers and developers didn't realize the menu name is used on the front end and must be meaningful. As such, the design missed a functional requirement so there's a clear design flaw here.

I will split this to a separate issue as the naming of the menu should be a first, prominent, step in the menu creation and its importance should be explained to users.

We want the selected menu name to be deprioritized for everyone

Could you please clarify who 'we' is in this context? Are you referring to some specific group of people as opposed to other groups? I'd like to remind everyone that this is a collaborative open source project and there is no 'we' as opposed to 'they'. We are all contributors, peers between peers, each one with their own expertise and skills. I'm not sure usign the term 'we' is appropriate in any contribution to this project. It is also unfair because this same conversation proves 'we' (as we all contributors participating to this conversation) disagree on deprioritizing the menu name.

@afercia
Copy link
Contributor Author

afercia commented Mar 8, 2024

I would also like to add that the automatic naming mechanism is very wrong as it adds the termn 'navigation' to the menu name e.g.:

  • aria-label="Header navigation 3"
  • aria-label="Footer navigation"

I'm pretty sure prior accessibility feedback on various issues and PRs already explained several times that a navigation <nav> element label should never contain the word 'navigation' because screen readers already announce it as 'navigation'. This is also against the best practices bundled themes always followed, avoiding the term 'navigation' for the menu labels. Pinging @carolinan for kind confirmation.

@draganescu
Copy link
Contributor

draganescu commented Mar 8, 2024

👋🏻 @afercia - the "we" refers to my understanding of the overarching sequence of design iterations on this block and on the overall navigation building experience in the site editor. I do agree to your points on the relative importance of the name of the navigation. But what is the gain from crafting some weird name ("Menu Christmas Promotion") - and then use that on the front end to announce it, compared to auto generating the name from the surroundings of the block? I say it is no gain at all, creating yet another way to make simple mistakes.

Also I think, again, you're right, ideally if there is a name it should be asked upfront, yet concretely this is not a menu making application, it's a tiny function of a way more general application. How much UI do we need to communicate the relationship between the name a user writes, in a dialog interrupting their goal whom they can't wait to dismiss, and the label of the underlying nav element? I say a lot!

I think a lot of design tension comes from the fact that it is not expected that who ends up building a website will go through training as to what exact steps to follow. In it's consumer product shape (one of the shapes of WP) we all (everyone) should strive to make the experience as fluid and seamless as possible. The more that can be absorbed and handled by implemented heuristics the more fluid and seamless the experience is.

So to conclude, what we - the folks in this issue and everyone else - have a hard time to figure out is how to achieve the goals without cluttering the UI, burdening users with our problems and the web's technical intricacies, and also at the same time keeping the experience universally accessible and technically correct. It's hard. I find myself agreeing with almost everything you say but filtering for the goal makes me try to seek alternatives which are less straightforward and debatable.

the label is disconnected from the control below it and looks out of place in general
Honestly, this is is a very subjective perspective.

I don't agree with this one though, it's not subjective. The spacing around it has no rhythm, (it's too far from the tree control) there is no informational hierarchy it belongs to. The panel already has a title and all the tool panels have the title in the panel title. If we have no other way, It'd rather put it in the panel title itself, OR use it instead of "Navigation" for the name of the block, which is also how we do for template parts.

@afercia
Copy link
Contributor Author

afercia commented Mar 12, 2024

I think a lot of design tension comes from the fact that it is not expected that who ends up building a website will go through training as to what exact steps to follow.

I think we fundamentally have two very different views on what building a website is. While a tool like WordPress aims to empower everyone to publish their content, users with no education and training will end up building a website that resembles Geocities.

In the past this was mitigated by the fact themes were under control of theme authors, so that the design, layout, typography, readability, accessibility, etc. were responsibility of web professionals who strived to make their themes the most usable and accessible experience for everyone.

Now that the editor aims to put all this power in the hands of the final user, there's a serious risk to make the web worse. As such, there is the actual need to train and educate users on what they have to do.

The more that can be absorbed and handled by implemented heuristics the more fluid and seamless the experience is.

Yes and no. Sometimes, a smart UI may actually help users with their website building creation experience by automating things. Sometimes no, especially when it comes to the quality of the content. The menu names is content because it is used on the front end. The menu names must be carefully crafted and the UI must explain users why.

A similar example would be the alt text for images. I've heard countless times folks suggesting to automate the alt text creation by using AI or other smart flows for the exact same reasons you are mentioning in your previous comment. Unfortunately, all these smart ideas miss a very important point: the alt text, like the menu names, is content. It must be meaningful and high quality content and it depends on the context. As such, it must be created by humans who are trained and educated to understand why this is important content.

Also I think, again, you're right, ideally if there is a name it should be asked upfront, yet concretely this is not a menu making application, it's a tiny function of a way more general application. How much UI do we need to communicate the relationship between the name a user writes, in a dialog interrupting their goal whom they can't wait to dismiss, and the label of the underlying nav element? I say a lot!

I'd be more concerned if the menu creation was a daily task but it isn't. How many times users create menus on their websites? Typically they will create 3-4 menus at the very beginning when they are building their website and then never create new menus again. As such, I think making the menu name a required step during the menu creation doesn't really block the user experience in a significant way. Instead, it would be a good educational opportunity and it will contribute to make the web a better place.

I don't agree with this one though, it's not subjective. The spacing around it has no rhythm, (it's too far from the tree control) there is no informational hierarchy it belongs to.

I heard this kind of terminology from designers a lot. "balance", "rhythm", etc. to me are subjective perception unless they can be objectively measured based on specific criteria e.g. design guidelines or a grid system or established patterns for vertical spacing.

The panel already has a title and all the tool panels have the title in the panel title. If we have no other way, It'd rather put it in the panel title itself

I'd argue the root problem here is that, as a user, I don't understand why the concept of 'navigation' is separated from the concept of 'menu'. As a developer, I understand why. As a user, I don't. The title 'Menu' doesn't really help understand how the Navigation block works. It should be 'Current menu' or 'Selected menu' or 'Active menu' or something along those lines.

If we have no other way, It'd rather put it in the panel title itself

Section titles should not be used to communicate states or selected values.

@andrewhayward
Copy link
Contributor

andrewhayward commented Mar 14, 2024

Have we considered not putting the available navigation menus in that actions button at all, leaving it purely for actual actions? If the user has only one default navigation menu, there's little point in showing it as an option, or what its name is; there's no choice to be made. And if there are multiple navigation menus, then putting that information up front doesn't seem wholly inappropriate.

With no menu options With menu options
The navigation block settings panel, with an open popup menu titled "Tools" with an action labeled "Create new menu". The navigation block settings panel, with a select input between the "Menu" title and the "actions" popup button showing the active menu.

@joedolson
Copy link
Contributor

I very much like the idea of being able to see the name of my current menu at all times.

The proposed design could be difficult in languages if the translation of 'Menu' is long; but I don't know an example of that.

@afercia
Copy link
Contributor Author

afercia commented Mar 15, 2024

@andrewhayward thanks, yes I'd agree a <select> would be the best pattern to show the list of available menus and indicat ethe current selection.

Quoting myself:

I'd argue the root problem here is that, as a user, I don't understand why the concept of 'navigation' is separated from the concept of 'menu'. As a developer, I understand why. As a user, I don't. The title 'Menu' doesn't really help understand how the Navigation block works. It should be 'Current menu' or 'Selected menu' or 'Active menu' or something along those lines.

The relationship between 'Navigation' (the block) and 'Menu' is not clear and the UI doesn't help clarify what it is. To me, this is not much different from the Classic menu 'locations' page where a menu can be 'assigned' to a location. In a very similar way, in the editor a menu is 'assigned' to a navigation block. As such, I'd change the title 'Menu' to 'Assigned Menu' which is a terminology users are already familiar with.

Screenshot of the menu locations in the classic menus:

Screenshot 2024-03-15 at 08 56 17

Re: the ellipsis Action button, I think that using an ellispis button with a dropdown menu in this case is fundamentally wrong and inconsistent with other usages in the editor.

In the editor, there are severeal 'Action' buttons with a dropdown and, visually, they are directly associated with the object the actions apply to. For example, in the List VIew each item is a block and the ellipsis button shows actions for that block. Same in the datqa views, etc.

Instead, in this case the ellipsis button shows actions that are not associated with the object indicated by the title 'Menu':

  • The menu selection is not related to the currently selected menu. Rather, it's logically associated with the navigation block.
  • Import classic menus is clearly not an action that is logically related to the currently selected menu.
  • Create new menu idem, is not logically associated with the currently selected menu.

To me, the title 'Menu' relates to the selected menu below it. Instead, the ellipsis button relates to actions that belong to the Navigation block. Screenshot:

Screenshot 2024-03-15 at 09 07 50

@afercia afercia force-pushed the fix/menu-actions-button-labeling branch from 129de9c to b5e3604 Compare April 15, 2024 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Package] Edit Site /packages/edit-site [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix the labeling of the menu Actions button
6 participants