diff --git a/utils/editform/editform.go b/utils/editform/editform.go index 49fe976c..4c195f83 100644 --- a/utils/editform/editform.go +++ b/utils/editform/editform.go @@ -214,7 +214,7 @@ func renderStringField(b *bytes.Buffer, v *reflect.Value, field reflect.StructFi anime, err := arn.GetAnime(animeID) if err == nil { - b.WriteString(components.EditFormImagePreview(anime.Link(), anime.ImageLink("small"), true)) + b.WriteString(components.EditFormImagePreview(anime.Link(), anime.ImageLink("small"), true, anime.Title.ByUser(nil))) } case "Character": @@ -222,7 +222,7 @@ func renderStringField(b *bytes.Buffer, v *reflect.Value, field reflect.StructFi character, err := arn.GetCharacter(characterID) if err == nil { - b.WriteString(components.EditFormImagePreview(character.Link(), character.ImageLink("medium"), false)) + b.WriteString(components.EditFormImagePreview(character.Link(), character.ImageLink("medium"), true, character.Name.ByUser(nil))) } case "": diff --git a/utils/editform/editform.pixy b/utils/editform/editform.pixy index ff4d8e93..29bf789c 100644 --- a/utils/editform/editform.pixy +++ b/utils/editform/editform.pixy @@ -1,3 +1,3 @@ -component EditFormImagePreview(link string, imageURL string, webp bool) - a(href=link, target="_blank") +component EditFormImagePreview(link string, imageURL string, webp bool, title string) + a.tip(href=link, target="_blank", aria-label=title) img.lazy(data-src=imageURL, alt="Preview", data-webp=webp) \ No newline at end of file