Skip to content

Commit

Permalink
Accessibility: Adding a label to the edit image buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed Jul 3, 2017
1 parent 9ef4572 commit 73ef120
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion blocks/library/cover-image/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,10 @@ registerBlockType( 'core/cover-image', {
<Toolbar>
<li>
<MediaUploadButton
buttonProps={ { className: 'components-icon-button components-toolbar__control' } }
buttonProps={ {
className: 'components-icon-button components-toolbar__control',
'aria-label': __( 'Edit image' ),
} }
onSelect={ onSelectImage }
type="image"
value={ id }
Expand Down
5 changes: 4 additions & 1 deletion blocks/library/image/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,10 @@ registerBlockType( 'core/image', {
<Toolbar>
<li>
<MediaUploadButton
buttonProps={ { className: 'components-icon-button components-toolbar__control' } }
buttonProps={ {
className: 'components-icon-button components-toolbar__control',
'aria-label': __( 'Edit image' ),
} }
onSelect={ onSelectImage }
type="image"
value={ id }
Expand Down

0 comments on commit 73ef120

Please sign in to comment.