-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Conversation
Size Change: +39 B (0%) Total Size: 1.37 MB
ℹ️ View Unchanged
|
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. |
@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
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: 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. |
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. 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: |
We're not far away from suggesting the Post Actions UI from wp-admin at this point :D One potential issue with just listing the links however, is accommodating the 'Clear customizations' button which is fairly long and includes a description: 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 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! |
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 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 |
Re: the dropdown issue, see discussion at #42666 |
Adding in this associated issue: |
Looking back into this, these action buttons are still barely visible. |
a8f06ca
to
ef316e9
Compare
Flaky tests detected in 2c2e739. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/4743637274
|
There was a problem hiding this 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 👍
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: 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 |
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. |
09a024e
to
2c2e739
Compare
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? |
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). I've explored using the 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. |
I'm going to close this PR for two reasons:
|
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?
Testing Instructions
Screenshots or screencast
Before:
After: