I used WAI material to build a dark mode toggle, and saw some deprecated code

Hello amazing W3C WAI team!

Your website has quickly become my most reliable resource for robust and
accessible web components!

I wanted to share with you my project that relied heavily on WAI's Button
Sample <https://www.w3.org/WAI/ARIA/apg/patterns/button/examples/button/>.
This is the Git repo <https://github.com/tauri-st/dictionary-web-app>, the live
site <https://tauri-st.github.io/dictionary-web-app/>, and the blog posts (1
<https://community.codenewbie.org/taurist/from-front-desk-to-frontend-p35-building-an-accessible-toggle-23-1ofo>
and 2
<https://community.codenewbie.org/taurist/from-front-desk-to-front-end-p36-building-an-accessible-toggle-w-js-33-27hk>)
in which I explained how I used WAI material in order to build my darkmode
toggle.

As I mentioned in the first blog post I linked to, VS code flagged
`event.keyCode` as deprecated, and led me to the MDN docs
<https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode> on
the matter. `event.code` is preferred instead and now supported across
browsers.

I hope this is helpful to you all! Thank you for the amazing work that you
do!

Sincerely,
Tauri

Received on Tuesday, 18 July 2023 11:03:49 UTC