Opened 9 years ago
Closed 9 years ago
#32400 closed defect (bug) (fixed)
Plugin cards: plugin images missing alt attribute
Reported by: | afercia | Owned by: | wonderboymusic |
---|---|---|---|
Milestone: | 4.4 | Priority: | normal |
Severity: | normal | Version: | 4.2 |
Component: | Plugins | Keywords: | has-patch commit |
Focuses: | ui, accessibility | Cc: |
Description
See screenshot:
Since they're linked images, screen readers will read out what they can find there, and there's only one information available: the link URL:
NVDA reads out part of the URL, for example:
link plugin-install tab=plugin-info…
ChromeVox reads out the file name, for example:
"icon Image Link" "icon-256x256 Image Link"
Would probably be a perfect case for this suggested W3C technique:
H2: Combining adjacent image and text links for the same resource
Any thoughts more than welcome.
Attachments (3)
Change History (15)
This ticket was mentioned in Slack in #accessibility by afercia. View the logs.
9 years ago
#3
@
9 years ago
- Milestone changed from Awaiting Review to 4.4
- Owner set to afercia
- Status changed from new to reviewing
#4
follow-up:
↓ 7
@
9 years ago
@ChrisMKindred thanks, by the way what the W3C technique suggests and I'd recommend to follow, is to put both the image and the title inside the link. This way we can also remove one redundant link. Pretty much like what was done for the Media Library (in list mode).
#5
@
9 years ago
@afercia, not sure I understand. Putting the actual visual title (rather than the screen reader text title) in that same anchor tag is going to change the layout of the card. The anchor tag has the .plugin-icon class which define the dimensions ( 128x128 ) of the icon area and would thus confine the visual title to that left-most portion of the card
.plugin-icon, .plugin-icon img { width: 128px; height: 128px; }
#7
in reply to:
↑ 4
@
9 years ago
@afercia @TomHarrigan I think I get what you guys are taking about now. By just putting the h4 inside the link it eliminates the need to add the screen-reader-text class all together.
#8
@
9 years ago
Tested a bit 32400_1.diff and noticed this way the focus style is missing. I think it's not a CSS bug, browsers don't apply a box-shadow
on inline elements. Also, I'm not sure block level links are the way to go, looks like block level links can be problematic for screen readers.
I'd rather try to put everything inside the heading and apply the CSS classes accordingly.
#9
@
9 years ago
- Keywords commit added
In the refreshed patch, everything is now inside the heading. The plugin "icon" is already absolutely positioned so no need for any CSS changes. Moved the CSS class plugin-icon
from the link to the icon.
So, no visual changes :) Just better accessibility: combined adjacent image and text links for the same resource.
I added a span with a class of screen-reader-text and threw the title in so it doesn't mess with the format of the plugin-card itself. I think that still follows the W3C technique mentioned above.