From 852a8582fb213e0d91f3b54deb7624f60d91b5f7 Mon Sep 17 00:00:00 2001 From: Vincent Date: Thu, 24 Oct 2019 06:54:57 +0200 Subject: [PATCH] fix: Add the non-truncated text in the title attribute (#1598) The `.card-title` element carries `text-overflow: ellipsis`, (and `white-space: nowrap`), resulting in the last part of long article titles not being visible. By adding it to the `title` attribute, one can see the full title on hovering without having to visit the article first. The main concern I had was that the text is now technically duplicated in the source code, and for short titles, also in the UI. The primary concern there, however, was screen reader users getting duplicate announcements. However, I believe the title attribute is not announced by screen readers, which this (old) article seems to confirm: https://developer.paciellogroup.com/blog/2010/11/using-the-html-title-attribute/ That leaves the following two disadvantages: - This doesn't solve anything for mobile users, who will still have to follow the link to see the full title. - Desktop users can however a (non-truncated) title to see the same title again. --- src/routes/_components/status/StatusCard.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/_components/status/StatusCard.html b/src/routes/_components/status/StatusCard.html index a1606f5a..29938b03 100644 --- a/src/routes/_components/status/StatusCard.html +++ b/src/routes/_components/status/StatusCard.html @@ -1,5 +1,5 @@ - + {unescapedTitle} {#if description}