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

Improve accessibility of the templates list Actions column #42555

Closed
wants to merge 5 commits into from

Conversation

afercia
Copy link
Contributor

@afercia afercia commented Jul 20, 2022

Fixes #42505

What?

Changes the Actions button in the templates list to use text instead of only an icon. Also makes the column header visible to as there's no reason to hide it.

Why?

The ellipsis icon of the Actions button is barely visible for low vision users. In other places, for example in the block toolbar, the ellipsis icon is more visible because of the context and the borders. Instead, in the templates list is very light.

From an accessibility perspective, the golden rule for 'icon-only' buttons should be: use them only when there's really no space to use visible text. In this case, there's enough space to use tedxt and there's no reason to use only an icon.

How?

  • Changes the dropdown menu toggle button to use visible text + a chevron icon instead of only the ellipsis icon.
  • Makes the column header text visible and changes it from 'Actions' to 'Manage' to avoid repetition.
  • Removes the flex styles used for the column. This is necessary to make the column header text and the buttons within the cells align correctly. I'm not sure why flexbox was used in the first place.
  • Since this is a data table, make sure to not have empty cells and use visually hidden text for the 'no actions' case.

Testing Instructions

  • Go to the Site Editor.
  • Make sure to have a default template with some customization and a custom template.
  • Click Toggle navigation, and then click Templates.
  • Observe the third column header text is now visible.
  • Observe the customized templates have a button in the third column. The button text is 'Actions' plus a chevron icon.
  • Observe the templates with no actions available have an icon representing a line in the third column and that there's a visually hidden text 'No actions available'. This pattern is consistent with the one already used in the WordPress list tables.
  • Check there are no breaking style changes.
  • Worth noting this table was not fully responsive already. The CSS changes don't improve responsiveness but seems to me they don't make it worse either.

Screenshots or screencast

Before:

before

After:

after

@afercia afercia added [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Package] Edit Site /packages/edit-site labels Jul 20, 2022
@Mamaduka Mamaduka requested a review from jameskoster July 20, 2022 10:24
@github-actions
Copy link

github-actions bot commented Jul 20, 2022

Size Change: +39 B (0%)

Total Size: 1.37 MB

