Skip to content

Commit 6693077

Browse files
committed
feat: add accessibility attributes to social links in Footer and Block Explorer link in SmartLinkGroup; add role to Tabs component
1 parent f5e75ce commit 6693077

File tree

3 files changed

+26
-6
lines changed

3 files changed

+26
-6
lines changed

src/components/Footer.tsx

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,40 @@ import { Button } from './ui/button';
1515

1616
function SocialLinksItems({ className }: { className?: string }) {
1717
const socialLinks = [
18-
{ href: 'https://twitter.com/iEx_ec', icon: <SiX size={16} /> },
19-
{ href: 'https://discord.gg/pbt9m98wnU', icon: <SiDiscord size={16} /> },
20-
{ href: 'https://t.me/iexec_rlc_official', icon: <SiTelegram size={16} /> },
18+
{
19+
href: 'https://twitter.com/iEx_ec',
20+
icon: <SiX size={16} />,
21+
arialLabel: 'Twitter',
22+
},
23+
{
24+
href: 'https://discord.gg/pbt9m98wnU',
25+
icon: <SiDiscord size={16} />,
26+
ariaLabel: 'Discord',
27+
},
28+
{
29+
href: 'https://t.me/iexec_rlc_official',
30+
icon: <SiTelegram size={16} />,
31+
ariaLabel: 'Telegram',
32+
},
2133
{
2234
href: 'https://www.youtube.com/channel/UCwWxZWvKVHn3CXnmDooLWtA',
2335
icon: <SiYoutube size={16} />,
36+
ariaLabel: 'YouTube',
2437
},
2538
{
2639
href: 'https://www.linkedin.com/company/iex.ec/',
2740
icon: <Linkedin size={16} />,
41+
ariaLabel: 'LinkedIn',
42+
},
43+
{
44+
href: 'https://medium.com/iex-ec',
45+
icon: <SiMedium size={16} />,
46+
ariaLabel: 'Medium',
2847
},
29-
{ href: 'https://medium.com/iex-ec', icon: <SiMedium size={16} /> },
3048
];
3149
return (
3250
<div className={cn('flex', className)}>
33-
{socialLinks.map(({ href, icon }, idx) => (
51+
{socialLinks.map(({ href, icon, ariaLabel }, idx) => (
3452
<Button
3553
key={idx}
3654
asChild
@@ -41,7 +59,7 @@ function SocialLinksItems({ className }: { className?: string }) {
4159
href={href}
4260
target="_blank"
4361
rel="noopener noreferrer"
44-
aria-label="Social link"
62+
aria-label={ariaLabel}
4563
>
4664
{icon}
4765
</a>

src/components/SmartLinkGroup.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ export default function SmartLinkGroup({
107107
href={`${getBlockExplorerUrl(chainId)}/${blockExplorerPath[type]}`}
108108
target="_blank"
109109
rel="noopener noreferrer"
110+
aria-label="Open in Block Explorer"
110111
>
111112
<ExternalLink className="text-foreground" />
112113
</a>

src/modules/Tabs.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ export function Tabs({
7272
key={label}
7373
data-tab-index={index}
7474
variant="link"
75+
role="radio"
7576
size={'none'}
7677
onClick={() => {
7778
if (!isDisabled) onTabChange(index);

0 commit comments

Comments
 (0)