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

Adding messaging for open and closed states #10900

Merged
merged 13 commits into from
Oct 29, 2018

Conversation

ryanwelcher
Copy link
Contributor

@ryanwelcher ryanwelcher commented Oct 22, 2018

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:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.

Copy link
Member

@adamsilverstein adamsilverstein left a 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!

@gziolo gziolo added [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Type] Copy Issues or PRs that need copy editing assistance labels Oct 22, 2018
@gziolo gziolo added this to the 4.2 milestone Oct 22, 2018
@@ -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' );
Copy link
Member

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.

@ryanwelcher
Copy link
Contributor Author

@ocean90 I've pushed the requested changes.

@youknowriad
Copy link
Contributor

e2e tests are failing (we're probably still refering to the old label in some tests).

@jasmussen Thoughts on these changes?

@jasmussen
Copy link
Contributor

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:

  • Editor modes
  • Accessing the code editor
  • Plugin shortcuts
  • Tools like "Copy all content"
  • A link to a Keyboard Shortcuts cheatsheet
  • A link to an Options modal

Screenshot:

screenshot 2018-10-26 at 13 22 58

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:

docs tools menu

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".

@jasmussen
Copy link
Contributor

Perhaps one of these could work?

  • More tools & options
  • Help, tools & options
  • Preferences & more
  • Help & more
  • Help, settings & more

@ryanwelcher
Copy link
Contributor Author

@jasmussen thanks for the feedback. Personally, I like the first option.

Just to confirm this will look like the following

Closed state: Show more tools & options
Open state: Hide more tools & options

If everyone concerned is OK with that, I'm happy to make the change ASAP.

@ryanwelcher
Copy link
Contributor Author

ryanwelcher commented Oct 26, 2018

e2e tests are failing (we're probably still refering to the old label in some tests).

@youknowriad I updated the snapshot and my local tests are passing - is there another step that I missed to get the tests passing?

@ryanwelcher
Copy link
Contributor Author

ryanwelcher commented Oct 26, 2018

As a follow-up, I believe I need to update the selectors in the test/e2e/spec directory to match the copy change we decide on here

For example the selector here - https://github.com/WordPress/gutenberg/blob/master/test/e2e/specs/nux.test.js#L139

@ryanwelcher
Copy link
Contributor Author

I've made the copy change indicated and updated the tests instances.

@youknowriad youknowriad added the Needs Copy Review Needs review of user-facing copy (language, phrasing) label Oct 29, 2018
Copy link
Contributor

@youknowriad youknowriad left a 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.

@youknowriad youknowriad merged commit cafa221 into WordPress:master Oct 29, 2018
@mikedang
Copy link

Closed state: Show more tools & options
Open state: Hide more tools & options

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".

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 Copy Review Needs review of user-facing copy (language, phrasing) [Type] Copy Issues or PRs that need copy editing assistance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Secondary settings button missing descriptive text
7 participants