Bug 12255 - Amazon cover images have useless image alt text in bootstrap
Summary: Amazon cover images have useless image alt text in bootstrap
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low trivial (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-05-14 08:46 UTC by paxed
Modified: 2015-06-04 23:30 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: String patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 12255 - Amazon cover images have useless image alt text in bootstrap (6.63 KB, patch)
2014-05-22 17:25 UTC, Owen Leonard
Details | Diff | Splinter Review
[SIGNED OFF] Bug 12255 - Amazon cover images have useless image alt text in bootstrap (6.79 KB, patch)
2014-06-11 21:45 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 12255 - Amazon cover images have useless image alt text in bootstrap (6.94 KB, patch)
2014-06-21 16:04 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description paxed 2014-05-14 08:46:12 UTC
opac-tmpl/bootstrap/en/modules/opac-user.tt:

 alt="item-thumbnail" class="item-thumbnail"
Comment 1 Owen Leonard 2014-05-22 17:25:29 UTC Comment hidden (obsolete)
Comment 2 David Cook 2014-05-23 00:28:57 UTC
I think something like "Amazon.com book cover image" might actually make more appropriate alt text, since - at least from an accessibility point of view - the alt text should describe the content that it replaces. 

http://www.w3.org/standards/webdesign/accessibility
Comment 3 Owen Leonard 2014-05-23 14:22:45 UTC
(In reply to David Cook from comment #2)
> I think something like "Amazon.com book cover image" might actually make
> more appropriate alt text

I would contend that "Amazon.com book cover image" is not useful information to a person who is navigating the the interface without images. Is it useful to them to know that there is a book cover image there? I would say no, but obviously I'm guessing.
Comment 4 David Cook 2014-05-26 07:38:21 UTC
(In reply to Owen Leonard from comment #3)
> (In reply to David Cook from comment #2)
> > I think something like "Amazon.com book cover image" might actually make
> > more appropriate alt text
> 
> I would contend that "Amazon.com book cover image" is not useful information
> to a person who is navigating the the interface without images. Is it useful
> to them to know that there is a book cover image there? I would say no, but
> obviously I'm guessing.

I should ask some of my accessibility friends :). 

Admittedly, I'm mostly making guesses as well. I think that alt text of "Amazon.com book cover image" would let people know that's the thing that they're not seeing. 

In terms of "View at Amazon.com", that is already being provided by the "a" element. Screen readers will pick that up, and sighted users can notice it when hovering over the link.

I think there are cases when the alt text is supposed to be useful data. For instance...say you have button images, and one is red to show that it's "active" in comparison to the "inactive" blue images. In that case, I imagine something like "active button" or "active tab" or something like that would be useful. It's still a description, but actually useful, whereas "Amazon.com book cover image" isn't really useful...but is still descriptive.

At least, I think that's roughly how it works. Happy to be educated otherwise. 

I'll send out some feelers to the folk I know who work/need in accessibility.
Comment 5 David Cook 2014-05-26 07:51:40 UTC
Taking a look at Wikipedia... http://en.wikipedia.org/wiki/Wikipedia:Alternative_text_for_images

Here's a particularly relevant section:

http://en.wikipedia.org/wiki/Wikipedia:Alternative_text_for_images#Importance_of_context

Since the purpose of the cover image is mostly aesthetic, I think minimal text describing what the image is makes the most sense.

I'll see what my accessibility folk come back with, but since we can't individually curate alt text for dynamically generated images, I think "Amazon.com book cover image" is a good choice.

Or something similar to that. I'm actually not that committed to that string of text. 

I just want to make sure that we're adhering as closely as possible to WCAG 2.0 ^_^
Comment 6 David Cook 2014-05-26 08:02:13 UTC
Ok, I'm a bit of a keener...

Liz Rea suggested the alt text of "cover image for <title of book>".

I have a partially blind friend who appears to think that is also a good idea.
Comment 7 David Cook 2014-05-26 08:13:18 UTC
Ok, so here's a quote from my friend in regards to link text:

"I'd want to see it say it is a cover of (title) and maybe the link info i.e. like you're saying view on amazon. So I was trying to imply that same method would hold true for most images, say you have a photo of a statue, you'd say statue of (statue name/description) links to (whatever it links to maybe larger version)."

Using that formula, we would come up with something like:

"Cover of <resource title>. View on Amazon.com"

So...both my suggestion, Liz's, and Owen's?
Comment 8 Mark Tompsett 2014-06-11 21:45:20 UTC Comment hidden (obsolete)
Comment 9 Mark Tompsett 2014-06-11 21:50:15 UTC
The problem is the image with the alt is inside an href with an alt. I don't know about you, but my href alt over-rode my image alt. Though this patch does correctly change the image alt, it may not have a visible effect.
Comment 10 Owen Leonard 2014-06-12 12:35:35 UTC
(In reply to M. Tompsett from comment #9)
> The problem is the image with the alt is inside an href with an alt.

Nope. The <a> has a title attribute.

> I don't know about you, but my href alt over-rode
> my image alt.

The link's title attribute doesn't "override" the alt attribute. The alt attribute is a brief textual description of the image in question which will be visible with images turned off, read in a text-only browser, or spoken by screen reader software. The title attribute, for sighted users of graphical browsers, triggers a tooltip on hover to provide additional information about an element.

> Though this patch
> does correctly change the image alt, it may not have a visible effect.

Nor should it. The alt attribute is not designed to produce a visible effect. 

http://www.456bereastreet.com/archive/200604/alt_text_is_an_alternative_not_a_tooltip/
Comment 11 Mark Tompsett 2014-06-12 18:14:39 UTC
Okay. It is functioning as expected. It just seems weird to have the title display as a tooltip under firefox and the alt not be visible as a tooltip at all. As such, I stand by my signoff, because this is doing what it should do. :)
Comment 12 Katrin Fischer 2014-06-21 16:03:31 UTC
I am going to pass this patch, but there are quite a few places that are not caught yet:

- result list
- detai page
- shelf browser
- staff :)

The patch touches the prog theme, but it's not adding a new feature - follow ups probably should only change the bootstrap theme.
Comment 13 Katrin Fischer 2014-06-21 16:04:00 UTC
Created attachment 29133 [details] [review]
Bug 12255 - Amazon cover images have useless image alt text in bootstrap

"item-thumbnail" is not a useful alt text for an Amazon book cover
image. Better would be the link's title text, "View on Amazon.com." This
patch makes this correction. (Rather than "View at Amazon.com" which
doesn't sound correct to me).

To test you must have the OPACAmazonCoverImages system preference
enabled. Log in to the OPAC and view your list of checked-out titles.
The alt text for cover images should be "View on Amazon.com." Test in
both prog and Bootstrap.

NOTE: You'll need one to be overdue in order to trigger both
      cases. Examine the HTML for both tabs in the person details
      page.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
This fixed the cover alt texts for Amazon covers in the patron
account for checkouts, overdues and holds.
Comment 14 Tomás Cohen Arazi 2014-06-21 19:44:46 UTC
Patch pushed to master.

Thanks Owen!
Comment 15 Galen Charlton 2014-06-24 15:42:36 UTC
Pushed to 3.16.x for inclusion in 3.16.1.

David: if you haven't done so already, I recommend that you open a new bug for further improvements to the alt text.
Comment 16 David Cook 2014-06-25 00:43:46 UTC
(In reply to Galen Charlton from comment #15)
> Pushed to 3.16.x for inclusion in 3.16.1.
> 
> David: if you haven't done so already, I recommend that you open a new bug
> for further improvements to the alt text.

Thanks, Galen. I've been pondering it. I think I might take a break and recharge my Koha batteries for a bit first though.
Comment 17 David Cook 2014-06-25 00:52:31 UTC
(In reply to David Cook from comment #16)
> (In reply to Galen Charlton from comment #15)
> > Pushed to 3.16.x for inclusion in 3.16.1.
> > 
> > David: if you haven't done so already, I recommend that you open a new bug
> > for further improvements to the alt text.
> 
> Thanks, Galen. I've been pondering it. I think I might take a break and
> recharge my Koha batteries for a bit first though.

Actually, I'll report it, but I probably won't post a patch for a while. Not feeling very enthusiastic about contributing code at the moment. Will take another look when the batteries are charged again.
Comment 18 David Cook 2014-06-25 01:09:54 UTC
(In reply to David Cook from comment #17)
> (In reply to David Cook from comment #16)
> > (In reply to Galen Charlton from comment #15)
> > > Pushed to 3.16.x for inclusion in 3.16.1.
> > > 
> > > David: if you haven't done so already, I recommend that you open a new bug
> > > for further improvements to the alt text.
> > 
> > Thanks, Galen. I've been pondering it. I think I might take a break and
> > recharge my Koha batteries for a bit first though.
> 
> Actually, I'll report it, but I probably won't post a patch for a while. Not
> feeling very enthusiastic about contributing code at the moment. Will take
> another look when the batteries are charged again.

Ok, I think that might've been passive aggressive. I didn't mean it to be.

I do want the alt text to be improved, because I think Koha should be as accessible as possible. I will open a new bug.

I'm just not feeling as enthusiastic as I usually am about contributing to Koha. I mean this in general not just related to this bug. I feel a bit agitated. I feel a bit defeated. I feel like contributing is an uphill battle that doesn't always feel worth it, even if it is ridiculous as I don't contribute (or try to contribute) anywhere near as much as I would like. 

And while it's fine to have those feelings...it's not very helpful for me to just whine about it or to be passive aggressive. There are people (like Galen, Owen, and Katrin) who put so much blood and sweat into Koha and rarely (if ever) complain. They just keep working hard.

I'm a pretty passionate person, but I find that passion is difficult to sustain sometimes. Progress is slow and this can be frustrating when what you want to do is move fast.