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:
parent
948dd26931
commit
995f0ad51c
3 changed files with 7 additions and 5 deletions
|
@ -10,7 +10,8 @@ const messages = defineMessages({
|
|||
const mapStateToProps = (state, { intl }) => ({
|
||||
label: 'CW',
|
||||
title: intl.formatMessage(messages.title),
|
||||
active: state.getIn(['compose', 'spoiler'])
|
||||
active: state.getIn(['compose', 'spoiler']),
|
||||
ariaControls: 'cw-spoiler-input'
|
||||
});
|
||||
|
||||
const mapDispatchToProps = dispatch => ({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue