by toastal · 3y ago · 0 comments
Don't do: <h1><img src alt="ACME logo">ACME</h1>.
A better example is when a site has little stock photo thumbnails with article titles on a navigational page. The screen reader can read the title text; knowing what’s in the thumbnail adds nothing.
Images should only have alt text when they contain “real” content (for example if it is an original photo that is relevant to the associated story).
<h1><img src alt="ACME logo">ACME</h1>
What gets rendered and read is what you would never want ACME logoACME
If you don't have or use actual text nearby then you just do this: <h1><img src alt="ACME"></h1>