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

Add header title to list view sidebar #61553

Closed
wants to merge 3 commits into from
Closed

Conversation

jeryj
Copy link
Contributor

@jeryj jeryj commented May 10, 2024

Alternative to #61514.
Fixes #59013.

This code is not ready, but should give an idea of what the experience would be like. It is only implemented for the list view and inserter sidebars. The Styles and Settings sidebars have the old style so you can compare the behaviors more easily. Before merging a change like this, we would need to address all the sidebars.

What?

Fixes accessibility issues where focus order must match visual order, and also not be between the tabs and tab panel.

Why?

Accessibility.

How?

Moves Close button to before the tabs and add header title.

Testing Instructions

  • Open inserter, test close button
  • Open List view, test close button

Testing Instructions for Keyboard

Screenshots or screencast

Before After
image image
Copy link

github-actions bot commented May 10, 2024

Size Change: +89 B (+0.01%)

Total Size: 1.74 MB

Filename Size Change
build/block-editor/index.min.js 257 kB -76 B (-0.03%)
build/block-editor/style-rtl.css 15.5 kB +10 B (+0.06%)
build/block-editor/style.css 15.5 kB +9 B (+0.06%)
build/editor/index.min.js 83.3 kB +55 B (+0.07%)
build/editor/style-rtl.css 8.32 kB +45 B (+0.54%)
build/editor/style.css 8.32 kB +46 B (+0.56%)
ℹ️ 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.49 kB
build/block-editor/default-editor-styles-rtl.css 395 B
build/block-editor/default-editor-styles.css 395 B
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 277 B
build/block-library/blocks/block/editor.css 277 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 671 B
build/block-library/blocks/cover/editor.css 674 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 312 B
build/block-library/blocks/embed/editor.css 312 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 956 B
build/block-library/blocks/gallery/editor.css 960 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 394 B
build/block-library/blocks/group/editor.css 394 B
build/block-library/blocks/group/style-rtl.css 103 B
build/block-library/blocks/group/style.css 103 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 891 B
build/block-library/blocks/image/editor.css 891 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 193 B
build/block-library/blocks/navigation-link/style.css 192 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 734 B
build/block-library/blocks/post-featured-image/editor.css 732 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 397 B
build/block-library/blocks/post-template/style.css 396 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 239 B
build/block-library/blocks/separator/style.css 239 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 805 B
build/block-library/blocks/site-logo/editor.css 805 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 324 B
build/block-library/blocks/social-link/editor.css 324 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 393 B
build/block-library/blocks/template-part/editor.css 393 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.3 kB
build/block-library/editor.css 12.2 kB
build/block-library/elements-rtl.css 54 B
build/block-library/elements.css 54 B
build/block-library/index.min.js 218 kB
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.7 kB
build/commands/index.min.js 15.1 kB
build/commands/style-rtl.css 953 B
build/commands/style.css 951 B
build/components/index.min.js 220 kB
build/components/style-rtl.css 11.9 kB
build/components/style.css 11.9 kB
build/compose/index.min.js 12.8 kB
build/core-commands/index.min.js 2.81 kB
build/core-data/index.min.js 72.5 kB
build/customize-widgets/index.min.js 10.9 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 578 B
build/edit-post/classic.css 578 B
build/edit-post/index.min.js 14.4 kB
build/edit-post/style-rtl.css 2.68 kB
build/edit-post/style.css 2.68 kB
build/edit-site/index.min.js 223 kB
build/edit-site/style-rtl.css 12.9 kB
build/edit-site/style.css 12.9 kB
build/edit-widgets/index.min.js 17.5 kB
build/edit-widgets/style-rtl.css 4.18 kB
build/edit-widgets/style.css 4.18 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 2.79 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.45 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.85 kB
build/preferences/style-rtl.css 710 B
build/preferences/style.css 712 B
build/primitives/index.min.js 809 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.7 kB
build/reusable-blocks/style-rtl.css 256 B
build/reusable-blocks/style.css 256 B
build/rich-text/index.min.js 10.1 kB
build/router/index.min.js 1.93 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.02 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.03 kB
build/viewport/index.min.js 957 B
build/warning/index.min.js 249 B
build/widgets/index.min.js 7.11 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

