feat(cw-button): Add aria controls to CW trigger (#2303)

Add an ID to the CW spoiler input field to give aria-controls a handle on it. Pass that id to the CW trigger button. Modify text icon button component to accept aria controls id value. Add aria-expanded value to text icon button to indicate when it is expanded.
This commit is contained in:
Stephen Burgess 2017-04-23 13:33:44 -05:00 committed by Eugen
commit 995f0ad51c
3 changed files with 7 additions and 5 deletions

View file

@ -146,7 +146,7 @@ class ComposeForm extends React.PureComponent {
<div className='compose-form'>
<Collapsable isVisible={this.props.spoiler} fullHeight={50}>
<div className="spoiler-input">
<input placeholder={intl.formatMessage(messages.spoiler_placeholder)} value={this.props.spoiler_text} onChange={this.handleChangeSpoilerText} onKeyDown={this.handleKeyDown} type="text" className="spoiler-input__input" />
<input placeholder={intl.formatMessage(messages.spoiler_placeholder)} value={this.props.spoiler_text} onChange={this.handleChangeSpoilerText} onKeyDown={this.handleKeyDown} type="text" className="spoiler-input__input" id='cw-spoiler-input'/>
</div>
</Collapsable>