@@ -369,17 +369,7 @@ button attrs { onPress, label } =
369369
370370 Just msg ->
371371 Events.onClick 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− )
372+ :: onEnter msg
383373 :: attrs
384374 )
385375 )
@@ -713,7 +703,7 @@ slider attributes input =
713703 ("input[type=\"range\"]." ++ className ++ "::-ms-thumb")
714704 thumbShadowStyle
715705 )
716− , Internal.Attr (Html.Attributes.class (className ++ " ui-slide-bar focusable-parent"))
706+ , Internal.Attr (Html.Attributes.class (className ++ " focusable-parent"))
717707 , Internal.Attr
718708 (Html.Events.onInput
719709 (\str ->
@@ -779,10 +769,10 @@ slider attributes input =
779769 -- This is after `attributes` because the thumb should be in front of everything.
780770 ++ [ Element.behindContent <|
781771 if vertical then
782− viewVerticalThumb factor (Internal.htmlClass "focusable-thumb" :: thumbAttributes) trackWidth
772+ viewVerticalThumb factor thumbAttributes trackWidth
783773
784774 else
785− viewHorizontalThumb factor (Internal.htmlClass "focusable-thumb" :: thumbAttributes) trackHeight
775+ viewHorizontalThumb factor thumbAttributes trackHeight
786776 ]
787777 )
788778 Element.none
@@ -1565,8 +1555,6 @@ email =
15651555
15661556By default it will have a minimum height of one line and resize based on it's contents.
15671557
1568−Use `Element.spacing` to change its line-height.
1569−
15701558-}
15711559multiline :
15721560 List (Attribute msg)
@@ -2105,11 +2093,7 @@ onKeyLookup lookup =
21052093 Json.field "key" Json.string
21062094 |> Json.andThen decode
21072095 in
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)
2096+ Internal.Attr <| Html.Events.on "keyup" isKey
21132097
21142098
21152099{-| -}
@@ -2205,8 +2189,7 @@ defaultCheckbox : Bool -> Element msg
22052189defaultCheckbox checked =
22062190 Element.el
22072191 [ Internal.htmlClass "focusable"
2208− , Element.width
2209− (Element.px 14)
2192+ , Element.width (Element.px 14)
22102193 , Element.height (Element.px 14)
22112194 , Font.color white
22122195 , Element.centerY
@@ -2242,8 +2225,9 @@ defaultCheckbox checked =
22422225
22432226 else
22442227 1
2245− , Element.inFront
2246− (Element.el
2228+ ]
2229+ (if checked then
2230+ Element.el
22472231 [ Border.color white
22482232 , Element.height (Element.px 6)
22492233 , Element.width (Element.px 9)
@@ -2251,7 +2235,6 @@ defaultCheckbox checked =
22512235 , Element.centerX
22522236 , Element.centerY
22532237 , Element.moveUp 1
2254− , Element.transparent (not checked)
22552238 , Border.widthEach
22562239 { top = 0
22572240 , left = 2
@@ -2260,6 +2243,7 @@ defaultCheckbox checked =
22602243 }
22612244 ]
22622245 Element.none
2263− )
2264− ]
2265− Element.none
2246+
2247+ else
2248+ Element.none
2249+ )