-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Adding messaging for open and closed states #10900
Conversation
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.
Looks good to me!
@@ -14,6 +14,9 @@ import ToolsMoreMenuGroup from '../tools-more-menu-group'; | |||
import OptionsMenuItem from '../options-menu-item'; | |||
import WritingMenu from '../writing-menu'; | |||
|
|||
const ariaClosed = _x( 'Show additional settings', 'button to expand options' ); |
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.
There's no need for adding a context here since both strings are only used once.
@ocean90 I've pushed the requested changes. |
e2e tests are failing (we're probably still refering to the old label in some tests). @jasmussen Thoughts on these changes? |
This is a cool PR, and I have no interface design wise issue with it, and it solves an issue. I want to note that there was relatively great controversy when this menu was named. "More Menu" is what it's referred to in UI blueprints and documentation. But does this name need to be surfaced in the UI? The Block Library isn't surfaced as the "Block Library" anywhere in the UI, its help text says "Add block". So in that vein, this seems okay to me. However the phrasing seems like it could use a little tuning. That menu is not only for "Additional settings". It's for quite a few different things:
Screenshot: As such, simply labelling this as "additional settings" seems imprecise. I defer to those of you better versed in aria intricacies than me, but this is a menu, and it is in part designed with Google Docs menus as its inspiration. In that vein, here's the Google Docs tools menu markup when it's opened and closed: The label does not change on open/close — not that i mind it doing so here — but worth noting regardless, in case it can help inspire a better label. I would prefer we do not end up with something like "Show additional settings, tools, editing modes, help and options". |
Perhaps one of these could work?
|
@jasmussen thanks for the feedback. Personally, I like the first option. Just to confirm this will look like the following Closed state: If everyone concerned is OK with that, I'm happy to make the change ASAP. |
@youknowriad I updated the snapshot and my local tests are passing - is there another step that I missed to get the tests passing? |
As a follow-up, I believe I need to update the selectors in the For example the selector here - https://github.com/WordPress/gutenberg/blob/master/test/e2e/specs/nux.test.js#L139 |
I've made the copy change indicated and updated the tests instances. |
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.
LGTM 👍 Let's merge if the tests pass.
The copy makes sense and looks good to me. I would avoid using the ampersand here — use "and" instead: "Show more tools and options" and "Hide more tools and options". |
Description
This PR adds more descriptive aria-labels for the open and closed states for the Secondary Settings button and fixes #7203
How has this been tested?
I followed the steps to reproduce in the corresponding issue.
Types of changes
Bug fix (non-breaking change which fixes an issue)
Checklist: