Repository navigation
fix: sitemap SEO contradiction, duplicate error UI, nested interactive elements, and menu keyboard navigation - #667
Merged
DeFiVC merged 4 commits intoOct 22, 2026
Conversation
Crawlers were seeing /connect in the sitemap while robots.txt disallowed it, wasting crawl budget. Remove the entry so all sitemap URLs are indexable. Fixes ChainLearnOfficial#559
handleClaim already surfaces the failure via addToast, but the re-throw was also caught by the route error boundary and rendered a second error UI on top of the toast. Drop the re-throw so the toast is the only error indication. Fixes ChainLearnOfficial#560
The card was wrapped in <Link> which contained buttons and a dropdown, producing invalid <a><button> nesting and trapping keyboard users. Replace the wrapper with role="link" + onClick/router.push + Enter/Space handler, and stop propagation on inner controls so the dropdown and action buttons stay independently operable. Fixes ChainLearnOfficial#561
The wallet dropdown used role="menu"/"menuitem" but only handled Escape and click-outside. WCAG requires arrow-key navigation for menu widgets. Move focus between menu items with ArrowUp/ArrowDown and jump to first/ last with Home/End; Escape already closes and restores focus to the trigger. Fixes ChainLearnOfficial#562
❌ Deploy Preview for chainlearn failed.
|
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #559, Closes #560, Closes #561, Closes #562
Type of Change
Summary
Four independent small fixes across SEO metadata, error handling, and accessibility:
sitemap.tslisted/connectwhilerobots.txtdisallows it, wasting crawl budget. Removed the entry so every sitemap URL is indexable.handleClaimin the rewards page re-threw afteraddToast, so the route error boundary rendered a second error UI on top of the toast. Dropped the re-throw.course-card.tsxwrapped the whole card in<Link>around buttons and a dropdown, producing invalid<a><button>nesting and a keyboard trap. Replaced the wrapper withrole="link"+router.push+ Enter/Space handler.connect-button.tsxdropdown usedrole="menu"but had no arrow-key navigation. Added ArrowUp/ArrowDown and Home/End focus movement between menu items.Motivation / Context
Closes #559, Closes #560, Closes #561, Closes #562
Changes
src/app/sitemap.ts/connectstatic entrysrc/app/rewards/page.tsxthrow errafteraddToastsrc/components/course/course-card.tsx<Link>wrapper; addedrole="link",tabIndex={0},onClick/onKeyDownnavigation,stopPropagationon inner controlssrc/components/wallet/connect-button.tsxonKeyDownhandler on therole="menu"container for ArrowUp/ArrowDown/Home/EndTesting
/,/courses,/courses/*) are all allowed byrobots.txthandleClaimno longer re-throws — toast is the sole error indication<a>inside<a>/<button>; dropdown and action buttons remain independently focusable and operableTradeoffs
role="link"+router.pushon a<div>-like Card rather than a real<a>, per the issue's explicit scope. This loses middle-click/Cmd+clickopen-in-new-tab, which is noted as the accepted tradeoff for eliminating nested interactive elements.DropdownMenu, per the issue's "or" option — smaller diff, no new dependency.Out of scope