Skip to content

Commit

Permalink
refactor: Improve link accessibility in header
Browse files Browse the repository at this point in the history
  • Loading branch information
kriscooke committed Jun 30, 2020
1 parent 3bf2a8b commit c9de941
Show file tree
Hide file tree
Showing 4 changed files with 139 additions and 283 deletions.
30 changes: 7 additions & 23 deletions app/components/Layout/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@ const HeaderLayout = ({isLoggedIn = false, isRegistered = false}) => (
{isRegistered ? (
<Col>
<Link href="/">
<a>
<Button variant="outline-light">Dashboard</Button>
</a>
<a className="btn btn-outline-light">Dashboard</a>
</Link>
</Col>
) : null}
Expand All @@ -35,11 +33,12 @@ const HeaderLayout = ({isLoggedIn = false, isRegistered = false}) => (
<Form.Row>
{isRegistered && (
<Col>
<Form action="/user/profile" method="get">
<Button type="submit" variant="outline-light">
Profile
</Button>
</Form>
<a
href="/user/profile"
className="btn btn-outline-light"
>
Profile
</a>
</Col>
)}
<Col>
Expand Down Expand Up @@ -114,21 +113,6 @@ const HeaderLayout = ({isLoggedIn = false, isRegistered = false}) => (
align-items: center;
justify-content: flex-end;
}
.btn {
font-weight: bolder;
}
.link {
color: white;
text-decoration: none;
}
a:link,
a:visited {
color: white;
}
a:hover,
a:active {
color: white;
}
/*
These are sample media queries only. Media queries are quite subjective
Expand Down
Loading

0 comments on commit c9de941

Please sign in to comment.