docspell/website/elm/ExtraAttr.elm

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

37 lines
597 B
Elm
Raw Permalink Normal View History

2020-07-27 20:13:22 +00:00
module ExtraAttr exposing (..)
import Html exposing (..)
import Html.Attributes exposing (..)
ariaExpanded : Bool -> Attribute msg
ariaExpanded flag =
attribute "aria-expanded"
(if flag then
"true"
else
"false"
)
ariaHidden : Bool -> Attribute msg
ariaHidden flag =
attribute "aria-hidden"
(if flag then
"true"
else
"false"
)
ariaLabel : String -> Attribute msg
ariaLabel name =
attribute "aria-label" name
role : String -> Attribute msg
role name =
attribute "role" name