diff --git a/.jules/palette.md b/.jules/palette.md new file mode 100644 index 00000000..c733e11e --- /dev/null +++ b/.jules/palette.md @@ -0,0 +1,3 @@ +## 2024-05-18 - Convert interactive `div` elements to semantic `button`s in custom components +**Learning:** In Next.js with Tailwind CSS, custom interactive UI elements built as `div`s with `cursor-pointer` lack inherent keyboard navigation (Tab-ability) and explicit ARIA roles. The use of `motion.button` and `
- } /> - } /> + } ariaLabel="Notifications" /> + } ariaLabel="User Profile" />
-
+
@@ -62,12 +62,13 @@ function NavLink({ href, label }: { href: string, label: string }) { ); } -function IconButton({ icon }: { icon: React.ReactNode }) { +function IconButton({ icon, ariaLabel }: { icon: React.ReactNode, ariaLabel?: string }) { return ( {icon}