fix: remove relative timestamp from tab focus order (#1534)

fixes #1533
This commit is contained in:
Nolan Lawson 2019-09-24 22:30:26 -07:00 committed by GitHub
parent b8b6556a14
commit af27c8b26b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,6 +2,7 @@
class="status-relative-date {isStatusInNotification ? 'status-in-notification' : '' }"
href="/statuses/{originalStatusId}"
rel="prefetch"
{tabindex}
>
<time datetime={createdAtDate} title={absoluteFormattedDate}
aria-label="{timeagoFormattedDate} click to show thread">
@ -32,7 +33,12 @@
<script>
export default {
computed: {
elementId: ({ uuid }) => `status-relative-date-${uuid}`
elementId: ({ uuid }) => `status-relative-date-${uuid}`,
tabindex: ({ $disableTapOnStatus }) => (
// If you can't tap on the entire status, then you need some way to click on it. Otherwise it's
// just a duplicate link in the focus order.
$disableTapOnStatus ? '0' : '-1'
)
}
}
</script>