I’ve got an application where I’m rendering a lot of Svgs.
On one specific I want to have display on hover info. Using title attribute won’t do it on svgs. A trick is to use <title> (SVG Title vs. HTML Title Attribute | CSS-Tricks - CSS-Tricks), but elm doesn’t allow <title>, since I guess its a head.
Trying to add the hoverInfo on the image.
iconSvg : Float -> Float -> String -> Svg msg
iconSvg width height path =
TSvg.svg
[ TSvgA.viewBox 0 0 64 64
, InPx.width width
, InPx.height height
]
[ TSvg.image [ TSvgA.href path ] [] ]
The rendering function
(...)
[ TSvg.g
[ [ TSvgTypes.Translate x y ] |> TSvgA.transform
, TSvgA.class [ "testElement" ]
]
[ iconSvg, hoverInfo ]
]
Any suggestions on workarounds for this?