From 1c354817a6a8c9358b8fe2e3328caa5fe2393477 Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Wed, 17 Jan 2018 23:00:33 -0800 Subject: [PATCH] improve a11y --- routes/_components/Avatar.html | 6 +++--- routes/_components/NavItem.html | 5 ++++- routes/_components/Status.html | 13 +++++++++++-- routes/_components/StatusListItem.html | 2 +- routes/_components/Timeline.html | 5 +++-- routes/_components/VirtualList.html | 1 + routes/_components/VirtualListItem.html | 2 +- routes/_utils/virtualListStore.js | 2 ++ 8 files changed, 26 insertions(+), 10 deletions(-) diff --git a/routes/_components/Avatar.html b/routes/_components/Avatar.html index 103d8364..27606e0c 100644 --- a/routes/_components/Avatar.html +++ b/routes/_components/Avatar.html @@ -1,11 +1,11 @@ {{#await imagePromise}} - {{then src}} - {{catch error}} - + {{/await}} diff --git a/routes/_components/NavItem.html b/routes/_components/NavItem.html index b7268910..34664a09 100644 --- a/routes/_components/NavItem.html +++ b/routes/_components/NavItem.html @@ -1,4 +1,7 @@ - + diff --git a/routes/_components/Status.html b/routes/_components/Status.html index e770929d..c6474d13 100644 --- a/routes/_components/Status.html +++ b/routes/_components/Status.html @@ -1,4 +1,4 @@ -
+
{{#if status.reblog}}
@@ -19,7 +19,7 @@ @{{originalAccount.acct}}
@@ -214,6 +214,15 @@ }, computed: { createdAtDate: (status) => status.created_at, + accessibleDate: (createdAtDate) => { + return Intl.DateTimeFormat('en-US', { + year: 'numeric', + month: 'long', + day: 'numeric', + hour: 'numeric', + minute: 'numeric' + }).format(new Date(createdAtDate)) + }, relativeDate: (createdAtDate) => { mark('compute relativeDate') let res = relativeFormat.format(new Date(createdAtDate)) diff --git a/routes/_components/StatusListItem.html b/routes/_components/StatusListItem.html index 7b15a5f1..56bc54d8 100644 --- a/routes/_components/StatusListItem.html +++ b/routes/_components/StatusListItem.html @@ -1,4 +1,4 @@ - +