mirror of
https://github.com/NoRedInk/noredink-ui.git
synced 2024-11-27 13:02:42 +03:00
Remove dependency on Nri.Accessibility from the inputs
This commit is contained in:
parent
4ca27fc05c
commit
e05c353980
@ -8,7 +8,6 @@ module Nri.Ui.InputStyles exposing (Assets, CssClasses(..), styles)
|
||||
|
||||
import Css exposing (..)
|
||||
import Css.Foreign exposing (Snippet, adjacentSiblings, children, class, descendants, each, everything, media, selector, withClass)
|
||||
import Nri.Accessibility
|
||||
import Nri.Colors exposing (..)
|
||||
import Nri.Fonts
|
||||
import Nri.Stylers
|
||||
@ -22,7 +21,6 @@ import Nri.Ui.Styles.V1 as Styles
|
||||
-}
|
||||
type CssClasses
|
||||
= Container
|
||||
| InvisibleLabel
|
||||
| Label
|
||||
| Input
|
||||
| IsInError
|
||||
@ -106,9 +104,6 @@ styles =
|
||||
, class Container
|
||||
[ position relative
|
||||
]
|
||||
, class InvisibleLabel
|
||||
[ Nri.Accessibility.invisibleText
|
||||
]
|
||||
, class Label
|
||||
[ backgroundColor Nri.Colors.white
|
||||
, left (px 10)
|
||||
|
@ -17,6 +17,7 @@ module Nri.Ui.TextArea.V1
|
||||
|
||||
-}
|
||||
|
||||
import Accessibility.Style
|
||||
import Html exposing (..)
|
||||
import Html.Attributes exposing (..)
|
||||
import Html.Events exposing (onInput)
|
||||
@ -116,14 +117,19 @@ view_ textAreaStyle model =
|
||||
else
|
||||
Html.textarea sharedAttributes
|
||||
[ Html.text model.value ]
|
||||
, Html.label
|
||||
[ for (generateId model.label)
|
||||
, styles.classList
|
||||
[ ( InvisibleLabel, not model.showLabel )
|
||||
, ( Label, True )
|
||||
, if not model.showLabel then
|
||||
Html.label
|
||||
[ for (generateId model.label)
|
||||
, styles.class [ Label ]
|
||||
, Accessibility.Style.invisible
|
||||
]
|
||||
]
|
||||
[ Html.text model.label ]
|
||||
[ Html.text model.label ]
|
||||
else
|
||||
Html.label
|
||||
[ for (generateId model.label)
|
||||
, styles.class [ Label ]
|
||||
]
|
||||
[ Html.text model.label ]
|
||||
]
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user