Document the current keyboard behavior

I vaguely suspect that tab should take the user into the controlled content, rather than through the rest of the control options... but will elave it to testing
This commit is contained in:
Tessa Kelly 2020-08-04 17:58:29 -07:00
parent fc2c79817d
commit a98e805abf
2 changed files with 10 additions and 1 deletions

View File

@ -63,7 +63,12 @@ example =
]
, categories = [ Inputs, Widgets, Layout ]
, atomicDesignType = Molecule
, keyboardSupport = []
, keyboardSupport =
[ { keys = [ Enter ], result = "Select the focused control" }
, { keys = [ Space ], result = "Select the focused control" }
, { keys = [ Tab ], result = "Focus the next focusable element" }
, { keys = [ Tab, Shift ], result = "Focus the previous focusable element" }
]
}

View File

@ -55,6 +55,7 @@ type Key
| Enter
| Arrow Direction
| Tab
| Space
keyToString : Key -> String
@ -72,6 +73,9 @@ keyToString key =
Tab ->
"Tab"
Space ->
"Space"
{-| -}
type Direction