Skip to content

Commit c6bd5e6

Browse files
committed
fix: improve accessibility in Navigation, Footer, and PageNotFound (#7594)
1 parent 8a097be commit c6bd5e6

3 files changed

Lines changed: 16 additions & 5 deletions

File tree

src/components/Footer/Footer.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ const Footer = () => (
4747
</p>
4848
</Container>
4949
<Container className="footer__inner">
50-
<section className="footer__left">
50+
<section className="footer__left" aria-label="Quick links">
5151
<Link className="footer__link" to="/guides/getting-started/">
5252
Get Started
5353
</Link>
@@ -59,13 +59,13 @@ const Footer = () => (
5959
</Link>
6060
</section>
6161

62-
<section className="footer__middle">
62+
<section className="footer__middle" aria-label="Home">
6363
<Link to="/" className="footer__icon">
6464
<img src={Icon} alt="webpack icon" width={35} height={35} />
6565
</Link>
6666
</section>
6767

68-
<section className="footer__right">
68+
<section className="footer__right" aria-label="Resources and links">
6969
<Link className="footer__link" to="https://webpack.threadless.com/">
7070
Swag Store
7171
</Link>

src/components/Navigation/Navigation.jsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,10 @@ function Navigation({ links, pathname, hash = "", toggleSidebar }) {
137137
<Link to="/" className="md:mr-auto">
138138
<Logo />
139139
</Link>
140-
<nav className="hidden md:inline-grid md:grid-flow-col md:gap-x-[18px] md:items-center">
140+
<nav
141+
className="hidden md:inline-grid md:grid-flow-col md:gap-x-[18px] md:items-center"
142+
aria-label="Main navigation"
143+
>
141144
{links.map(({ content, url, isActive, ariaLabel }) => (
142145
<NavigationItem
143146
key={url}
Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
1+
@use "functions";
2+
13
.button {
24
text-decoration: none;
35
display: inline-block;
46
padding: 3px 5px;
57
font-size: 1.1rem;
68
border-radius: 5px;
79
width: auto;
8-
border: 1px solid #1a6bac;
10+
border: 1px solid functions.getColor(denim);
11+
color: functions.getColor(denim);
12+
13+
&:hover {
14+
background-color: functions.getColor(denim);
15+
color: functions.getColor(white);
16+
}
917
}

0 commit comments

Comments
 (0)