This commit is contained in:
Brian J. Cardiff 2022-07-11 11:22:51 -03:00
parent cc614340bc
commit b2d09b237c

View File

@ -17,6 +17,8 @@ what to do in reponse to tab keypresses in a part of the UI.
The ids referenced here are expected to correspond to elements in the container
we are adding the attribute to.
NOTE: When needing to listen to multiple keys toDecoder should be used instead of toAttribute.
-}
toAttribute :
{ firstId : String
@ -29,6 +31,22 @@ toAttribute config =
Key.onKeyDown [ toDecoder config ]
{-| Use this decoder to add a focus watcher to an HTML element and define
what to do in reponse to tab keypresses in a part of the UI.
The ids referenced here are expected to correspond to elements in the container
we are adding the attribute to.
NOTE: When needing to listen to multiple keys toDecoder should be used instead of toAttribute.
import Accessibility.Styled.Key as Key
Key.onKeyDown
[ Key.escape CloseModal
, toDecoder config
]
-}
toDecoder :
{ firstId : String
, lastId : String