@@ -369,7 +369,17 @@ button attrs { onPress, label } =
369369
370370 Just msg ->
371371 Events.onClick msg
372− :: onEnter msg
372+ :: onKeyLookup
373+ (\code ->
374+ if code == enter then
375+ Just msg
376+
377+ else if code == space then
378+ Just msg
379+
380+ else
381+ Nothing
382+ )
373383 :: attrs
374384 )
375385 )
@@ -703,7 +713,7 @@ slider attributes input =
703713 ("input[type=\"range\"]." ++ className ++ "::-ms-thumb")
704714 thumbShadowStyle
705715 )
706− , Internal.Attr (Html.Attributes.class (className ++ " focusable-parent"))
716+ , Internal.Attr (Html.Attributes.class (className ++ " ui-slide-bar focusable-parent"))
707717 , Internal.Attr
708718 (Html.Events.onInput
709719 (\str ->
@@ -769,10 +779,10 @@ slider attributes input =
769779 -- This is after `attributes` because the thumb should be in front of everything.
770780 ++ [ Element.behindContent <|
771781 if vertical then
772− viewVerticalThumb factor thumbAttributes trackWidth
782+ viewVerticalThumb factor (Internal.htmlClass "focusable-thumb" :: thumbAttributes) trackWidth
773783
774784 else
775− viewHorizontalThumb factor thumbAttributes trackHeight
785+ viewHorizontalThumb factor (Internal.htmlClass "focusable-thumb" :: thumbAttributes) trackHeight
776786 ]
777787 )
778788 Element.none
@@ -1555,6 +1565,8 @@ email =
15551565
15561566By default it will have a minimum height of one line and resize based on it's contents.
15571567
1568+Use `Element.spacing` to change its line-height.
1569+
15581570-}
15591571multiline :
15601572 List (Attribute msg)
@@ -2093,7 +2105,11 @@ onKeyLookup lookup =
20932105 Json.field "key" Json.string
20942106 |> Json.andThen decode
20952107 in
2096− Internal.Attr <| Html.Events.on "keyup" isKey
2108+ -- We generally want these attached to the keydown event becaues it allows us to prevent default on things like spacebar scrolling the page.
2109+ -- https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/button_role
2110+ Internal.Attr <|
2111+ Html.Events.preventDefaultOn "keydown"
2112+ (Json.map (\fired -> ( fired, True )) isKey)
20972113
20982114
20992115{-| -}
@@ -2189,7 +2205,8 @@ defaultCheckbox : Bool -> Element msg
21892205defaultCheckbox checked =
21902206 Element.el
21912207 [ Internal.htmlClass "focusable"
2192− , Element.width (Element.px 14)
2208+ , Element.width
2209+ (Element.px 14)
21932210 , Element.height (Element.px 14)
21942211 , Font.color white
21952212 , Element.centerY
@@ -2225,9 +2242,8 @@ defaultCheckbox checked =
22252242
22262243 else
22272244 1
2228− ]
2229− (if checked then
2230− Element.el
2245+ , Element.inFront
2246+ (Element.el
22312247 [ Border.color white
22322248 , Element.height (Element.px 6)
22332249 , Element.width (Element.px 9)
@@ -2235,6 +2251,7 @@ defaultCheckbox checked =
22352251 , Element.centerX
22362252 , Element.centerY
22372253 , Element.moveUp 1
2254+ , Element.transparent (not checked)
22382255 , Border.widthEach
22392256 { top = 0
22402257 , left = 2
@@ -2243,7 +2260,6 @@ defaultCheckbox checked =
22432260 }
22442261 ]
22452262 Element.none
2246−
2247− else
2248− Element.none
2249− )
2263+ )
2264+ ]
2265+ Element.none