Opened 10 years ago
Closed 10 years ago
#30144 closed defect (bug) (fixed)
Twenty Fourteen: Add aria-hidden to reduce verbosity on archive pages
Reported by: | joedolson | Owned by: | lancewillett |
---|---|---|---|
Milestone: | 4.1 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Bundled Theme | Keywords: | has-patch commit |
Focuses: | accessibility | Cc: |
Description (last modified by )
Archive images are currently duplicate links to post singular; apply aria-hidden so image link is ignored on archive pages.
See #30076 for history on patch.
Attachments (2)
Change History (12)
#1
@
10 years ago
- Milestone changed from Awaiting Review to 4.1
- Summary changed from Add aria-hidden to reduce verbosity on archive pages to Twenty Fourteen: Add aria-hidden to reduce verbosity on archive pages
#2
@
10 years ago
- Keywords reporter-feedback added
Good change, first part of the patch looks good to me, adding the ARIA attribute.
Can you explain the second change? Changing the post thumbnail and adding a title attribute -- what is that for, or why needed?
#3
@
10 years ago
the_post_thumbnail( 'post-thumbnail', array( 'alt'=>get_the_title() ) );
The parameter post-thumbnail
seems redundant as post-thumbnail
is the default value for size parameter of function the_post_thumbnail()
. And second defined parameter overrides the default value for image alt
which either returns the attachment except and if empty the attachment title:
In function wp_get_attachment_image()
on line 710 if wp-includes/media.php
if ( empty($default_attr['alt']) ) $default_attr['alt'] = trim(strip_tags( $attachment->post_excerpt )); // If not, Use the Caption if ( empty($default_attr['alt']) ) $default_attr['alt'] = trim(strip_tags( $attachment->post_title )); // Finally, use the title
Is there a reason for returning the post title in place of the attachment except or title for that image alt
?
#4
@
10 years ago
Yes - the image is linked, so it needs to convey information about the target of the link rather than about the image. The image is also on the target page, so that alt attribute will be provided on that page.
#5
@
10 years ago
@joedolson, I kind of agree. However, wouldn't make sense to make the second change and add it to a separate ticket on the UI focus so it can be opened up to discussion? Your first change and bug fix seems unrelated to your second change (which seems more like a UI enhancement).
#6
@
10 years ago
All this ticket was intended to do was clone some changes over from work on Twenty Fifteen; it doesn't seem worth having the discussion again. See #30076 to see the history on the ticket.
If you want to split the patch into two separate tickets, feel free. I don't see the point, particularly. I'm amending the description to add the ticket reference and more detail.
#8
@
10 years ago
@joedolson, good point. I didn't realize this was already addressed in a separate ticket for twenty fifteen. Given the context I agree with your original fix. I posted your original patch plus I also fixed the formatting.
aria-hidden