Add keybindings for color picker (#647)

* Add keybindings for color picker

This adds the ability to navigate using left/right/bottom/up keys and shows key bindings for all the different colors. This is only optimized for the qwerty keyboard layout, but unfortunately it's not possible to detect other keyboard layouts :(

* add aria-keyshortcuts and keybinding in title

* make focus select color, confirm on enter

Co-authored-by: David Luzar <luzar.david@gmail.com>
This commit is contained in:
Christopher Chedeau
2020-02-01 12:56:15 +00:00
committed by GitHub
parent 1e4ce77612
commit 46791e6da1
2 changed files with 76 additions and 12 deletions

View File

@ -107,3 +107,11 @@
margin-right: 0.25rem;
border: 1px solid #dee2e6;
}
.color-picker-keybinding {
position: absolute;
bottom: 2px;
right: 2px;
font-size: 0.7em;
color: #ccc;
}