Filename Size Change
build/edit-site/index.min.js 64.6 kB +55 B (0%)
build/edit-site/style-rtl.css 10.1 kB -9 B (0%)
build/edit-site/style.css 10.1 kB -7 B (0%)
ℹ️ View Unchanged
Filename Size
build/a11y/index.min.js 993 B
build/annotations/index.min.js 2.78 kB
build/api-fetch/index.min.js 2.27 kB
build/autop/index.min.js 2.15 kB
build/blob/index.min.js 483 B
build/block-directory/index.min.js 7.2 kB
build/block-directory/style-rtl.css 1.04 kB
build/block-directory/style.css 1.04 kB
build/block-editor/content-rtl.css 4.17 kB
build/block-editor/content.css 4.17 kB
build/block-editor/default-editor-styles-rtl.css 403 B
build/block-editor/default-editor-styles.css 403 B
build/block-editor/index.min.js 203 kB
build/block-editor/style-rtl.css 15.1 kB
build/block-editor/style.css 15.1 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 138 B
build/block-library/blocks/audio/theme.css 138 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 91 B
build/block-library/blocks/avatar/style.css 91 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 587 B
build/block-library/blocks/button/editor.css 587 B
build/block-library/blocks/button/style-rtl.css 628 B
build/block-library/blocks/button/style.css 627 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 409 B
build/block-library/blocks/columns/style.css 409 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 649 B
build/block-library/blocks/cover/editor.css 651 B
build/block-library/blocks/cover/style-rtl.css 1.61 kB
build/block-library/blocks/cover/style.css 1.6 kB
build/block-library/blocks/details-summary/editor-rtl.css 65 B
build/block-library/blocks/details-summary/editor.css 65 B
build/block-library/blocks/details-summary/style-rtl.css 61 B
build/block-library/blocks/details-summary/style.css 61 B
build/block-library/blocks/details/style-rtl.css 54 B
build/block-library/blocks/details/style.css 54 B
build/block-library/blocks/embed/editor-rtl.css 293 B
build/block-library/blocks/embed/editor.css 293 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 138 B
build/block-library/blocks/embed/theme.css 138 B
build/block-library/blocks/file/editor-rtl.css 300 B
build/block-library/blocks/file/editor.css 300 B
build/block-library/blocks/file/style-rtl.css 269 B
build/block-library/blocks/file/style.css 270 B
build/block-library/blocks/file/view.min.js 353 B
build/block-library/blocks/freeform/editor-rtl.css 2.44 kB
build/block-library/blocks/freeform/editor.css 2.44 kB
build/block-library/blocks/gallery/editor-rtl.css 984 B
build/block-library/blocks/gallery/editor.css 988 B
build/block-library/blocks/gallery/style-rtl.css 1.55 kB
build/block-library/blocks/gallery/style.css 1.55 kB
build/block-library/blocks/gallery/theme-rtl.css 122 B
build/block-library/blocks/gallery/theme.css 122 B
build/block-library/blocks/group/editor-rtl.css 654 B
build/block-library/blocks/group/editor.css 654 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 76 B
build/block-library/blocks/heading/style.css 76 B
build/block-library/blocks/html/editor-rtl.css 340 B
build/block-library/blocks/html/editor.css 341 B
build/block-library/blocks/image/editor-rtl.css 830 B
build/block-library/blocks/image/editor.css 829 B
build/block-library/blocks/image/style-rtl.css 652 B
build/block-library/blocks/image/style.css 652 B
build/block-library/blocks/image/theme-rtl.css 137 B
build/block-library/blocks/image/theme.css 137 B
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 266 B
build/block-library/blocks/media-text/editor.css 263 B
build/block-library/blocks/media-text/style-rtl.css 507 B
build/block-library/blocks/media-text/style.css 505 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 716 B
build/block-library/blocks/navigation-link/editor.css 715 B
build/block-library/blocks/navigation-link/style-rtl.css 115 B
build/block-library/blocks/navigation-link/style.css 115 B
build/block-library/blocks/navigation-submenu/editor-rtl.css 299 B
build/block-library/blocks/navigation-submenu/editor.css 299 B
build/block-library/blocks/navigation/editor-rtl.css 2.13 kB
build/block-library/blocks/navigation/editor.css 2.14 kB
build/block-library/blocks/navigation/style-rtl.css 2.22 kB
build/block-library/blocks/navigation/style.css 2.21 kB
build/block-library/blocks/navigation/view-modal.min.js 2.81 kB
build/block-library/blocks/navigation/view.min.js 447 B
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 401 B
build/block-library/blocks/page-list/editor.css 401 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 174 B
build/block-library/blocks/paragraph/editor.css 174 B
build/block-library/blocks/paragraph/style-rtl.css 279 B
build/block-library/blocks/paragraph/style.css 281 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 501 B
build/block-library/blocks/post-comments-form/style.css 501 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 588 B
build/block-library/blocks/post-featured-image/editor.css 586 B
build/block-library/blocks/post-featured-image/style-rtl.css 322 B
build/block-library/blocks/post-featured-image/style.css 322 B
build/block-library/blocks/post-navigation-link/style-rtl.css 153 B
build/block-library/blocks/post-navigation-link/style.css 153 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 281 B
build/block-library/blocks/post-template/style.css 281 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 103 B
build/block-library/blocks/preformatted/style.css 103 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 335 B
build/block-library/blocks/pullquote/style.css 335 B
build/block-library/blocks/pullquote/theme-rtl.css 167 B
build/block-library/blocks/pullquote/theme.css 167 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 463 B
build/block-library/blocks/query/editor.css 463 B
build/block-library/blocks/quote/style-rtl.css 222 B
build/block-library/blocks/quote/style.css 222 B
build/block-library/blocks/quote/theme-rtl.css 223 B
build/block-library/blocks/quote/theme.css 226 B
build/block-library/blocks/read-more/style-rtl.css 132 B
build/block-library/blocks/read-more/style.css 132 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 165 B
build/block-library/blocks/search/editor.css 165 B
build/block-library/blocks/search/style-rtl.css 408 B
build/block-library/blocks/search/style.css 406 B
build/block-library/blocks/search/theme-rtl.css 114 B
build/block-library/blocks/search/theme.css 114 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 234 B
build/block-library/blocks/separator/style.css 234 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 329 B
build/block-library/blocks/shortcode/editor.css 329 B
build/block-library/blocks/site-logo/editor-rtl.css 489 B
build/block-library/blocks/site-logo/editor.css 489 B
build/block-library/blocks/site-logo/style-rtl.css 203 B
build/block-library/blocks/site-logo/style.css 203 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 674 B
build/block-library/blocks/social-links/editor.css 673 B
build/block-library/blocks/social-links/style-rtl.css 1.4 kB
build/block-library/blocks/social-links/style.css 1.39 kB
build/block-library/blocks/spacer/editor-rtl.css 359 B
build/block-library/blocks/spacer/editor.css 359 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 433 B
build/block-library/blocks/table/editor.css 433 B
build/block-library/blocks/table/style-rtl.css 651 B
build/block-library/blocks/table/style.css 650 B
build/block-library/blocks/table/theme-rtl.css 157 B
build/block-library/blocks/table/theme.css 157 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 404 B
build/block-library/blocks/template-part/editor.css 404 B
build/block-library/blocks/template-part/theme-rtl.css 101 B
build/block-library/blocks/template-part/theme.css 101 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 179 B
build/block-library/blocks/video/style.css 179 B
build/block-library/blocks/video/theme-rtl.css 139 B
build/block-library/blocks/video/theme.css 139 B
build/block-library/classic-rtl.css 179 B
build/block-library/classic.css 179 B
build/block-library/common-rtl.css 1.12 kB
build/block-library/common.css 1.12 kB
build/block-library/editor-elements-rtl.css 75 B
build/block-library/editor-elements.css 75 B
build/block-library/editor-rtl.css 11.6 kB
build/block-library/editor.css 11.6 kB
build/block-library/elements-rtl.css 54 B
build/block-library/elements.css 54 B
build/block-library/index.min.js 204 kB
build/block-library/reset-rtl.css 478 B
build/block-library/reset.css 478 B
build/block-library/style-rtl.css 12.8 kB
build/block-library/style.css 12.8 kB
build/block-library/theme-rtl.css 698 B
build/block-library/theme.css 703 B
build/block-serialization-default-parser/index.min.js 1.13 kB
build/block-serialization-spec-parser/index.min.js 2.83 kB
build/blocks/index.min.js 51.1 kB
build/commands/index.min.js 14.8 kB
build/commands/style-rtl.css 789 B
build/commands/style.css 786 B
build/components/index.min.js 208 kB
build/components/style-rtl.css 11.7 kB
build/components/style.css 11.7 kB
build/compose/index.min.js 12.4 kB
build/core-data/index.min.js 16.3 kB
build/customize-widgets/index.min.js 12.2 kB
build/customize-widgets/style-rtl.css 1.41 kB
build/customize-widgets/style.css 1.41 kB
build/data-controls/index.min.js 718 B
build/data/index.min.js 8.68 kB
build/date/index.min.js 40.4 kB
build/deprecated/index.min.js 518 B
build/dom-ready/index.min.js 336 B
build/dom/index.min.js 4.76 kB
build/edit-post/classic-rtl.css 571 B
build/edit-post/classic.css 571 B
build/edit-post/index.min.js 35 kB
build/edit-post/style-rtl.css 7.63 kB
build/edit-post/style.css 7.63 kB
build/edit-widgets/index.min.js 17.3 kB
build/edit-widgets/style-rtl.css 4.56 kB
build/edit-widgets/style.css 4.56 kB
build/editor/index.min.js 45.9 kB
build/editor/style-rtl.css 3.49 kB
build/editor/style.css 3.48 kB
build/element/index.min.js 4.95 kB
build/escape-html/index.min.js 548 B
build/format-library/index.min.js 7.26 kB
build/format-library/style-rtl.css 557 B
build/format-library/style.css 556 B
build/hooks/index.min.js 1.66 kB
build/html-entities/index.min.js 454 B
build/i18n/index.min.js 3.79 kB
build/is-shallow-equal/index.min.js 535 B
build/keyboard-shortcuts/index.min.js 1.79 kB
build/keycodes/index.min.js 1.94 kB
build/list-reusable-blocks/index.min.js 2.14 kB
build/list-reusable-blocks/style-rtl.css 865 B
build/list-reusable-blocks/style.css 865 B
build/media-utils/index.min.js 2.99 kB
build/notices/index.min.js 977 B
build/plugins/index.min.js 1.94 kB
build/preferences-persistence/index.min.js 2.23 kB
build/preferences/index.min.js 1.35 kB
build/primitives/index.min.js 960 B
build/priority-queue/index.min.js 1.52 kB
build/private-apis/index.min.js 942 B
build/react-i18n/index.min.js 702 B
build/react-refresh-entry/index.min.js 8.44 kB
build/react-refresh-runtime/index.min.js 7.31 kB
build/redux-routine/index.min.js 2.75 kB
build/reusable-blocks/index.min.js 2.26 kB
build/reusable-blocks/style-rtl.css 265 B
build/reusable-blocks/style.css 265 B
build/rich-text/index.min.js 11.1 kB
build/server-side-render/index.min.js 2.09 kB
build/shortcode/index.min.js 1.52 kB
build/style-engine/index.min.js 1.55 kB
build/token-list/index.min.js 650 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.8 kB
build/vendors/react.min.js 4.02 kB
build/viewport/index.min.js 1.09 kB
build/warning/index.min.js 280 B
build/widgets/index.min.js 7.3 kB
build/widgets/style-rtl.css 1.18 kB
build/widgets/style.css 1.18 kB
build/wordcount/index.min.js 1.06 kB

