Nodejs.dev: Dark mode toggle button does not work with keyboard events

Created on 11 Mar 2021  路  1Comment  路  Source: nodejs/nodejs.dev

Description

Dark mode toggle button does not work with keyboard events

<button type="button" class="dark-mode-toggle">
    <span class="sr-only">Toggle Dark Mode</span>
    <i class="material-icons light-mode-only">nights_stay</i>
    <i class="material-icons dark-mode-only">wb_sunny</i>
</button>

Steps to reproduce

Set focus on button, hit Enter or Space.

Expected result

Button should react to keyboard events and should toggle the theme.

Actual result

Nothing happens.

Environment

  • OS Version: win32(6.1.7601)
  • Browser Version: Chrome 89.0.4389.82 (Official Build) (32-bit) (cohort: 89_Win_72)
bug good first issue help wanted

Most helpful comment

I would like to work on this

>All comments

I would like to work on this

Was this page helpful?
0 / 5 - 0 ratings

Related issues

benhalverson picture benhalverson  路  3Comments

antsmartian picture antsmartian  路  3Comments

LaRuaNa picture LaRuaNa  路  4Comments

ollelauribostrom picture ollelauribostrom  路  3Comments

benhalverson picture benhalverson  路  4Comments