From 25b8bf6a2e5cdbf921ca8ba4a994f57c1c859844 Mon Sep 17 00:00:00 2001 From: Michael Manfre Date: Wed, 7 Dec 2022 11:12:43 -0500 Subject: Keyboard navigation --- static/css/style.css | 19 +++++++++++++++++++ templates/activities/_like.html | 4 ++-- templates/activities/_mini_post.html | 4 ++-- templates/activities/_post.html | 30 +++++++++++++++--------------- templates/activities/_reply.html | 2 +- templates/activities/local.html | 2 +- templates/base.html | 17 +++++++++-------- 7 files changed, 49 insertions(+), 29 deletions(-) diff --git a/static/css/style.css b/static/css/style.css index 1f9220f..430ab2a 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -1149,3 +1149,22 @@ table.metadata td.name { color: var(--color-highlight); transition: 0.2s; } + + +/* Accessibility */ +.screenreader-text { + position: absolute; + left: -999px; + width: 1px; + height: 1px; + top: auto; +} + +.screenreader-text:focus { + color: black; + display: inline-block; + height: auto; + width: auto; + position: static; + margin: auto; +} diff --git a/templates/activities/_like.html b/templates/activities/_like.html index 8eec8cd..07dc01d 100644 --- a/templates/activities/_like.html +++ b/templates/activities/_like.html @@ -1,9 +1,9 @@ {% if post.pk in interactions.like %} - + {% else %} - + {% endif %} diff --git a/templates/activities/_mini_post.html b/templates/activities/_mini_post.html index 80ed213..19fad76 100644 --- a/templates/activities/_mini_post.html +++ b/templates/activities/_mini_post.html @@ -1,8 +1,8 @@ {% load static %} {% load activity_tags %} -