compressed-size-action

@jameskoster jameskoster requested a review from a team July 20, 2022 13:10
@jameskoster
Copy link
Contributor

jameskoster commented Jul 20, 2022

I think there's a general usability consideration here, additional the a11y issues. Ellipsis icon buttons that open an option / action menu is a fairly well established convention in the Editor. It appears in the document toolbar, block toolbar, list view, global styles, design tools, etc. It might be good to explore a solution that fits all uses these cases and maintains holistic consistency / predictability.

One option could be to have these buttons respect the 'Show button text labels' option in the Editor, so that they switch to text when appropriate? I appreciate that doesn't necessarily help low-vision users, but perhaps there are other approaches to look at?

I noticed in the PR that the horizontal stroke between rows has disappeared, which doesn't seem to be intentional?

cc @javierarce since I know you've been looking at control designs for #39082.

@afercia
Copy link
Contributor Author

afercia commented Jul 21, 2022

@jameskoster thanks for your feedback. I'm not sure this is a case where the 'Show button text labels' option would fit. The 'icon-only' buttons issue has been discussed at length and I do realize is a bit controversial. As general accessibility (and I's say also usability) principle, visible text is preferable because it works for all users. 'icon-only' buttons should only be used when there's not enough space for text.

TL:DR
A few more considerations:

