Skip to content

Improve the style variation control aria-label#11045

Merged
afercia merged 2 commits intomasterfrom
update/style-variation-aria-label
Oct 25, 2018
Merged

Improve the style variation control aria-label#11045
afercia merged 2 commits intomasterfrom
update/style-variation-aria-label

Conversation

@afercia
Copy link
Copy Markdown
Contributor

@afercia afercia commented Oct 25, 2018

Fixes #11044.

The accessible name of an UI control should match (or at least start with) the visible label. For more details please refer to the related issue #11044.

  • changes the aria-label from Apply style variation "%s" to %s style
  • this way, the visible label is at the beginning of the accessible name
  • simplifies the wording, "apply" and "variation" are a bit redundant: we're already in a group identified as "Block Styles" so simplifying to, for example "Regular style" and "Large style", reduces noise for screen reader users
  • adds a missing translators comment

From a l10n perspective, the variable at the beginning may not be ideal but it's essential for a11y reasons. I also wonder if we should add some info in the translators comment to inform translators to not move the variable and keep it at the beginning. /Cc @SergeyBiryukov @ocean90

@afercia afercia added the [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). label Oct 25, 2018
@ocean90
Copy link
Copy Markdown
Member

ocean90 commented Oct 25, 2018

If it's that essential we should probably only use the actual label of the style for aria-label without any suffix.

@afercia
Copy link
Copy Markdown
Contributor Author

afercia commented Oct 25, 2018

@ocean90 thanks, makes sense. The panel title "Block Styles" will be always announced so repeating "style" is a bit pointless.

@ocean90 ocean90 added this to the 4.2 milestone Oct 25, 2018
@afercia afercia merged commit 8431f90 into master Oct 25, 2018
@afercia afercia deleted the update/style-variation-aria-label branch October 25, 2018 11:43
antpb pushed a commit to antpb/gutenberg that referenced this pull request Oct 26, 2018
* Improve the style variation control aria-label.

* Further simplify the aria-label to just use the style label or name.
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).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants