A follow-up to #1848940: When enabling or disabling a View, don't move the cursor to the top of the page to address a similar issue in the Block UI.
Problem/Motivation
When a user enables, disables, or removes a block, a full page refresh happens. This causes the keyboard focus position to return to the start of the page. If a keyboard-only user wants to work on several blocks, there's a lot of work to keep tabbing through the form to the block you are interested in.
Proposed resolution
We can reduce the amount of effort needed from a keyboard-only user, by using AJAX to dynamically update the page whenever a block is enabled, disabled, or removed. ViewsListBuilder already does this, and it maintians the keyboard focus position.
Use AJAX for the block operations (enable, disable, remove).
Make it preserve keyboard focus position, like ViewsListBuilder.
Remaining tasks
TBD.
User interface changes
Make some features of the block UI (block operations like enable, disable, remove) behave without a page refresh, and preserving keyboard focus position. Intended to reduce effort needed by keyboard / screen-reader users.
API changes
TBD.
Data model changes
None expected.
Issue fork drupal-2973114
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #12
mgiffordhttps://www.w3.org/WAI/WCAG21/Understanding/focus-order.html
Comment #14
jenniferhoude commentedI can verify this is still happening.
Steps to recreate: By going to Block structure, selecting a block for disable or delete. When page refreshes the focus is taken to the top of the page.