-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Fix Post Excerpt: Read more link is always on new line in the editor #47772
Conversation
Size Change: -2 B (0%) Total Size: 1.31 MB
ℹ️ View Unchanged
|
Flaky tests detected in a2ba780. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/4102207267
|
It is a shame that was an option in the first place. Block level links are always better for accessibility. 👎 Inline links can be rather confusing as they can blend in with content. The display property in CSS is pretty much the only one used by screen readers. |
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.
Signing off on the code change.
@iamtakashi I would be OK with the editor and front not matching in this case, if it means it is more accessible. |
@carolinan I was talking about both. Inline links are tricky on both the front or back because of this. This is an example of how screen readers interpret this. Block:
Users navigating in virtual mode will arrow down to get the text and another arrow down will land them on the link. Inline:
Users navigating with down arrow key will get the paragraph and link all in one go forcing users to use the link command or tab to focus the link at the end of the paragraph. It is kind of too late now to fix this I think without deprecating the option. Just something to think about for the future mostly. Thanks. |
What?
Fixes the read more link position in the post excerpt block.
When the option "Show link on new line" is toggled off, the link should not be on a new line.
Closes #47458
Why?
In the editor, the read more link was always on a new line, if there was an excerpt text.
How?
Updates the CSS for the post excerpt, replaces
display: inline-block
withdisplay:inline
Testing Instructions
(Exceptions are possible if there is no room for the texts to be on the same line).
Screenshots or screencast
After:
https://user-images.githubusercontent.com/7422055/216935918-500c8e6b-4d47-47ee-abc7-a490d6dbe527.mov