GarimaSingh0109 / WasteManagment

https://garimasingh0109.github.io/WasteManagment/
MIT License
49 stars 122 forks source link

Enhance Theme Toggle Functionality with Keyboard Accessibility #262

Open ak-0404 opened 1 month ago

ak-0404 commented 1 month ago

Description

This will improve the user experience by adding keyboard accessibility to the theme toggle button. Users will be able to switch between dark and light modes using the "Enter" key when the button is focused, ensuring better accessibility for keyboard navigators.

Additionally, we can include a check for the user's theme preference stored in localStorage, ensuring a consistent experience across sessions. This enhancement can create a more user-friendly interface.

Motivation

This pull request improves the theme toggle feature by allowing users to switch between dark and light modes using the "Enter" key when the button is focused. This makes the application more accessible for those who prefer keyboard navigation. Additionally, it saves the user's theme choice using localStorage, ensuring their preferred setting is applied every time they return to the app. These enhancements make the application more user-friendly and inclusive without complicating the existing code structure.

Screenshots

No response

Additional Context

No response

Checklist

Priority

Medium

CowTheGreat commented 1 month ago

Hi please assign me this issue

ak-0404 commented 1 month ago

@GarimaSingh0109 Hello, I opened this issue. Please assign it to me, Thank You!