Ellipsis icon buttons that open an option / action menu is a fairly well established convention in the Editor. It appears in the document toolbar, block toolbar, list view, global styles, design tools, etc.

I think the ellipsis icon buttons are sometimes used in a slightly inconsistent way in the Editor. To me, the 'ellipsis' means 'More stuff', that is: a menu with (less often used) controls in addition to a set of other controls. The concept of 'more' makes perfectly sense in the context of a toolbar, where there's a set of controls displayed by default and then there's a 'More' button that groups other controls in a menu. This applies for example to the document toolbar, the block toolbar and the like.

Instead, to me, the ellipsis doesn't make much sense when used 'in isolation', as there are no other controls where the ellipsis button is supposed to add 'more' things to. This applies, for example, to the list view, global styles, and the template details popover, where the ellipsis just opens a menu with options / actions. In that context, the button has a more generic meaning on 'Options / Actions' and maybe it should use a different icon.

In fact, in other places of the UI, options / actions menus use other icons (the cog icon, for example).

I'd think a more important usability issue, as mentioned in #42505, is that the dropdown menu is used even when it contains only one item:

only one item

In this case, a dropdown menu doesn't seem appropriate in the first place, because it forces users to unnecessarily click twice. That's not a great experience for users. When there's only one action, there should be just a button for that action, not a dropdown. This consideration is unrelated to this PR though and I'll create a separate issue, but it does have an impact on the ellipsis button.

