Character Key Shortcuts

Modern websites provide custom keyboard shortcuts to perform specific actions. These are provided to enhance the user experience of a website.

Sample keyboard shortcut to switch between light and dark mode
Figure 1 Example of character key shortcut to change the page to dark mode.

These shortcuts are usually single key presses using letters, punctuation, numbers or symbol characters. Single key press shortcuts can prove frustrating for users who operate their devices using speech input as these shortcuts can get activated while giving speech commands. It can also interfere with the shortcuts available for assistive technology such as screen readers.

NOTE:

  • New to accessibility or uncertain of requirements, it will be helpful to review all sections below.
  • Already familiar with requirements, skip to the “Working Example” section for sample HTML, CSS and JavaScript (when needed), along with a working demo.