🎨 Palette: Improve accessibility and UX for button links#10
🎨 Palette: Improve accessibility and UX for button links#10
Conversation
- Fixed semantic HTML by using Radix `asChild` for `<Link>` and `<a>` elements inside `<Button>` components in `NetworkItem.tsx` and `GmapsButton.tsx`. - Added a `MapPin` icon to the "Show in Google Maps" button to improve visual context. - Added `rel="noopener noreferrer"` to external Google Maps links for security and performance. - Fixed TypeScript primitive types for latitude/longitude props. - Refactored TanStack Router `<Link>` components to use type-safe `to` and `params` props instead of string interpolation. Co-authored-by: Twinber <5513621+Twinber@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
🎨 Palette: Improve Accessibility and UX for Button Links
💡 What
This PR addresses several micro-UX and accessibility improvements for interactive link elements styled as buttons:
NetworkItem.tsxandGmapsButton.tsxto correctly use the<Button asChild>pattern.MapPinicon fromlucide-react(witharia-hidden="true") to the Google Maps button to visually enforce its purpose.rel="noopener noreferrer".🎯 Why
Previously, the codebase was wrapping semantic link elements (
<Link>and<a>) inappropriately, either embedding them directly inside<button>elements or completely omitting semantic linking by applying button classes to arbitrary elements. Nesting a button within an anchor tag is invalid HTML and causes screen-reader issues and degraded keyboard navigation support. Using Shadcn/Radix'sasChildpattern gracefully solves this by applying the correct Button design system styles directly onto the semantic<Link>or<a>tag.📸 Before/After
(Visuals successfully verified with Playwright during implementation)
MapPinicon for external maps!♿ Accessibility
aria-hidden="true").PR created automatically by Jules for task 5121534829624105929 started by @Twinber