Skip to content

Commit 5ee30e4

Browse files
Merge pull request #3979 from segmentio/focus-visible-test
Site accessibility updates
2 parents c5eae5c + 0fbee8e commit 5ee30e4

File tree

3 files changed

+25
-0
lines changed

3 files changed

+25
-0
lines changed

src/_layouts/default.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@
8080
<link rel="stylesheet" href="{{ '/assets/algolia.css' | relative_url }}">
8181
</head>
8282
<body>
83+
<a href="#{{ page.title | remove:':' | remove:'?' | remove:'(' | remove:')' | remove:',' | remove:'&' | replace:"'", "-"| replace:'.', '-' | downcase | split:' ' | join:"-" }}" class="skiplink">Skip to main content</a>
8384
<div id="consent-manager"></div>
8485
{{ content }}
8586
<a class="back-scrolling" data-back-scrolling data-active-class="back-scrolling--active">

src/_sass/components/_markdown.scss

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,25 @@ tr.show {
388388
white-space: nowrap;
389389
}
390390

391+
.skiplink {
392+
left: -999px;
393+
position: absolute;
394+
top: auto;
395+
width: 1px;
396+
height: 1px;
397+
overflow: hidden;
398+
}
399+
400+
.skiplink:focus-visible {
401+
outline: 2px solid color(secondary);
402+
color: color(secondary);
403+
position: static;
404+
width: 400px;
405+
height: auto;
406+
overflow: visible;
407+
font-weight: bold;
408+
}
409+
391410
.device-web-mode,
392411
.device-mobile-mode {
393412
background-color: #e6f5ef;

src/_sass/components/_menu-item.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,11 @@
5656
align-items: center;
5757
padding: 5px 20px;
5858

59+
&:focus-visible {
60+
border: 2px solid color(secondary);
61+
color: color(secondary);
62+
}
63+
5964
&:hover {
6065
color: color(secondary);
6166
text-decoration: none;

0 commit comments

Comments
 (0)