]> cat aescling's git repositories - mastodon.git/commitdiff
Fix “Show less for all”/”Show more for all” eye icon not reflecting state
authorThibaut Girka <thib@sitedethib.com>
Wed, 22 Jul 2020 19:23:41 +0000 (21:23 +0200)
committerThibG <thib@sitedethib.com>
Wed, 22 Jul 2020 20:53:10 +0000 (22:53 +0200)
app/javascript/flavours/glitch/features/status/index.js

index a9abc545ee41e5d65b6c351e716608635d34fd0b..3e2e95f3519439b0cfe6833e77bcf5a8bab90c23 100644 (file)
@@ -557,7 +557,7 @@ class Status extends ImmutablePureComponent {
           showBackButton
           multiColumn={multiColumn}
           extraButton={(
-            <button className='column-header__button' title={intl.formatMessage(!isExpanded ? messages.revealAll : messages.hideAll)} aria-label={intl.formatMessage(!isExpanded ? messages.revealAll : messages.hideAll)} onClick={this.handleToggleAll} aria-pressed={!isExpanded ? 'false' : 'true'}><Icon id={status.get('hidden') ? 'eye-slash' : 'eye'} /></button>
+            <button className='column-header__button' title={intl.formatMessage(!isExpanded ? messages.revealAll : messages.hideAll)} aria-label={intl.formatMessage(!isExpanded ? messages.revealAll : messages.hideAll)} onClick={this.handleToggleAll} aria-pressed={!isExpanded ? 'false' : 'true'}><Icon id={!isExpanded ? 'eye-slash' : 'eye'} /></button>
           )}
         />
 
@@ -566,7 +566,7 @@ class Status extends ImmutablePureComponent {
             {ancestors}
 
             <HotKeys handlers={handlers}>
-              <div className='focusable' tabIndex='0' aria-label={textForScreenReader(intl, status, false, !status.get('hidden'))}>
+              <div className='focusable' tabIndex='0' aria-label={textForScreenReader(intl, status, false, isExpanded)}>
                 <DetailedStatus
                   key={`details-${status.get('id')}`}
                   status={status}