-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Navigation Link: Match Editor Markup to Rendered #29935
Conversation
Size Change: +24 B (0%) Total Size: 1.4 MB
ℹ️ View Unchanged
|
@jasmussen is it okay that the richtext/textarea is a div instead of span? |
Let me give it a quick spin. I take it the span can't be editable? |
So I think I found a few existing accessibility issues while testing with voiceover. If we'd like to tackle this in separate issues, let me know and I can file new tickets. For folks 👀 , also let me know if certain behavior is expected or if there's alternative keyboard movement controls. (I am aware of keyboard shortcuts, though any richtext or text areas will capture keyboard input).
Navigation doesn't appear to be selected, I need to tab again. emptyfocus.mp4
a11y.mp4 |
From a quick test, this looks amazing. Before in the editor: After in the editor: The frontend looks the same: Note, the above is the page list and a custom menu item, and I'm testing using "empty theme": https://github.com/WordPress/theme-experiments. The custom menu item does not have an underline, but that appears to be due to this CSS from #26059:
Testing my own theme, which styles the a with a box shadow, here's before: and here's after: And after is what it's supposed to look like: In other words, this is working, and the fact that it surfaces that text-decoration rule is an example of why this one is so important to land, because otherwise the CSS we write won't be able to easily affect both the Page List block, custom menu items, and the frontend at the same time, needing 3 separate rulesets. This is being reduced to one ruleset, which is just 👌 Kerry about the keyboard interaction, in some contexts we use tab to switch region or section, and arrowkeys to navigate items within. That may be what's going on here. But just for this PR specifically, I'd compare with what's in trunk. There's certainly still some things we need to get right here, but just important we know whether they're tied to this PR or not. |
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.
Thanks @georgeh for looking into this, I think this should be okay to try. I retested on trunk, for keyboard navigation and the issues I found here were also present. I can file a few issues as a follow up.
🎉 |
Here's the a11y issue I filed: #29948 |
Description
Closes #28575
Changes the element structure of the navigation link block in the editor to match the rendered output.
Editor markup:
Rendered markup:
How has this been tested?
Manually tested on desktop Firefox
Screenshots
Checklist: