mirror of
https://github.com/NoRedInk/noredink-ui.git
synced 2024-12-20 04:01:40 +03:00
prefer accessible to html when possible
This commit is contained in:
parent
b4c3fddbd8
commit
ffee7f91f9
@ -62,13 +62,13 @@ There will generally be a `*Button` and `*Link` version of each button style.
|
|||||||
|
|
||||||
-- import EventExtras
|
-- import EventExtras
|
||||||
|
|
||||||
import Accessibility.Styled exposing (..)
|
import Accessibility.Styled as Html exposing (..)
|
||||||
import Accessibility.Styled.Role as Role
|
import Accessibility.Styled.Role as Role
|
||||||
import Accessibility.Styled.Widget as Widget
|
import Accessibility.Styled.Widget as Widget
|
||||||
import Css exposing (..)
|
import Css exposing (..)
|
||||||
import Css.Foreign
|
import Css.Foreign
|
||||||
import EventExtras
|
import EventExtras
|
||||||
import Html.Styled as Html
|
import Html.Styled as Styled
|
||||||
import Html.Styled.Attributes as Attributes exposing (..)
|
import Html.Styled.Attributes as Attributes exposing (..)
|
||||||
import Html.Styled.Events as Events exposing (onClick)
|
import Html.Styled.Events as Events exposing (onClick)
|
||||||
import Json.Decode
|
import Json.Decode
|
||||||
@ -491,7 +491,7 @@ linkExternalWithTracking onTrack =
|
|||||||
-}
|
-}
|
||||||
linkBase : String -> List (Attribute msg) -> LinkConfig -> Html msg
|
linkBase : String -> List (Attribute msg) -> LinkConfig -> Html msg
|
||||||
linkBase linkFunctionName extraAttrs config =
|
linkBase linkFunctionName extraAttrs config =
|
||||||
Nri.Ui.styled Html.a
|
Nri.Ui.styled Styled.a
|
||||||
(styledName linkFunctionName)
|
(styledName linkFunctionName)
|
||||||
(buttonStyles config.size config.width (styleToColorPalette config.style) Anchor
|
(buttonStyles config.size config.width (styleToColorPalette config.style) Anchor
|
||||||
++ [ whiteSpace noWrap
|
++ [ whiteSpace noWrap
|
||||||
@ -568,7 +568,7 @@ renderMarkdown markdown =
|
|||||||
-- It seems to be always first wrapped in a `Paragraph` and never directly a `PlainInline`
|
-- It seems to be always first wrapped in a `Paragraph` and never directly a `PlainInline`
|
||||||
[ Markdown.Block.Paragraph _ inlines ] ->
|
[ Markdown.Block.Paragraph _ inlines ] ->
|
||||||
List.map Markdown.Inline.toHtml inlines
|
List.map Markdown.Inline.toHtml inlines
|
||||||
|> List.map Html.fromUnstyled
|
|> List.map Styled.fromUnstyled
|
||||||
|
|
||||||
_ ->
|
_ ->
|
||||||
[ Html.text markdown ]
|
[ Html.text markdown ]
|
||||||
|
Loading…
Reference in New Issue
Block a user