Skip to content

Fix invalid semantic HTML: <button> nested inside <a> in not-found.tsx#41

Merged
naheel0 merged 2 commits intonot-found-pagefrom
copilot/sub-pr-40
Feb 21, 2026
Merged

Fix invalid semantic HTML: <button> nested inside <a> in not-found.tsx#41
naheel0 merged 2 commits intonot-found-pagefrom
copilot/sub-pr-40

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 21, 2026

The "Back to Safety" CTA was wrapping a <Button> (renders <button>) inside a <Link> (renders <a>), producing invalid HTML — interactive elements cannot be nested.

Change

Used Button's existing asChild prop so Radix UI's Slot forwards button styles directly onto the <Link> child, collapsing both into a single <a> element.

// Before — invalid: <button> inside <a>
<Link href="/">
  <Button variant="primary" ...>
    <Home size={20} /> Back to Safety
  </Button>
</Link>

// After — single semantic <a> with button styling
<Button asChild variant="primary" ...>
  <Link href="/">
    <Home size={20} /> Back to Safety
  </Link>
</Button>

🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Copilot AI mentioned this pull request Feb 21, 2026
10 tasks
@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Feb 21, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
readme-gen-ai Ready Ready Preview, Comment Feb 21, 2026 10:45am

…found.tsx

Co-authored-by: naheel0 <191262736+naheel0@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Feb 21, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • fonts.googleapis.com
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node node /home/REDACTED/.npm/_npx/8b377f6eec906bc4/node_modules/.bin/next build (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Create not-found.tsx UI component Fix invalid semantic HTML: <button> nested inside <a> in not-found.tsx Feb 21, 2026
Copilot AI requested a review from naheel0 February 21, 2026 10:46
@naheel0 naheel0 marked this pull request as ready for review February 21, 2026 10:50
@naheel0 naheel0 requested a review from adithyanmkd as a code owner February 21, 2026 10:50
@naheel0 naheel0 merged commit 71f285f into not-found-page Feb 21, 2026
3 checks passed
@naheel0 naheel0 deleted the copilot/sub-pr-40 branch February 21, 2026 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants