]> cat aescling's git repositories - mastodon.git/commitdiff
fix(status): Don't add tabIndex to wrapped status (#4437)
authorunarist <m.unarist@gmail.com>
Sat, 29 Jul 2017 12:20:05 +0000 (21:20 +0900)
committerEugen Rochko <eugen@zeonfederated.com>
Sat, 29 Jul 2017 12:20:05 +0000 (14:20 +0200)
app/javascript/mastodon/components/status.js

index 5471c52f7ce3af743ca6711c1df7aaa9e30aec6b..ceb512d96080209e331efb6b53ed3ea4b3c0032f 100644 (file)
@@ -172,7 +172,7 @@ export default class Status extends ImmutablePureComponent {
 
     // Exclude intersectionObserverWrapper from `other` variable
     // because intersection is managed in here.
-    const { status, account, intersectionObserverWrapper, index, listLength, ...other } = this.props;
+    const { status, account, intersectionObserverWrapper, index, listLength, wrapped, ...other } = this.props;
     const { isExpanded, isIntersecting, isHidden } = this.state;
 
     if (status === null) {
@@ -234,7 +234,7 @@ export default class Status extends ImmutablePureComponent {
     }
 
     return (
-      <article aria-posinset={index} aria-setsize={listLength} className={`status ${this.props.muted ? 'muted' : ''} status-${status.get('visibility')}`} data-id={status.get('id')} tabIndex='0' ref={this.handleRef}>
+      <article aria-posinset={index} aria-setsize={listLength} className={`status ${this.props.muted ? 'muted' : ''} status-${status.get('visibility')}`} data-id={status.get('id')} tabIndex={wrapped ? null : '0'}  ref={this.handleRef}>
         <div className='status__info'>
           <a href={status.get('url')} className='status__relative-time' target='_blank' rel='noopener'><RelativeTimestamp timestamp={status.get('created_at')} /></a>