Skip to content

Commit

Permalink
Propery associate the mode switcher label.
Browse files Browse the repository at this point in the history
  • Loading branch information
afercia committed Jul 19, 2017
1 parent ef44f70 commit 5465e6f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion editor/header/mode-switcher/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,12 @@ function ModeSwitcher( { mode, onSwitch } ) {
/* eslint-disable jsx-a11y/no-onchange */
return (
<div className="editor-mode-switcher">
<label className="screen-reader-text">{ __( 'Change editor mode' ) }</label>
<label htmlFor="editor-mode-switcher__input" className="screen-reader-text">{ __( 'Change editor mode' ) }</label>
<select
value={ mode }
onChange={ ( event ) => onSwitch( event.target.value ) }
className="editor-mode-switcher__input"
id="editor-mode-switcher__input"
>
{ MODES.map( ( { value, label } ) =>
<option key={ value } value={ value }>
Expand Down

0 comments on commit 5465e6f

Please sign in to comment.