mirror of
https://github.com/NoRedInk/noredink-ui.git
synced 2024-12-01 00:34:27 +03:00
add aria stuff that checkbox does
This commit is contained in:
parent
9bac079e0b
commit
af18e1e32e
@ -7,6 +7,7 @@ module Nri.Ui.Switch.V1 exposing (view, Attribute, onSwitch, disabled, id, label
|
||||
-}
|
||||
|
||||
import Accessibility.Styled as Html exposing (Html)
|
||||
import Accessibility.Styled.Aria as Aria
|
||||
import Accessibility.Styled.Widget as Widget
|
||||
import Css
|
||||
import Html.Styled as WildWildHtml
|
||||
@ -95,6 +96,8 @@ view attrs isOn =
|
||||
, Css.alignItems Css.middle
|
||||
, Css.position Css.relative
|
||||
]
|
||||
, Aria.controls config.id
|
||||
, Widget.checked (Just isOn)
|
||||
]
|
||||
[ viewCheckbox
|
||||
{ id = config.id
|
||||
|
Loading…
Reference in New Issue
Block a user