From a4a9cb7962925f2e15852caa00413882ba2f33ea Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Sat, 25 Apr 2020 19:35:03 -0700 Subject: [PATCH] fix: fix nav links in Voice Control on iOS (#1746) fixes #1735 --- src/routes/_components/NavItem.html | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/routes/_components/NavItem.html b/src/routes/_components/NavItem.html index 7f0ca88a..14643a74 100644 --- a/src/routes/_components/NavItem.html +++ b/src/routes/_components/NavItem.html @@ -92,7 +92,18 @@ @media (max-width: 991px) { .main-nav-link .nav-link-label { - display: none; + /* Copied from the sr-only styles in global.scss + * the reason we explicitly leave this in is because Voice Control on iOS does not + * understand aria-labels very well, but it understands hidden text just fine + */ + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + border: 0; } }