Open RayBB opened 3 years ago
@RayBB I don't know if this is useful but according to this comment https://github.com/internetarchive/openlibrary/issues/4633#issuecomment-783681715 We combined the links for cover and text (Lists Page). But I don't think that solution will work for all the pages.
@Yashs911 this is very helpful context thank you for linking. I'm not sure if there are any major advantages to combining to one link vs just making the tabbing skip over covers. Perhaps it depends on the case. I look forward to hearing what others think.
@RayBB I would suggest you make separate issue/PR for each page because for example: Combining links for the Lists Page didn't change the design. But for Subjects Page:
@bpmcneilly I'm trying to handle some of the more complicated cases first such as list and search result.
I looked at the example Yash mentioned about the lists page and how it works using float: left
. That seems to work fine for that example. I'm currently struggling to get this working on something like the list or search result page.
Two problems that come up right away:
In both of the above issues, I actually don't know how to fix them with css. I could dig into it but I suspect there isn't an easy solution going that route.
In the community call we discussed that the other approach of basically hiding the image link from the screen reader but not changing the visual appearance. I think that we said we should try to take a similar approach to what has been done elsewhere on the site. However, given the difficulties with the single anchor approach I want try the option of hiding the image link from screen readers.
That being said, I'm not sure how to hide the link from screen readers.
I did some searching and the best I could come up with is using role="presentation"
and aria-hidden="true"
, and tabindex="-1"
. That seems like maybe it is too simple and may not work in some case?
Edit: Link to relevant file https://github.com/internetarchive/openlibrary/blob/eddaa125d1ace42805ea1bc32fcd11d8aeff7603/openlibrary/templates/type/list/view.html#L196-L208
Question
Are book covers "Decorative Images" for accessibility purposes when they go to the same place as the next link?
Additional context
I'm working on #4940 as part of the bigger accessibility work here #4897. I realized that perhaps the focus indicator doesn't need to be fixed since we may not need it at all. I first thought this because eBay and Amazon do not focus on pictures of items when tabbing though search results/lists. I later discovered Walmart does the opposite in that they focus on just the image but not the title. This lead me to do some searching about why and I learned about decorative images.
According to W3:
It seems to me, that for openlibrary there are many cases where the book cover is just a decorative image since the next link right after the cover is pointing to the same place and is the title of the book. These include:
Examples that would be excluded from this issue are like on carousels. In that case the book cover takes you to the works page and the borrow button takes you to the borrow page.
Issue resolution criteria
When the community decides if such images are decorative.
Please share your thoughts.
Stakeholders
@bpmcneilly