Lastly, I think the pattern 'text + chevron icon' is not new in the Editor and it's probably more usable than the ellipsis button.

@javierarce
Copy link
Contributor

I agree that using an ellipsis is difficult to justify in this case, and a dropdown with just one item is frustrating.

If we just have two actions (and not for every case) could we consider a text-based approach? It's less scalable, but it could work for the time being.

image

In this case, we wouldn't need to indicate 'No actions available', because the distinction would be clear.

Another thing we could do in addition to this change is to group the templates into editable and not editable ones. It would probably require explaining the distinction, but here's a quick example of what I mean:

image

@jameskoster
Copy link
Contributor

We're not far away from suggesting the Post Actions UI from wp-admin at this point :D

Screenshot 2022-07-21 at 18 01 08

One potential issue with just listing the links however, is accommodating the 'Clear customizations' button which is fairly long and includes a description:

Screenshot 2022-07-21 at 18 03 15

It could be worth exploring how all the combinations of links fit in, and how everything stacks up on small screens.


I think there could be something to the idea of separating the different template types (unedited, customized, user-generated), but wonder if that's something to do via filtering rather an a permanent layout configuration 🤔

@jameskoster
Copy link
Contributor

I appreciate this goes way beyond the scope of this issue, but perhaps a card-style layout with previews could work better than the current table?

Screenshot 2022-07-21 at 19 15 41

It's easy to imagine the number of columns expanding / contracting according to screen size.

@paaljoachim
Copy link
Contributor

@jameskoster That is interesting! It could perhaps show a thumbnail of what the template looks like! Card views really gives a much better overview of each template. An approach that can be further explored!

@afercia
Copy link
Contributor Author

afercia commented Jul 25, 2022

Thanks all for your feedback.

While a table would be semantically more appropriate to represent the templates data, I'd agree it's worth exploring a new design.

The data table isn't used in a 100% correct way in the first place because each data type (name, description, added by, status) should go in a separate column. In its first implementation in #36379, it was a <ul> list, styled like a table. It was then changed to a <table> element in #36707 but at that point the table cells contained data of mixed type. The template 'source' and customized info were added in #36763. As the cell data are a bit 'mixed', I'd tend to think using a table adds little value from an a11y perspective.

Aside: worth reminding this isn't the only place in the Editor where a dropdown menu with only one item is used. I'll create a new 'discussion' issue mentioning this PR

@afercia
Copy link
Contributor Author

afercia commented Jul 26, 2022

Re: the dropdown issue, see discussion at #42666

@paaljoachim
Copy link
Contributor

Adding in this associated issue:
[Site Editor] Templates list screen - Adding duplicate to 3 dot menu.
#36665

@afercia
Copy link
Contributor Author

afercia commented Feb 6, 2023

Looking back into this, these action buttons are still barely visible.
@jameskoster @javierarce I appreciate your insights and feedback. When you have a chance, it would be great to find a solution for this issue. The simpler, the better 🙂 🙏

