Add delay to dark mode toggle keyboard shortcut (accessibility)

  1. What is your original issue/pain point you want to solve?
    The current way the keyboard shortcut for toggling dark mode with the ‘d’ key is potentially hazardous, as when the key is held down, the screen flickers. For people with photosensitive epilepsy, this could be very problematic and dangerous, which is especially problematic since there is no way for a user to easily disable the shortcut.

  2. Which are one or two concrete situations where this problem hurts the most?
    A user of the system with photosensitivity accidentally holds down the d key, triggering the dark mode toggle repeatedly, resulting in the screen flashing, triggering a seizure in the user, eventually leading to them dying. A bit extreme, sure, but not entirely unrealistic

  3. Why is it not solvable with the Zammad standard?
    There is no way to disable the keyboard shortcut, and no warning about this is given to a new user.

  4. What is your expectation/what do you want to achieve?
    The simplest solution would probably be to make the keyboard shortcut trigger once per keystroke (as is possible, I believe, although I am no expert in CoffeeScript), but it would also be nice if a user had control of the shortcuts, with the ability to disable them entirely.

We should generally aim to avoid harming the user, in my opinion.

1 Like

Interesting request!

Although it was not our primary goal, we just applied some keyboard shortcut improvements that can be used to mitigate this behavior. With the fix in place for #4870, it’s now possible to globally turn off keyboard shortcuts, e.g. they will not be considered. This was done in an effort to improve the overall accessibility of the app, we hope you find it useful.