fix: improve alt text

empty for decorative images, describe links
This commit is contained in:
Solomon Victorino 2024-05-08 22:22:06 -06:00
parent 119843dad7
commit 5451a1dadf
4 changed files with 5 additions and 5 deletions

View file

@ -9,7 +9,7 @@ templ AlbumPage(a data.Album) {
@layout(fmt.Sprintf("%s - %s", a.Artist, a.Name)) { @layout(fmt.Sprintf("%s - %s", a.Artist, a.Name)) {
<div id="container"> <div id="container">
<div id="metadata"> <div id="metadata">
<img id="album-artwork" src={ data.ExtractImageURL(a.Image) } alt="Album image"/> <img id="album-artwork" src={ data.ExtractImageURL(a.Image) } alt=""/>
<div id="metadata-info"> <div id="metadata-info">
<h2>{ a.Artist }</h2> <h2>{ a.Artist }</h2>
<h1>{ a.Name }</h1> <h1>{ a.Name }</h1>

View file

@ -12,7 +12,7 @@ templ LyricsPage(s data.Song) {
<img <img
id="album-artwork" id="album-artwork"
src={ data.ExtractImageURL(s.Image) } src={ data.ExtractImageURL(s.Image) }
alt="Song image" alt=""
/> />
<div id="metadata-info"> <div id="metadata-info">
<h2>{ s.Artist }</h2> <h2>{ s.Artist }</h2>
@ -49,7 +49,7 @@ templ LyricsPage(s data.Song) {
title={ "Album: " + s.Album.Name } title={ "Album: " + s.Album.Name }
id="album-artwork" id="album-artwork"
src={ s.Album.Image } src={ s.Album.Image }
alt="Album image" alt="Album page"
/> />
</a> </a>
</div> </div>

View file

@ -3,7 +3,7 @@ package views
templ navbar() { templ navbar() {
<nav> <nav>
<div id="nav-container"> <div id="nav-container">
<a href="/"><img src="/static/logo.svg" alt="Logo"/></a> <a href="/"><img src="/static/logo.svg" alt="Home page"/></a>
<div id="nav-icons"> <div id="nav-icons">
<a <a
title="Go to Genius.com" title="Go to Genius.com"

View file

@ -19,7 +19,7 @@ templ SearchPage(r data.SearchResults) {
<a id="search-item" href={ templ.URL(s.Result.Path) }> <a id="search-item" href={ templ.URL(s.Result.Path) }>
<img <img
src={ data.ExtractImageURL(s.Result.Thumbnail) } src={ data.ExtractImageURL(s.Result.Thumbnail) }
alt={ fmt.Sprintf("%s image", s.Result.Title) } alt=""
/> />
<div> <div>
<span>{ s.Result.ArtistNames }</span> <span>{ s.Result.ArtistNames }</span>