Skip to content

Commit

Permalink
VADC-1438: add skip navigation link to data portal
Browse files Browse the repository at this point in the history
  • Loading branch information
Shawn O'Connor committed Oct 8, 2024
1 parent 7d2411a commit 8e1ce49
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 5 deletions.
6 changes: 6 additions & 0 deletions src/components/layout/TopBar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,12 @@ class TopBar extends Component {
<div className='top-bar'>
<header className='top-bar__header'>
<nav className='top-bar__nav'>
<a
href='#main-content'
className='top-bar__link g3-ring-on-focus top-bar__link_skip'
>
Skip Navigation
</a>
{
this.props.topItems.filter(
(item) => {
Expand Down
18 changes: 18 additions & 0 deletions src/components/layout/TopBar.less
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
justify-content: flex-end;
color: white;
overflow: hidden;
position: relative;
}

@media screen and (max-width: 1090px) {
Expand All @@ -42,6 +43,23 @@
margin-bottom: 10px;
}

.top-bar__link_skip {
border: 0;
background-color: var(--g3-color__base-blue);
color: var(--g3-color__white);
margin: 10px auto 5px 30px;
width: auto;
height: 1.7em;
display: block;
border-bottom: 1px solid var(--g3-color__white);
position: absolute;
left: -9999px;
}

.top-bar__link_skip:focus {
left: 0;
}

.top-bar__link:hover .top-icon-button,
.top-bar__link:focus .top-icon-button {
border-bottom: 1px solid var(--g3-color__white);
Expand Down
2 changes: 1 addition & 1 deletion src/covid19Index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ async function init() {
: null}
<ReduxTopBar />
<ReduxNavBar />
<div className='main-content'>
<div className='main-content' id='main-content'>
<ReduxWorkspaceShutdownBanner />
<ReduxWorkspaceShutdownPopup />
<Switch>
Expand Down
2 changes: 1 addition & 1 deletion src/ecosystemIndex.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ async function init() {
: null}
<ReduxTopBar />
<ReduxNavBar />
<div className='main-content'>
<div className='main-content' id='main-content'>
<ReduxWorkspaceShutdownBanner />
<ReduxWorkspaceShutdownPopup />
<Switch>
Expand Down
2 changes: 1 addition & 1 deletion src/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ async function init() {
: null}
<ReduxTopBar />
<ReduxNavBar />
<div className='main-content'>
<div className='main-content' id='main-content'>
<ReduxWorkspaceShutdownBanner />
<ReduxWorkspaceShutdownPopup />
<Switch>
Expand Down
2 changes: 1 addition & 1 deletion src/nctIndex.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ async function init() {
: null}
<ReduxTopBar />
<ReduxNavBar />
<div className='main-content'>
<div className='main-content' id='main-content'>
<ReduxWorkspaceShutdownBanner />
<ReduxWorkspaceShutdownPopup />
<Switch>
Expand Down
2 changes: 1 addition & 1 deletion src/workspaceIndex.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ async function init() {
: null}
<ReduxTopBar />
<ReduxNavBar />
<div className='main-content'>
<div className='main-content' id='main-content'>
<ReduxWorkspaceShutdownBanner />
<ReduxWorkspaceShutdownPopup />
<Switch>
Expand Down

0 comments on commit 8e1ce49

Please sign in to comment.