Widget talk:Book cover

Error cases
Looking at the test cases in Template:Book cover, I'm wondering if it would be better to simply write "No image found" for the invalid ISBNs. The reader sees an image and then has to look harder to see that it's not the intended book. Text is easier to interpret, especially for those who need accessibility. --LadyGeek 12:00, 27 August 2023 (UTC)
 * There are two error cases to consider. One is invalid ISBN. The other is valid ISBN but with no cover image.
 * For the first, invalid ISBN, the result is actually no image at all; that is, absolutely no generated HTML. What you're seeing in the documentation is just an artifact of Template:Markup, which makes them appear as if they are. This appearance won't occur outside of test cases using Template:Markup, not only because there's no generated HTML here, but also because the call site for Template:Book cover in Bogleheads:Book sources will sit inside a region that runs only if the ISBN is valid, and not if invalid.
 * For the second, there is a default image, but that image is text that indicates there is no cover art. Adding alt text to this is relatively easy, but repeating the book title seems a bit pointless, since it's already on screen and so accessible. Maybe just "Image of the book's cover"? --TedSwippet 13:43, 27 August 2023 (UTC)
 * I've edited the widget code to remove the "No cover art" image and behaviour. It now shows nothing at all unless the ISBN is valid, is a book, and that book has an associated cover image. This should be clear -- cover images are decorative and optional. Book cover image alt is blank, as recommended by MOS. --TedSwippet 17:33, 27 August 2023 (UTC)