Skip to content

Commit

Permalink
Search block: Add aria-label to all inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
noisysocks committed Feb 1, 2019
1 parent fb9b790 commit 0d3fb09
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/block-library/src/search/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ export default function SearchEdit( { className, attributes, setAttributes } ) {
<div className={ className }>
<RichText
wrapperClassName="wp-block-search__label"
aria-label={ __( 'Label text' ) }
placeholder={ __( 'Add label' ) }
keepPlaceholderOnFocus
formattingControls={ [] }
Expand All @@ -19,14 +20,15 @@ export default function SearchEdit( { className, attributes, setAttributes } ) {
/>
<input
className="wp-block-search__input"
aria-label={ __( 'Optional placeholder' ) }
aria-label={ __( 'Optional placeholder text' ) }
placeholder={ __( 'Optional placeholder' ) }
value={ placeholder }
onChange={ ( event ) => setAttributes( { placeholder: event.target.value } ) }
/>
<RichText
wrapperClassName="wp-block-search__button"
className="wp-block-search__button-rich-text"
aria-label={ __( 'Button text' ) }
placeholder={ __( 'Add button text' ) }
keepPlaceholderOnFocus
formattingControls={ [] }
Expand Down

0 comments on commit 0d3fb09

Please sign in to comment.