Skip to content

Commit 8216bc8

Browse files
fix: accessibility issues on homepage (#212)
1 parent c55b4a0 commit 8216bc8

File tree

4 files changed

+23
-16
lines changed

4 files changed

+23
-16
lines changed

src/components/Global/Footer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ const Footer = () => {
6969
{item.name}
7070
</p>
7171

72-
<nav className="mt-8">
72+
<nav className="mt-8" aria-label={item.name}>
7373
<ul className="space-y-4 text-sm">
7474
{item.children.map((child) => (
7575
<li key={child.name}>

src/components/Home/HeroSection/ContributeButton.js

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,14 @@ import Link from 'next/link';
44
const ContributeButton = () => {
55
return (
66
<>
7-
<motion.button
7+
<motion.a
88
className="inline-flex items-center justify-center px-8 py-3 text-base font-medium transition-all duration-100 bg-gray-100 border border-transparent rounded-md shadow-md border-dark hover:border-white/80 text-slate-700 hover:bg-gray-700 hover:text-slate-100 focus:outline-none focus:ring-2 focus:ring-cyber-webx focus:ring-offset-2"
99
whileHover={{ scale: 1.05 }}
1010
whileTap={{ scale: 1 }}
11+
href="https://github.com/webxdao"
1112
>
12-
<Link href="https://github.com/webxdao">
13-
<a className="inline-flex items-center justify-center w-full">
14-
Contribute
15-
</a>
16-
</Link>
17-
</motion.button>
13+
Contribute
14+
</motion.a>
1815
</>
1916
);
2017
};

src/components/Home/HeroSection/DiscordButton.js

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,15 @@ import Link from 'next/link';
55
const DiscordButton = () => {
66
return (
77
<>
8-
<motion.button
8+
<motion.a
99
className="inline-flex items-center justify-center px-4 py-3 text-base font-medium transition-all duration-100 border border-transparent rounded-md shadow-sm hover:border-white/80 bg-cyber-webx text-white/80 hover:text-white hover:bg-gradient-to-r hover:from-pink-700 hover:to-pink-900 focus:outline-none focus:ring-2 focus:ring-cyber-webx focus:ring-offset-2"
1010
whileHover={{ scale: 1.05 }}
1111
whileTap={{ scale: 1 }}
12+
href="https://dsc.gg/webxdao"
1213
>
13-
<Link href="https://dsc.gg/webxdao">
14-
<a className="inline-flex items-center justify-center w-full">
15-
Join WebXDAO
16-
<FaDiscord className="w-5 h-5 ml-3 -mr-1" aria-hidden="true" />
17-
</a>
18-
</Link>
19-
</motion.button>
14+
Join WebXDAO
15+
<FaDiscord className="w-5 h-5 ml-3 -mr-1" aria-hidden="true" />
16+
</motion.a>
2017
</>
2118
);
2219
};

src/pages/_document.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { Html, Head, Main, NextScript } from 'next/document'
2+
3+
export default function Document() {
4+
return (
5+
<Html lang="en">
6+
<Head />
7+
<body>
8+
<Main />
9+
<NextScript />
10+
</body>
11+
</Html>
12+
)
13+
}

0 commit comments

Comments
 (0)