.block-editor-inserter-sidebar__header-title {
font-size: 12px;
font-weight: 500;
color: #6b6b6b;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@richtabor @SaxonF Had to change this from $gray-600 to meet AA contrast requirement of 4.5:1. Feel free to take this over and apply the background and text color styles you want.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jameskoster - I meant to ping you on this about the colors. I quite like your design, and we only need to tweak the colors to meet AA contrast requirements.

Copy link
Contributor

Choose a reason for hiding this comment

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

A white background would make $gray-700 adequate, this might be a better approach?

@priethor
Copy link
Contributor

Added before & after screenshots to the description.

@scruffian scruffian added the Needs Design Feedback Needs general design feedback. label May 20, 2024
@jameskoster jameskoster requested a review from a team May 21, 2024 09:28
@jasmussen
Copy link
Contributor

jasmussen commented May 21, 2024

Let's not do this, it diverges from every other panel we have.

To clarify: the way to solve this is to explore the space of available options, apply solutions to every panel we have, and then implement it from there.

@jeryj
Copy link
Contributor Author

jeryj commented May 21, 2024

Let's not do this, it diverges from every other panel we have.

Yes, the intention was for it to be applied to every panel.

To clarify: the way to solve this is to explore the space of available options, apply solutions to every panel we have, and then implement it from there.

@jasmussen Agreed on that plan! I would love to help with this. I'm available to pair on this in realtime. I can assist on dev work and accessibility feedback and pair on design calls. How would you like to move forwards on this?

@jasmussen
Copy link
Contributor

#61837 seems like it might thread the needle, though I'll let others chime in there first.

@afercia
Copy link
Contributor

afercia commented May 22, 2024

Let's not do this, it diverges from every other panel we have.

To me, this doesn't seem a good argument. To me, all the other panels should be changed as well, as @jeryj clearly mentioned in this PR description.

Instead, let's do this. For all panels.

To me, any panel is a section of content. Any section of content should be clearly identified by a heading that explains what the panel is about. For example, see the discussion about the 'block inserter' panel at #61483. With the addition of Patterns and Media, the 'Block Inserter' is not only a block inserter any longer. The current labeling and names are out of date. That panel is now more a 'Library' with content types that can be added: Blocks, Patterns, Media.
I'd argue that when an UI section doesn't clarify what it is about, there is a problem of clarity and information architecture in the first place. Updating all the labels with a more meaningful naming and adding a heading would solve the clarity issue.

On top of that, the panel header would only contain the panel name and the Close button, which makes perfectly sense and would solve the order problem for panels with tabs. #61837 wouldn't be a real solution.

@afercia afercia added the [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). label May 22, 2024
@afercia afercia added the [Type] Bug An existing feature does not function as intended label May 22, 2024
@afercia
Copy link
Contributor

afercia commented May 22, 2024

Exploring the Styles panel:

Reserving the panel header to: Title and Close button.
Placing additional controls within a sub-header row.

That would solve many issues including providing enough space for the 'Show button text labels' preference. See #61761

Rough screenshots, from top to bottom:

  • Current.
  • Proposed, default preference.
  • Proposed, with 'Show button text labels' enabled.

Screenshot 2024-05-22 at 15 40 58

Specifically to the Styles panel header, worth reminding it uses also a 'small' version of the header that is meant to be rendered on small screens. The small version would likely be no longer necessary, allowing for some code simplification.

@joedolson
Copy link
Contributor

Agree with @afercia. Globally applied, this would be extremely valuable for clarifying the UI.

I think it would also be beneficial for development; having a visible heading that provides a name for the visible panel is extremely valuable for making reference to locations and components.

@DaniGuardiola
Copy link
Contributor

DaniGuardiola commented Jun 28, 2024

Hi there! As I said here, I think #62343 could be a great base for this change, since it unifies sidebars. I think this is a positive change, and I would like to see it land.

Question for the folks in this thread: What's blocking this, currently? How can I help unblock it?

If we get consensus around this, we can then take it into account when modeling the a11y story in #62343, and then add this as a fast-follow. Or even add it directly as part of that effort, since it's not a big change. Thanks @jeryj for bringing this to my attention.

@mtias
Copy link
Member

mtias commented Jul 1, 2024

I don't think this helps clarify the UI and instead makes a worse overall design. The close buttons are creating redundancy, interfering with the tabs, and increasing the weight of the panels in a considerable way. Can't we look at how to improve the toggle relationship instead without having to place things contiguously at the DOM?

@DaniGuardiola
Copy link
Contributor

DaniGuardiola commented Jul 1, 2024

@mtias after doing a deeper dive into this, I think I agree with you re: close buttons. However, there are some critical a11y concerns we need to address.

  • Ensuring a strong relationship between the disclosure button and the content, as you say, is important. Looking at the inserter and sidebar examples, they seem decent enough as they are to me (clear visual state, content is spatially close to the disclosure button, consistent so it can be learned once). I haven't looked at other instances yet. In any case, I'd be curious to hear any suggestions for improvements.
  • @afercia makes a very good point about the text labels setting, it shouldn't be broken. When that preference is enabled, all text should be readable. I think the "double header" approach could work when enabled, though I think it's fine as is when not enabled - section header with title and global section actions makes perfect sense to me. So let's solve the issue for the setting. In the future, it would be good to make sure to test these settings before shipping, as we shouldn't break the experience for disabled users.
  • Regarding titles, after playing with the UI a bit I'm not sure they'd be that useful. Of course, there should be a label for screen reader users, but for sighted users I feel like, as long as the disclosure buttons are properly labelled, there isn't a strong a11y case for them. This is especially true in the context of an experience where users end up learning the UI. In the short term, titles might slightly ease the learning curve, but in the longer term it may hurt the experience by adding clutter, which in turn adds to the cognitive load. An idea I just though of: if headings are still helpful to some users, we could always make the "show button text labels" option into a more general "show text labels" option, and also add these section titles when the setting is enabled. That way, the default experience remains simple while allowing users who want it to benefit from it.
@afercia
Copy link
Contributor

afercia commented Jul 1, 2024

I don't think this helps clarify the UI and instead makes a worse overall design.

Can you please add more context? In what way a visible title for all panels wouldn't help clarify?
I would argue that all panels in the editor UI should have a visible title. If a panel can't be named with a meaningful title that means the design of that panel has a big problem in the first place. Any feature or UI section should be clear and meaningful to be told by words, like telling a story to users and explaining in plain language what the feature/UI section is about.

The close buttons are creating redundancy, interfering with the tabs, and increasing the weight of the panels in a considerable way.

I'd agree. I'd just like to remind everyone that the Close buttons between the tabs and tab panels break the Tabs ARIA pattern and we need to remove them. See #59013.
This is a requirement, not just a subjective opinion. There must not be any content between tabs and tab panels.

Regarding the 'weight' of the UI, I'd just like to remind that many of these X close buttons are already there in the current UI. For example, I would say thie UI for the Styles panel beader brings in pretty much 'weigh' and it's not the best design in the first place:

current

A header that only contains the panel title and the close button would add more white space, making the UI cleaner, less confusing, and also more accessible. To me, additional controls should go separately in a 'subheader'.

@jeryj
Copy link
Contributor Author

jeryj commented Jul 1, 2024

Can't we look at how to improve the toggle relationship instead without having to place things contiguously at the DOM?

@mtias - Improving the relationship to of the open/close button to the panel it opens would need the toggle button and panel to be placed contiguously in the DOM. That would allow us to remove the close button, but may create other problems. I'm happy to explore this if it's something that has support as a valid way forwards. This issue discusses the idea in more detail.

@afercia
Copy link
Contributor

afercia commented Jul 1, 2024

Can't we look at how to improve the toggle relationship instead without having to place things contiguously at the DOM?

It is important to keep in mind that, while React provides an abstraction on top of the DOM, what actually matters for all users, their browsers, and the assistive technologies some users may use is still the DOM.

Anyways, I'd still strongly suggest to make all panels have a header with a visible title (a heading with an appropriate level). Any section of the UI should be identified by a meaningful heading.

@DaniGuardiola
Copy link
Contributor

Let me see if I understood correctly: the purpose of having these be contiguous in the DOM is so that the sidebar tab stops are placed right between the disclosure button and the next button in the toolbar, correct? If so, I'd be happy to attempt a simple programmatic solution that achieves this. That way, there's no need to alter the DOM but focus is managed appropriately.

@DaniGuardiola
Copy link
Contributor

Anyways, I'd still strongly suggest to make all panels have a header with a visible title (a heading with an appropriate level). Any section of the UI should be identified by a meaningful heading.

Would a visually hidden heading work? That way it'd cover screen reader users without altering the current design, which as I argued here seems good enough as-is.

@jeryj
Copy link
Contributor Author

jeryj commented Jul 1, 2024

If so, I'd be happy to attempt a simple programmatic solution that achieves this. That way, there's no need to alter the DOM but focus is managed appropriately.

I think moving it in the DOM would be the better long-term solution for this. I'd be concerned any programatic solution for tab keypresses wouldn't also work with a screen reader virtual cursor.

@afercia
Copy link
Contributor

afercia commented Jul 2, 2024

Would a visually hidden heading work? That way it'd cover screen reader users without altering the current design, which as I argued here seems good enough as-is.

@DaniGuardiola thanks for your thoughts and feedback. I don't think the current design helps building an application that is accessible and usable for everyone. WordPress is a pretty large web application that serves millions of users. Visually hidden headings would help only screen reader users. There's a multitute of other users needs that need to be taken into account.

Some of the arguments in the last point of #61553 (comment) are interesting but seems to me they are based on a visual approach rather than a functional one. I would need to write down a book to explain why, to me, most of those arguments aren't valid and I'm not sure a pull request comment is the right place for that book 😅

In the short term, titles might slightly ease the learning curve, but in the longer term it may hurt the experience by adding clutter, which in turn adds to the cognitive load

The main objection I feel like making is about the 'clutter' argument. It's 20 years I've been hearing designers and developers using the 'clutter' argument but that's an extremely subjective perception. An UI may be perceived as 'cluttered' by some users and may not by others. It's really about personal perception. Instead, content structure and information architecture are objective facts. I'm not sure I understand how adding visible headings may ever add cognitive load. I'd argue the opposite case, i.e. panels without headings, do add cognitive load because each time users open a panel they miss a visible confirmation they're in the right place.

Rather than basing this conversation on presonal opinions, I'd encourage everyone to do some research and have a look at the largest, most poopular web applications around and observe what they do with their panels. All the applications that are designed to serve millions of users I observed around do use visible headings for their panels. I could point to Google Docs, Google Drive, Microsoft Team, etx. but there's plenty of examples around. Panels with headings are so common in those web applications that I'd even call this pattern an industry standard. I'm not sure I understand why WordPress wants do reinvent the wheel, again, and go in the opposite direction by hiding or removing headings.

@afercia
Copy link
Contributor

afercia commented Jul 2, 2024

An idea I just though of: if headings are still helpful to some users, we could always make the "show button text labels" option into a more general "show text labels" option, and also add these section titles when the setting is enabled. That way, the default experience remains simple while allowing users who want it to benefit from it.

A few years ago, something similar was discussed regarding the purpose of the 'Spotlight mode' option and how to extend it. Currently, it is only meant to 'Focus on one block at a time'. At some point it was proposed to make it a switch to a 'lighter UI mode' instead. This isn't uncommon, for example Gmail does have layout options like 'Default', 'Comfortable', and 'Compact'. However, such kind of alternative UI modes would likely introduce complexity amd maintenance cost. It could be done but there should be some more rigorous design and development process as in:

  • Any design should provide... design for the default mode, the ligher mode and the 'Show buttons text label' preference.
  • All the components used in the editor UI should support these modes.
  • All these modes should be tested to prevent regressions and breakages.

That would be a huge effort. I'm not sure this project has the resources to achieve such a goal. Instead, making the UI accessible for everyone would be much simpler, as long as the design is made accessible since the beginning.

@scruffian
Copy link
Contributor

My understanding is that we are going to try this approach: #61837

so I'll close this PR for now.

@scruffian scruffian closed this Jul 5, 2024
@afercia
Copy link
Contributor

afercia commented Jul 8, 2024

My understanding is that we are going to try this approach: #61837

so I'll close this PR for now.

Even if #61837 would solve the Close button issue, it won't address other issues emerged in this PR discussion. For example:

  • All panels headers should clearly identify what the panel is about by a meaningful heading.
  • Panes headers should not contain other controls. A 'subheader' should be considered for that purposes. For example, I wouldn't say the current state of the Styles panel is great. In the screenshot below, I removed the Close button to better illustrate Consistent Sidebar DOM and Open/Closing Interactions #61837 won't solve all the problems:

Screenshot 2024-07-08 at 08 57 55

I'll try to summarize all the considerations from this PR in a new issue.

@scruffian
Copy link
Contributor

I'll try to summarize all the considerations from this PR in a new issue.

Thanks, I think that's a good way forward.

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). Needs Design Feedback Needs general design feedback. [Type] Bug An existing feature does not function as intended
9 participants