Skip to content

Commit

Permalink
Improve the style variation control aria-label (WordPress#11045)
Browse files Browse the repository at this point in the history
* Improve the style variation control aria-label.

* Further simplify the aria-label to just use the style label or name.
  • Loading branch information
afercia authored and antpb committed Oct 26, 2018
1 parent 30cd739 commit 6623224
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/editor/src/components/block-styles/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import classnames from 'classnames';
import { compose } from '@wordpress/compose';
import { withSelect, withDispatch } from '@wordpress/data';
import { getBlockType } from '@wordpress/blocks';
import { __, sprintf } from '@wordpress/i18n';
import TokenList from '@wordpress/token-list';
import { ENTER, SPACE } from '@wordpress/keycodes';

Expand Down Expand Up @@ -107,7 +106,7 @@ function BlockStyles( {
onMouseLeave={ () => onHoverClassName( null ) }
role="button"
tabIndex="0"
aria-label={ sprintf( __( 'Apply style variation "%s"' ), style.label || style.name ) }
aria-label={ style.label || style.name }
>
<div className="editor-block-styles__item-preview">
<BlockPreviewContent
Expand Down

0 comments on commit 6623224

Please sign in to comment.