diff --git a/.jules/palette.md b/.jules/palette.md new file mode 100644 index 0000000..e86a6ac --- /dev/null +++ b/.jules/palette.md @@ -0,0 +1,3 @@ +## 2024-05-12 - Navbar Accessibility Improvements +**Learning:** Interactive disclosure widgets (like dropdowns and mobile menus) across the app were missing `aria-expanded` attributes and visible focus rings, hindering keyboard and screen reader accessibility. +**Action:** Add `aria-expanded`, `aria-haspopup`, `aria-label`, and explicit focus rings (`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-500`) to all such interactive elements to comply with keyboard accessibility standards. \ No newline at end of file diff --git a/src/components/layout/Navbar.jsx b/src/components/layout/Navbar.jsx index de3fea5..da9bef3 100644 --- a/src/components/layout/Navbar.jsx +++ b/src/components/layout/Navbar.jsx @@ -21,7 +21,7 @@ const Navbar = () => { const [isDropdownOpen, setIsDropdownOpen] = useState(false); const dropdownRef = useRef(null); const location = useLocation(); - const { theme, toggleTheme, isDark } = useTheme(); + const { toggleTheme, isDark } = useTheme(); // Close dropdown when clicking outside useEffect(() => { @@ -95,7 +95,9 @@ const Navbar = () => {