Skip to content

Commit

Permalink
Add missing label
Browse files Browse the repository at this point in the history
  • Loading branch information
Dumazeau committed Nov 29, 2021
1 parent e514c69 commit 5c01ed4
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
1 change: 1 addition & 0 deletions elm/Internal/CookiesRegulationModal.elm
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ serviceView locale service =
, htmlWhenNot service.mandatory <|
SwitchCheckbox.view
{ id = service.id
, label = service.name
, isChecked = service.enabled
, msg_ = MsgUpdateServiceStatus service.id
}
Expand Down
4 changes: 3 additions & 1 deletion elm/Internal/SwitchCheckbox.elm
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import Internal.Helpers exposing (attrWhen)

type alias Configuration msg =
{ id : String
, label : String
, isChecked : Bool
, msg_ : msg
}
Expand All @@ -20,7 +21,8 @@ view config =
, class "cookies-regulation-switch-checkbox-container-checked" |> attrWhen config.isChecked
]
[ div [ class "cookies-regulation-switch-checkbox-input-container" ]
[ input
[ label [ for config.id, class "label-hidden" ] [ text config.label ]
, input
[ class "cookies-regulation-switch-checkbox"
, type_ "checkbox"
, id config.id
Expand Down
12 changes: 12 additions & 0 deletions scss/cookies-regulation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,18 @@
width: 100vw;
z-index: 2147483645;
}

.label-hidden {
position: absolute !important;
width: 1px !important;
height: 1px !important;
padding: 0 !important;
margin: -1px !important;
overflow: hidden !important;
clip: rect(0, 0, 0, 0) !important;
white-space: nowrap !important;
border: 0 !important;
}
}

#cookies-regulation-clock-icon {
Expand Down

0 comments on commit 5c01ed4

Please sign in to comment.