@aristath aristath added Needs Design Feedback Needs general design feedback. Needs Design Needs design efforts. labels Feb 22, 2023
@aristath aristath requested review from a team and removed request for a team March 29, 2023 10:14
@afercia afercia force-pushed the fix/templates-browser-actions-column branch from a8f06ca to ef316e9 Compare April 12, 2023 07:28
@github-actions
Copy link

github-actions bot commented Apr 12, 2023

Flaky tests detected in 2c2e739.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/4743637274
📝 Reported issues:

Copy link
Member

@aristath aristath left a comment

Choose a reason for hiding this comment

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

The code looks good and makes sense.
The new interface reduces cognitive load for me so personally I'd consider this one ready to be merged and a great improvement.
This looks OK to me to be merged so I'll go ahead and approve it but we'll also need some feedback from @WordPress/gutenberg-design before merging it or taking any further action 👍

@jameskoster
Copy link
Contributor

I don't have a strong opinion either way, so happy to defer to other designers. I suspect we'll need to revisit the design for actions when we add bulk editing.

Some minor points:

The stroke beneath each row in the table has vanished. It would be nice to reinstate that.

Padding on the button looks a bit awkward to me:

Screenshot 2023-04-12 at 12 08 35

The space on the right appears much larger than the left. Not sure if that's something to 'fix' here, or on the component itself.

Is the in empty action cells necessary? It seems like the lack of a button could be adequate?

@jasmussen
Copy link
Contributor

Agreed, the "Actions" button is not a pattern we use anywhere else, whereas the ellipsis menu is. I recognize the intent of this issue and don't disagree that we need improvement, but I don't think this is the right way to go about it.

@afercia afercia force-pushed the fix/templates-browser-actions-column branch from 09a024e to 2c2e739 Compare April 19, 2023 13:03
@aristath
Copy link
Member

aristath commented Apr 20, 2023

Agreed, the "Actions" button is not a pattern we use anywhere else, whereas the ellipsis menu is. I recognize the intent of this issue and don't disagree that we need improvement, but I don't think this is the right way to go about it.

I agree, the "Actions" menu is not something we use anywhere. But perhaps we should? If not "Actions", then something else. What we currently have is beautiful for people with perfect vision who can see 3 tiny dots on the screen, but for everyone else it's less than ideal (myself included and I'm just a bit myopic like 30+% of the world).

@jasmussen Any ideas on alternative approaches for this? Suggestions on what we can use to improve the current UI?

@jarekmorawski
Copy link
Contributor

Hi there! A WooCommerce designer here. I understand the concerns about the accessibility of the ellipsis button. No solution is perfect, but the way I see it, sticking to the ellipsis can be beneficial in the long term. The templates screen will likely set the foundations for other tables across wp-admin, WooCommerce, and other plugins—many of which are similar to or more complex than WordPress.

Extensions like WooCommerce need space to show the information the merchants need to make business decisions. We have multiple data-heavy tables, like products, orders, transactions, and subscriptions.

The ellipsis menu takes up little space and lets us display more information without forcing the user to scroll horizontally (or hide columns). It also lets us reduce complexity by hiding less common actions when they are not needed (for example, you can perform ~25 actions on each WooCommerce product).

This information is crucial, so the extra space we get by not using a regular button greatly helps. Here's how the products list in WooCommerce could look if the Templates list grew into becoming its own component shared across the platform (note that it's a WIP mockup; products come from MUJI).

Products

I've explored using the Actions button instead. With up to 100 products shown on the page simultaneously, the cognitive strain caused by added complexity and repeated information seemed just as significant.

Perhaps we could mitigate some accessibility issues by making the whole item row interactive? Clicking it would take you to the editor, so you would only need to use the ellipsis to perform a specific, less-common action.

@afercia
Copy link
Contributor Author

afercia commented Aug 30, 2023

sticking to the ellipsis can be beneficial in the long term

I'd kindly disagree. It really depends on the way an ellipsis button is used and in what context.

Conceptually

