From c58e8925736315f406c2d68597dd72e0ef817c61 Mon Sep 17 00:00:00 2001 From: Tessa Kelly Date: Fri, 5 Apr 2019 11:33:39 -0700 Subject: [PATCH] Adds naive label" --- src/Nri/Ui/SlideModal/V1.elm | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/src/Nri/Ui/SlideModal/V1.elm b/src/Nri/Ui/SlideModal/V1.elm index cf6c52da..11bb505f 100644 --- a/src/Nri/Ui/SlideModal/V1.elm +++ b/src/Nri/Ui/SlideModal/V1.elm @@ -8,6 +8,7 @@ module Nri.Ui.SlideModal.V1 exposing ) import Accessibility.Styled as Html exposing (..) +import Accessibility.Styled.Aria exposing (labelledBy) import Accessibility.Styled.Role as Role import Accessibility.Styled.Widget as Widget import Css @@ -52,8 +53,8 @@ view config (State state) = |> Maybe.withDefault (Html.text "") -viewModal : List (Html msg) -> Html msg -viewModal panels = +viewModal : ( String, List (Html msg) ) -> Html msg +viewModal ( labelledById, panels ) = Nri.Ui.styled div "modal-container" [ Css.width (Css.px 600) @@ -70,7 +71,10 @@ viewModal panels = , Css.flexWrap Css.noWrap , Fonts.baseFont ] - [] + [ Role.dialog + , Widget.modal True + , labelledBy labelledById + ] panels @@ -91,9 +95,7 @@ viewBackdrop modal = , Css.justifyContent Css.center ] ) - [ Role.dialog - , Widget.modal True - ] + [] [ -- This global