diff options
author | Eugen <eugen@zeonfederated.com> | 2016-11-02 21:53:00 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-02 21:53:00 +0100 |
commit | 76a717d549c5592e04056b1b9cc03946fb9da52f (patch) | |
tree | f7421ce4cf264f835fe15ec8580eb424e95445db | |
parent | 77045d088608eec16548a0dfb693a6307881048d (diff) | |
parent | 5ff2762fcffe4d1a896083aa71878f994b26b4b7 (diff) |
Merge pull request #129 from fhemberger/fix/a11y-labels
a11y: Add labels to input fields for screenreader
-rw-r--r-- | app/assets/javascripts/components/features/ui/components/compose_form.jsx | 1 | ||||
-rw-r--r-- | app/assets/javascripts/components/features/ui/components/follow_form.jsx | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/app/assets/javascripts/components/features/ui/components/compose_form.jsx b/app/assets/javascripts/components/features/ui/components/compose_form.jsx index 0655a7c79..581e28fc9 100644 --- a/app/assets/javascripts/components/features/ui/components/compose_form.jsx +++ b/app/assets/javascripts/components/features/ui/components/compose_form.jsx @@ -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, diff --git a/app/assets/javascripts/components/features/ui/components/follow_form.jsx b/app/assets/javascripts/components/features/ui/components/follow_form.jsx index 4ba5dfc25..be80b7663 100644 --- a/app/assets/javascripts/components/features/ui/components/follow_form.jsx +++ b/app/assets/javascripts/components/features/ui/components/follow_form.jsx @@ -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> ); |