Open afercia opened 8 months ago
I added the Design label to the issue to bring designers attention to the fact the design of this flow is far from ideal in the first place. Controls that have focus or, like in this case, that are meant to receive focus after some action, must not be removed dynamically from the DOM (or hidden or fuly disabled).
Description
Prior accessibility feedback outlined several times that focusable elements that are meant to have / receive focus should never, ever, be removed from the DOM, or get hidden, or get fully disabled dynamically. When doing so, a keyboard focus loss is very likely triggered.
Recent changes to the Site editor navigation panel missed, once again, this important point.
For example:
This problem may occur as well in other places in the navigation panel, it's not limited to editing Templates.
Instead of removing the ellipsis button, it should be stay in the DOM and still be focusable. For this purpose, the editor uses a specific pattern: noop the button and add an
aria-disabled="true"
attribute.Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
Screenshot of the Clear customizations modal dialog open: notice the Navigation panel does show the ellipsis button:
After successful clearing, the ellipsis button is removed froom the DOM:
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