From 1eb910e61e7c5a3dbce6188bd2bed74f7d38f1ee Mon Sep 17 00:00:00 2001 From: Draconizations Date: Fri, 20 May 2022 12:09:10 +0200 Subject: [PATCH] feat(dashboard): make navigating more screenreader friendly --- dashboard/src/pages/Dash.svelte | 1 + dashboard/src/pages/Group.svelte | 3 ++- dashboard/src/pages/Member.svelte | 3 ++- dashboard/src/pages/profiles/Main.svelte | 3 ++- dashboard/styles/generic.scss | 14 +++++++++++++- 5 files changed, 20 insertions(+), 4 deletions(-) diff --git a/dashboard/src/pages/Dash.svelte b/dashboard/src/pages/Dash.svelte index 6f704831..01dd5afc 100644 --- a/dashboard/src/pages/Dash.svelte +++ b/dashboard/src/pages/Dash.svelte @@ -78,6 +78,7 @@ +

Viewing your own system

diff --git a/dashboard/src/pages/Group.svelte b/dashboard/src/pages/Group.svelte index c098fbd1..b856df18 100644 --- a/dashboard/src/pages/Group.svelte +++ b/dashboard/src/pages/Group.svelte @@ -109,11 +109,12 @@ +

Viewing {isPublic ? "a public" : "your own"} group

{#if isDeleted} Group has been successfully deleted. Return to dash {:else} {#if isPublic} - You are currently viewing a group. + You are currently viewing a group. {/if} {#if notOwnSystem} This group does not belong to your system, did you mean to look up it's public page? diff --git a/dashboard/src/pages/Member.svelte b/dashboard/src/pages/Member.svelte index 61ee3e1f..17a51307 100644 --- a/dashboard/src/pages/Member.svelte +++ b/dashboard/src/pages/Member.svelte @@ -115,11 +115,12 @@ +

Viewing {isPublic ? "a public" : "your own"} member

{#if isDeleted} Member has been successfully deleted. Return to dash {:else} {#if isPublic} - You are currently viewing a member. + You are currently viewing a member. {/if} {#if notOwnSystem} This member does not belong to your system, did you mean to look up their public page? diff --git a/dashboard/src/pages/profiles/Main.svelte b/dashboard/src/pages/profiles/Main.svelte index ca831381..c394c2b9 100644 --- a/dashboard/src/pages/profiles/Main.svelte +++ b/dashboard/src/pages/profiles/Main.svelte @@ -57,6 +57,7 @@ {/if} +

Viewing a public system

{#if !user.id && !err}
@@ -65,7 +66,7 @@ {:else if err} {err} {:else} - You are currently viewing a system. + You are currently viewing a system. diff --git a/dashboard/styles/generic.scss b/dashboard/styles/generic.scss index 4d51e42e..8655d663 100644 --- a/dashboard/styles/generic.scss +++ b/dashboard/styles/generic.scss @@ -163,4 +163,16 @@ img.emoji { width: auto; margin: 0 .05em 0 .1em; vertical-align: -0.1125em; - } \ No newline at end of file + } + + //misc + .visually-hidden { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border: 0; +} \ No newline at end of file