Ellipsis buttons are commonly used in many software. It's a common pattern to logically indicate 'More' options, settings, whatever. The key point here is the concept of 'More', which inherently assumes there is something before the 'more'. In fact, in all the major software I can think of, ellipsis 'more' button are used toghether with other UI controls and usually at the end of a series of controls. That's what 'more' means: a series of controls, buttons and the like, and then a 'more' with the less commonly used controls.

based on the above, by its own nature an ellipsis button should only be used within a series of other controls.

Instead, in the editor is now used everywhere. Often in isolation, as in: there's only the ellipsis button and no other controls before. This usage goes against the concept of 'more'. I'd argue that when used in isolation an ellipsis button is no longer a 'more', instead it's something else. As such, it brings in a different logical concept and it should not be represented by an ellipsis icon.

Visually

When used in isolation, literally in the middle of a white space with no other controls or shapes around it, the editor ellipsis icon is barely visible for users with vision impairments. I do have vision impairments and I can't see this button. It's just three thin dots in the middle of a white space, I can't perceive these three thin dots and as such I really strugle to use this button.

It's important to understand the context matters a lot. Consider the 4 different cases illustrated in the screenshot below:

ellipsis button in context
  1. Ellipsis 'Options' button at the right side of the editor top bar.
  2. Ellipsis 'Options' button within a block toolbar.
  3. Ellipsis 'Options' button within the block toolbar with the 'Top toolbar' mode enabled. Note that the top toolbar has now changed and it renders in a single row, but this is still a valid example for our purposes.
  4. Ellipsis 'Actions' button in the Templates list.

For users with vision impairments, these 4 cases are very different. The ability to perceive the ellipsis icon also depends on the context as in: surrounding controls or borders or other shapes that help with visually perceiving the button.

Based on my (admittedly anectodical) experience:

  1. There are other buttons before the the ellipsis. This helps 'driving' my vision and helps perceiving the eellipsis dots but still isn't that great.
  2. The block toolbar buttons and more importantly the visible borders greatly help. I would say this is the case where I can better perceive the ellipsis.
  3. Although there are buttons and borders, the color of the borders is a lighter gray. I struggle to perceive the ellipsis.
  4. This is the worts case. The ellipsis button is literally placed in the middle of a white space with no other controls or borders around it. Also, it is on the extreme right side, which doesn't help. I really can't see this button unless I get at a very short distance from my screen. This usage is seriously problematic for any user with vision impairment and it's just a bad practice.

Ellispis Proliferation

I'd also like to highlight that the ellipsis button is now broadly used across the editor, too broadly in my opinion. There are scenarios when multiple ellipsis buttons are visible at the some moment in the user interface. Consider the screenshot below:

many ellipsis buttons at the same time

Up to 5 (maybe more) ellipsis buttons can be visible at the same time. I'm not sure this contributes in any wway to a good user experience. It's just confusing.

Semantiics / Predictability

An icon button should visually represent what it does. The underlying action / tool should always be the same, so that users understand on the fly what the button is meant for. The concept of 'more' would fit with this need. However, in the editor the ellipsis button is actually used for the most varied purposes. As said earlier, it's no longer a 'more'. it's something else and I'd argue the inconsistent usage is any good for users. A few examples of the actions / features the ellipsis button is used for based on its labeling:

  • Options (top bar)
  • Styles actions
  • Options for Post template
  • Options for Columns
  • Options (block toolbar)
  • Actions (in the templates list)

@afercia
Copy link
Contributor Author

afercia commented Nov 29, 2023

I'm going to close this PR for two reasons:

  • The templates list is going to be re-implemented with Data Views. As an aside, the Data Views also include a 'grid' layout as it was mentioned in the above comments. See all work on the Data Views here: https://github.com/WordPress/gutenberg/labels/%5BFeature%5D%20Data%20Views
  • The ellipsis button is still a problem when used in isolation. However, this is now a pattern that is used in several places in the editor. As such, it's now a much broader issue that warrants a broader discussion. I'll create a new issue.

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. Needs Design Needs design efforts. [Package] Edit Site /packages/edit-site
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve the accessibility of the Templates browser 'Actions' column
7 participants