Skip to content

Commit

Permalink
Add aria-expanded to content warning toggle button (mastodon#19975)
Browse files Browse the repository at this point in the history
  • Loading branch information
ClearlyClaire authored and kadoshita committed Nov 19, 2022
1 parent 4f15175 commit cdedd6c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/javascript/mastodon/components/status_content.js
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ class StatusContent extends React.PureComponent {
<p style={{ marginBottom: hidden && status.get('mentions').isEmpty() ? '0px' : null }}>
<span dangerouslySetInnerHTML={spoilerContent} className='translate' lang={lang} />
{' '}
<button tabIndex='0' className={`status__content__spoiler-link ${hidden ? 'status__content__spoiler-link--show-more' : 'status__content__spoiler-link--show-less'}`} onClick={this.handleSpoilerClick}>{toggleText}</button>
<button type='button' className={`status__content__spoiler-link ${hidden ? 'status__content__spoiler-link--show-more' : 'status__content__spoiler-link--show-less'}`} onClick={this.handleSpoilerClick} aria-expanded={!hidden}>{toggleText}</button>
</p>

{mentionsPlaceholder}
Expand Down

0 comments on commit cdedd6c

Please # to comment.