Merge pull request #129 from fhemberger/fix/a11y-labels

a11y: Add labels to input fields for screenreader
remotes/1727458204337373841/tmp_refs/heads/signup-info-prompt
Eugen 2016-11-02 21:53:00 +01:00 committed by GitHub
commit 76a717d549
2 changed files with 2 additions and 1 deletions

View File

@ -132,6 +132,7 @@ const ComposeForm = React.createClass({
const inputProps = {
placeholder: 'What is on your mind?',
ariaLabel: 'What is on your mind?',
value: this.props.text,
onKeyUp: this.handleKeyUp,
onChange: this.handleChange,

View File

@ -33,7 +33,7 @@ const FollowForm = React.createClass({
render () {
return (
<div style={{ display: 'flex', lineHeight: '20px', padding: '10px', background: '#373b4a' }}>
<input autoComplete='off' type='text' disabled={this.props.is_submitting} placeholder='username@domain' value={this.props.text} onKeyUp={this.handleKeyUp} onChange={this.handleChange} className='follow-form__input' style={{ flex: '1 1 auto', boxSizing: 'border-box', display: 'block', border: 'none', padding: '10px', fontFamily: 'Roboto', color: '#282c37', fontSize: '14px', margin: '0' }} />
<input autoComplete='off' type='text' disabled={this.props.is_submitting} placeholder='username@domain' ariaLabel='Search for username@domain to follow this user' value={this.props.text} onKeyUp={this.handleKeyUp} onChange={this.handleChange} className='follow-form__input' style={{ flex: '1 1 auto', boxSizing: 'border-box', display: 'block', border: 'none', padding: '10px', fontFamily: 'Roboto', color: '#282c37', fontSize: '14px', margin: '0' }} />
<div style={{ padding: '10px', paddingRight: '0' }}><IconButton title='Follow' size={20} icon='user-plus' onClick={this.handleSubmit} disabled={this.props.is_submitting} /></div>
</div>
);