Skip to content

Full Toolkit for Next-Level Domain Analysis

Improve site accessibility 🙈

Felix Wotschofsky0dfb1843e48e
diff --git a/components/layout/Footer.tsx b/components/layout/Footer.tsx
index 429e911..92d31b5 100644
--- a/components/layout/Footer.tsx
+++ b/components/layout/Footer.tsx
@@ -16,6 +16,7 @@ const Footer = () => (
href="https://wotschofsky.com"
target="_blank"
rel="noopener"
+ aria-label="Felix Wotschofsky (Site Creator)"
>
Felix Wotschofsky
</a>
diff --git a/components/layout/Header.tsx b/components/layout/Header.tsx
index 2f37ec2..9e82bb5 100644
--- a/components/layout/Header.tsx
+++ b/components/layout/Header.tsx
@@ -11,7 +11,7 @@ import ThemeMenu from '@/components/layout/header/ThemeMenu';
const Header = () => (
<header className="w-full p-4 md:px-8">
<div className="flex items-center justify-between pb-4">
- <Link className="flex items-center gap-2" href="/">
+ <Link className="flex items-center gap-2" href="/" aria-label="Home Page">
<LogoDark className="inline h-6 dark:hidden" />
<LogoLight className="hidden h-6 dark:inline" />
Domain Digger
diff --git a/components/layout/header/BookmarkletLink.tsx b/components/layout/header/BookmarkletLink.tsx
index f286f7e..051fe82 100644
--- a/components/layout/header/BookmarkletLink.tsx
+++ b/components/layout/header/BookmarkletLink.tsx
@@ -76,6 +76,7 @@ const BookmarkletLink = () => {
href={target}
onClick={clickHandler}
onMouseDown={mouseDownHandler}
+ tabIndex={-1}
>
{activated ? 'Inspect Domain' : 'Bookmarklet'}
</a>
diff --git a/components/results/DomainLink.tsx b/components/results/DomainLink.tsx
index 92f23ac..7a9d348 100644
--- a/components/results/DomainLink.tsx
+++ b/components/results/DomainLink.tsx
@@ -21,6 +21,7 @@ const DomainLink: FC<DomainLinkProps> = ({ domain }) => (
<Link
className="select-all underline decoration-dotted underline-offset-4"
href={`/lookup/${domain}`}
+ aria-label={`Results for ${domain}`}
>
<span>{domain}</span>
</Link>
@@ -38,6 +39,7 @@ const DomainLink: FC<DomainLinkProps> = ({ domain }) => (
href={`https://${domain}`}
target="_blank"
rel="noreferrer nofollow"
+ aria-label={`Visit for ${domain}`}
>
<ExternalLinkIcon className="mx-1 inline-block h-3 w-3 -translate-y-0.5" />
</a>
diff --git a/components/results/IpLink.tsx b/components/results/IpLink.tsx
index b523d34..e1f34aa 100644
--- a/components/results/IpLink.tsx
+++ b/components/results/IpLink.tsx
@@ -31,7 +31,11 @@ const IpLink: FC<IpLinkProps> = ({ value }) => {
<TooltipProvider>
<Tooltip>
<TooltipTrigger asChild onClick={open}>
- <a className="cursor-pointer underline decoration-dotted underline-offset-4">
+ <a
+ className="cursor-pointer underline decoration-dotted underline-offset-4"
+ aria-label={`Details for IP ${value}`}
+ tabIndex={0}
+ >
<span className="select-all">{value}</span>
<InfoIcon
role="button"
diff --git a/components/results/RelatedDomains.tsx b/components/results/RelatedDomains.tsx
index 3f48942..82c6761 100644
--- a/components/results/RelatedDomains.tsx
+++ b/components/results/RelatedDomains.tsx
@@ -41,6 +41,7 @@ const RelatedDomains: FC<RelatedDomainsProps> = ({ domain: original }) => {
asChild
variant="secondary"
className="h-6 whitespace-nowrap p-2 text-xs"
+ aria-label={`Results for ${domain}`}
>
<Link href={`/lookup/${domain}`}>{domain}</Link>
</Button>
diff --git a/components/results/ResultsTabs.tsx b/components/results/ResultsTabs.tsx
index c68d8c6..3182e80 100644
--- a/components/results/ResultsTabs.tsx
+++ b/components/results/ResultsTabs.tsx
@@ -24,7 +24,10 @@ const SingleTab: FC<{
}
>
{label}
- <span className="pointer-events-none absolute bottom-0 left-1/2 hidden w-full -translate-x-1/2 translate-y-4 text-xs text-muted-foreground opacity-0 transition-all group-hover:translate-y-6 group-hover:opacity-100 sm:block">
+ <span
+ className="pointer-events-none absolute bottom-0 left-1/2 hidden w-full -translate-x-1/2 translate-y-4 text-xs text-muted-foreground opacity-0 transition-all group-hover:translate-y-6 group-hover:opacity-100 sm:block"
+ aria-hidden
+ >
{isAppleDevice() ? (
<>
<OptionIcon className="inline-block h-3 w-3" strokeWidth={3} />
diff --git a/components/results/ShareButton.tsx b/components/results/ShareButton.tsx
index 56c6b0e..2c6403e 100644
--- a/components/results/ShareButton.tsx
+++ b/components/results/ShareButton.tsx
@@ -28,7 +28,13 @@ const ShareButton: FC = () => {
}, [plausible]);
return (
- <Button className="px-3" variant="outline" size="lg" onClick={onClick}>
+ <Button
+ className="px-3"
+ variant="outline"
+ size="lg"
+ onClick={onClick}
+ aria-label="Share"
+ >
<ShareIcon />
</Button>
);
diff --git a/components/results/dns/LocationSelector.tsx b/components/results/dns/LocationSelector.tsx
index 2433e99..04b1eb4 100644
--- a/components/results/dns/LocationSelector.tsx
+++ b/components/results/dns/LocationSelector.tsx
@@ -1,5 +1,6 @@
'use client';
+import { Label } from '@radix-ui/react-label';
import { usePlausible } from 'next-plausible';
import { usePathname, useRouter, useSearchParams } from 'next/navigation';
import { FC, useCallback } from 'react';
@@ -50,7 +51,7 @@ const LocationSelector: FC<LocationSelectorProps> = ({
);
return (
- <div className="flex flex-col gap-1">
+ <Label className="flex flex-col gap-1">
<span className="text-sm text-muted-foreground">Location</span>
<Select
@@ -70,7 +71,7 @@ const LocationSelector: FC<LocationSelectorProps> = ({
))}
</SelectContent>
</Select>
- </div>
+ </Label>
);
};
diff --git a/components/results/dns/ResolverSelector.tsx b/components/results/dns/ResolverSelector.tsx
index 8c6b39f..642c419 100644
--- a/components/results/dns/ResolverSelector.tsx
+++ b/components/results/dns/ResolverSelector.tsx
@@ -1,5 +1,6 @@
'use client';
+import { Label } from '@radix-ui/react-label';
import { usePlausible } from 'next-plausible';
import { usePathname, useRouter, useSearchParams } from 'next/navigation';
import { FC, useCallback } from 'react';
@@ -44,7 +45,7 @@ const ResolverSelector: FC<ResolverSelectorProps> = ({ initialValue }) => {
);
return (
- <div className="flex flex-col gap-1">
+ <Label className="flex flex-col gap-1">
<span className="text-sm text-muted-foreground">Resolver</span>
<Select
@@ -60,7 +61,7 @@ const ResolverSelector: FC<ResolverSelectorProps> = ({ initialValue }) => {
<SelectItem value="cloudflare">Cloudflare</SelectItem>
</SelectContent>
</Select>
- </div>
+ </Label>
);
};
diff --git a/package.json b/package.json
index f205140..1dca0f0 100644
--- a/package.json
+++ b/package.json
@@ -17,6 +17,7 @@
"@radix-ui/react-alert-dialog": "^1.0.5",
"@radix-ui/react-dialog": "^1.0.5",
"@radix-ui/react-dropdown-menu": "^2.0.6",
+ "@radix-ui/react-label": "^2.0.2",
"@radix-ui/react-select": "^2.0.0",
"@radix-ui/react-slot": "^1.0.2",
"@radix-ui/react-tabs": "^1.0.4",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 5a09919..8244781 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -14,6 +14,9 @@ dependencies:
'@radix-ui/react-dropdown-menu':
specifier: ^2.0.6
+ '@radix-ui/react-label':
+ specifier: ^2.0.2
'@radix-ui/react-select':
specifier: ^2.0.0
@@ -1994,6 +1997,27 @@ packages:
react: 18.2.0
dev: false
+ resolution: {integrity: sha512-N5ehvlM7qoTLx7nWPodsPYPgMzA5WM8zZChQg8nyFJKnDO5WHdba1vv5/H6IO5LtJMfD2Q3wh1qHFGNtK0w3bQ==}
+ peerDependencies:
+ '@types/react': '*'
+ '@types/react-dom': '*'
+ react: ^16.8 || ^17.0 || ^18.0
+ react-dom: ^16.8 || ^17.0 || ^18.0
+ peerDependenciesMeta:
+ '@types/react':
+ optional: true
+ '@types/react-dom':
+ optional: true
+ dependencies:
+ '@babel/runtime': 7.23.6
+ '@radix-ui/react-primitive': 1.0.3(@types/[email protected])(@types/[email protected])([email protected])([email protected])
+ '@types/react': 18.2.43
+ '@types/react-dom': 18.2.17
+ react: 18.2.0
+ react-dom: 18.2.0([email protected])
+ dev: false
+
resolution: {integrity: sha512-BVkFLS+bUC8HcImkRKPSiVumA1VPOOEC5WBMiT+QAVsPzW1FJzI9KnqgGxVDPBcql5xXrHkD3JOVoXWEXD8SYA==}
peerDependencies: