#46233 closed defect (bug) (fixed)
Multiple themes: Theme includes Screen Reader Text inside Card
Reported by: | dshanske | Owned by: | karmatosed |
---|---|---|---|
Milestone: | 6.7 | Priority: | low |
Severity: | trivial | Version: | |
Component: | Bundled Theme | Keywords: | has-patch commit |
Focuses: | Cc: |
Description (last modified by )
The function twentysixteen_entry_meta includes the screen reader text inside the span property using the author mf class. That means when parsed it would say, 'Author David Shanske' The screen reader text should be inside the byline span but outside the author vcard span.
Added: this is in both Twenty Sixteen and Twenty Fifteen
Attachments (3)
Change History (19)
#1
@
6 years ago
- Component changed from Themes to Bundled Theme
- Summary changed from Twenty Sixteen Theme includes Screen Reader Text inside Card to Twenty Sixteen: Theme includes Screen Reader Text inside Card
#3
@
3 years ago
- Keywords has-patch added
With a (default) empty alt
attribute, screen readers would ignore the avatar. However, the image could be moved before "Author" as well.
<span class="byline"> <img alt="" src="..." class="avatar avatar-49 photo" loading="lazy" width="49" height="49"> <span class="screen-reader-text">Author </span> <span class="author vcard"> <a class="url fn n" href="http://localhost/svn/src/author/test/">test</a> </span> </span>
Twenty Fifteen has a similar nesting, too.
#5
@
3 months ago
- Owner set to karmatosed
- Status changed from new to assigned
Assigning to myself to see about testing towards a potential commit.
#6
@
3 months ago
- Description modified (diff)
- Summary changed from Twenty Sixteen: Theme includes Screen Reader Text inside Card to Multiple themes: Theme includes Screen Reader Text inside Card
In testing I can confirm this issue is still valid and see that the patch does offer a solution which doesn't seem to impact the themes negatively. It is worth nothing this impacts both Twenty Sixteen and Twenty Fifteen so changing description to multiple themes.
#8
@
3 months ago
- Keywords needs-refresh added; commit removed
@sabernhardt I just went to apply this patch and it seems to get rejected when applying to Twenty Fifteen. I am going to put a refresh request on it but if this is an issue you can't replicate let me know please.
#10
@
3 months ago
Thanks for refreshing the patch! Reviewing that, I found an extra space I should not have added after %1$s
in Twenty Sixteen.
- That space is simply unnecessary following the avatar:
<span class="byline"><img alt='' src='http://0.gravatar.com/avatar/0309805bf7f3bc7b9a30f6e5c772475a?s=49&d=mm&r=g' srcset='http://0.gravatar.com/avatar/0309805bf7f3bc7b9a30f6e5c772475a?s=98&d=mm&r=g 2x' class='avatar avatar-49 photo' height='49' width='49' decoding='async'/> <span class="screen-reader-text">Author </span><span class="author vcard"><a class="url fn n" href="http://localhost/svn/src/author/test/">tester</a></span></span>
- It makes the markup look wrong without avatars enabled:
<span class="byline"> <span class="screen-reader-text">Author </span><span class="author vcard"><a class="url fn n" href="http://localhost/svn/src/author/test/">tester</a></span></span>
#11
@
3 months ago
- Milestone changed from Awaiting Review to Future Release
Twenty Fifteen
- Before patch:
<span class="byline"><span class="author vcard"><span class="screen-reader-text">Author </span><a class="url fn n" href="http://localhost/svn/src/author/test/">tester</a></span></span>
- With 46233.3.patch:
<span class="byline"><span class="screen-reader-text">Author </span><span class="author vcard"><a class="url fn n" href="http://localhost/svn/src/author/test/">tester</a></span></span>
Twenty Sixteen, with avatars enabled
- Before patch:
<span class="byline"><span class="author vcard"><img alt='' src='http://0.gravatar.com/avatar/0309805bf7f3bc7b9a30f6e5c772475a?s=49&d=mm&r=g' srcset='http://0.gravatar.com/avatar/0309805bf7f3bc7b9a30f6e5c772475a?s=98&d=mm&r=g 2x' class='avatar avatar-49 photo' height='49' width='49' decoding='async'/><span class="screen-reader-text">Author </span> <a class="url fn n" href="http://localhost/svn/src/author/test/">tester</a></span></span>
- With 46233.3.patch:
<span class="byline"><img alt='' src='http://0.gravatar.com/avatar/0309805bf7f3bc7b9a30f6e5c772475a?s=49&d=mm&r=g' srcset='http://0.gravatar.com/avatar/0309805bf7f3bc7b9a30f6e5c772475a?s=98&d=mm&r=g 2x' class='avatar avatar-49 photo' height='49' width='49' decoding='async'/><span class="screen-reader-text">Author </span><span class="author vcard"><a class="url fn n" href="http://localhost/svn/src/author/test/">tester</a></span></span>
Twenty Sixteen, without avatar
- Before patch:
<span class="byline"><span class="author vcard"><span class="screen-reader-text">Author </span><a class="url fn n" href="http://localhost/svn/src/author/test/">tester</a></span></span>
- With 46233.3.patch:
<span class="byline"><span class="screen-reader-text">Author </span><span class="author vcard"><a class="url fn n" href="http://localhost/svn/src/author/test/">tester</a></span></span>
#12
@
3 months ago
- Keywords commit added
Thank you for the patch refresh and extensive testing. I am now going to look at getting this to commit.
Thanks for this report, @dshanske!
I see what you mean. Unfortunately, this could be tricky to change without causing other issues -- moving
<span class="screen-reader-text">Author </span>
outside of the.author
span would also place the author image between that string and the actual author name, making it less meaningful to screen readers.I'm far from an expert on Microformats, but in this case, would adding
role
to thatscreen-reader-text
be "correct"? Or am I totally reaching? :)