-
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
List View: tabs and close button visual order and DOM order mismatch #58940
Comments
This seems to be labeled In Progress and has an attached PR. I suggest we move this into the In Progress column on the WordPress 6.5 Editor Tasks board. |
@andrewhayward thanks for your feedback
I agree that there shouldn't be any focusable element between the tabs and the tab panels, I mentioned this point in my last comment on the PR #58942 (comment) Worth noting this applies to other places in the editor UI, for example the Settings panel which has been recently refactored and now uses Tabs. It appears to be a broader issue that spans across the editor UI. As such, the only way to fix this is by changing the design. I'd propose to:
|
Sounds like we should probably close this issue then, and open up another to track the various places where the design/tab order is inconsistent or needs a rethink, so we can have a broader conversation around expectations. |
I'm not sure we should close this issue. They're separated issues. |
If we're going with consistency as an intermediary step, I'd suggest that we adjust the close button in the Settings sidebar to match the Overview panel, not the other way round. I know it's a little visually incoherent in the Overview panel, but I think that's a lesser issue (and more likely to be understood, as a fairly common albeit confusing pattern) than having the close button in the DOM between the tabs and the associated panels. |
I created a separate issue for broader discussion: #59013 |
It can't be done because the component that renders the sidebar (under the hood it's the ComplementaryArea component) receives the Tabs list as the
I'm really not sure which is worse between the two bugs 🙃 Focus that randomly jumps from right to left and vice-versa in a very unpredictable way is a terrible experience. |
Oh... hmm. I had a quick look at the
Don't know as I'd agree with "unpredictable", but it's all semantics at this point! If it was at least consistent everywhere, it probably wouldn't be as bad an experience. |
Given that RC1 is today I'm removing this one from 6.5. |
Closing in favor of #59013 |
Description
In the process of reviewing all the CSS
order
properties in use in the editor, I noticed the List View tabs and close button visual order and DOM order mismatch. For accessibility, the order must always match when it affects 'meaning and operation'. basically, only purely decorative elements can be reordered. Reference:WCAG 2.2
1.3.2 Meaningful Sequence (Level A) https://www.w3.org/TR/WCAG22/#meaningful-sequence
2.4.3 Focus Order (Level A) https://www.w3.org/TR/WCAG22/#focus-order
Screenshot to illustrate the reading / DOM order mismatch.
In this specific case, these elements are also interactive, which makes the problem even more relevant.
Instead of using
order
, the DOM order must be adjusted to match the desired visual order.Introduced in a3a55bb so this
order
property is new on trunk and should be fixed for the WordPress 6.5 release.Worth noting that the order mismatch occurs also in previous versione but for a different reason. The Close button used to be absollutely positioned.
The fix appears to be trivial as the button just needs to be moved after the tabs. Code:
https://github.com/WordPress/gutenberg/blob/trunk/packages/editor/src/components/list-view-sidebar/index.js/#L133-L155
Since it appeaers to be a simple, self-contained fix, I'd like to propose it for WP 6.5 consideration.
Step-by-step reproduction instructions
Test with a screen reader, for example Safari + VoiceOver.
Screenshots, screen recording, code snippet
No response
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: