-
Notifications
You must be signed in to change notification settings - Fork 813
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Related posts improve markup and add alt text #11324
Related posts improve markup and add alt text #11324
Conversation
Thank you for the great PR description! When this PR is ready for review, please apply the Scheduled Jetpack release: April 2, 2019. |
I saw this pop up in the #a11y channel and was reminded of this twitter thread, which basically says that when a link wraps an image, the alt text should refer to the link's destination. Otherwise the screen reader will read something like "Link: A sunset on the beach", rather than "Link: My trip to the coast" – the post title makes more sense as the navigation target. Other ideas:
Does this only affect the output of the block? I don't have a jetpack site to test with ATM but would be happy to set it up & try it with VoiceOver if you can give a more detailed test flow 🙂 Edit: as soon as I posted I saw this was "in progress", sorry for the premature feedback! 😨 my offer to test still stands when this is ready. |
@ryelle I'd be happy to remove the link from the image. However, I generally don't want to hide content from assistive technologies, including screenreaders as it generally gets very negative feedback. |
Of course, having the image + alt without the link is a better option, but sometimes you want the full click-target of the image, so that was an alternate solution. |
8a74d90
to
ff9fed2
Compare
@ryelle This is a WIP, but is intended to nail down the markup, so the sooner I get a11y feedback on this, the better. :) |
ff9fed2
to
78f4157
Compare
Caution: This PR has changes that must be merged to WordPress.com |
78f4157
to
1aa1d36
Compare
aldavigdis, Your synced wpcom patch D24307-code has been updated. |
I have cherry-picked some of the commits here into separate PRs to make review and communication easier:
I'd like those to be merged first and then this one can be rebased and merged. |
@aldavigdis I know you want feedback sooner, but I'm unclear about whether this is functionally ready to be tested, and how to test it. How can I see related posts on a test site? |
1aa1d36
to
4e35dda
Compare
aldavigdis, Your synced wpcom patch D24307-code has been updated. |
4e35dda
to
5287292
Compare
aldavigdis, Your synced wpcom patch D24307-code has been updated. |
I can't seem to reproduce those errors and notices. |
4037b19
to
5f53959
Compare
aldavigdis, Your synced wpcom patch D24307-code has been updated. |
- Using alt text for images instead of a redundant article title - Using sprintf to output HTML markup - Properly using nav and ul elements to indicate related posts
5f53959
to
1c9bdb2
Compare
aldavigdis, Your synced wpcom patch D24307-code has been updated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this works well for me now. I only have a minor remark.
Co-Authored-By: kraftbj <public@brandonkraft.com>
aldavigdis, Your synced wpcom patch D24307-code has been updated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works well for me now. 👍
* Initial Changelog for 7.2 * Testing list: add mention of IE11 testing * Initial Changelog for 7.2 * Testing list: add mention of IE11 testing * Add CL for #11224 * Add CL for #11426 * Add CL for #11442 * Add testing instructions for #11224 * Add CL for #11451 * Reclassify CL item * Add testing instructions for #11451 * Add CL for #11486 * Add CL for #11418 * Add CL for #11524 * Add CL and testing instructions for #11449 * Add CL for #11460 * Add CL for #11520 and #11582 * Add CL for #11531 * Add CL #11644 * Add testing instructions for #11644 * Add testing instructions for #11644 * Add CL for #11618 * Uniform changelog lines * CL #11679 * CL #11661 * CL #11654 * CL #11645 * CL #11643 * CL #11636 * CL #11635 and for other PHPCS commits * CL #11627 * CL #11626 * CL #11598 * CL #11596 * Remove nested items for shortcopy. I don't believe the detailed list is helpful * CL #11570 * CL #11569 * CL #11560 * CL #11558 * CL #11555 * CL #6704 * CL #11298 * CL #11324 * CL #11443 * CL #11484 * CL #11516 * CL #11529 * Expand Ads block enhancement CL item
In #11324 we made some changes to the Related Posts layout, and introduced nested rules for CSS. Since that is not supported in vanilla CSS, let's switch to regular CSS here.
In #11324 we made some changes to the Related Posts layout, and introduced nested rules for CSS. Since that is not supported in vanilla CSS, let's switch to regular CSS here.
This is a follow-up PR to #11220 and includes commits from there as well. Please merge that before this one.
Fixes #11175
Changes proposed in this Pull Request:
has-small-font-size
classes from some HTML elements as this was causing a discrepancy between the editor (where this is defined) and the fronted, where is depends on the theme.Testing instructions:
Proposed changelog entry for your changes: