mirror of
https://github.com/TheAnachronism/docspell.git
synced 2024-11-13 02:31:10 +00:00
37 lines
597 B
Elm
37 lines
597 B
Elm
|
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
|