Announce to screen readers when blocks are moved #67237
Labels
[Focus] Accessibility (a11y)
Changes that impact accessibility and need corresponding review (e.g. markup changes).
[Package] Block editor
/packages/block-editor
[Package] Edit Site
/packages/edit-site
[Type] Bug
An existing feature does not function as intended
Description
See:
#61168
#64966
#23995
#24894
When blocks are moved to a new position either by clicking the mover buttons or by using keyboard shortcuts, sighted users can see the visual change in the editor canvas. Screen reader users with no vision need an audible message to confirm a block has been moved correctly.
At the moment, this is implemented only partially and can be improved. Findings:
1
Using the mover buttons in the block toolbar.
There's no confirmation message at all. A previous attempt was made on #23995 / #24894 but it was never merged and the codebase has largely changed since then.
The mover buttons do have a description with the initial position information that gets updated after blocks get moved. However, there's no confirmation message.
2
Using the keyboard shortcuts
Note: check the 'Keyboard shortcuts' modal dialog to know which ones to use, they are different depending on the operating system in use.
A confirmation message was added in #64966. However, there's no information about the initial and / or final position. When users use these keyboard shortcuts it's likely they are not focusing the mover buttons, which is the only place that provides such information.
Also, it appears these keyboard shortcuts callbacks are triggered also when the block cannot be moved because it's first, last, or the only block in the canvas.
3
Evaluate whether the confirmation message should also provide information about the new position. At the moment, it only announces
{number} block(s) moved.
. It's worth reminding blocks can be moved vertically and horizontally so that a check for Right To Left languages would be necessary to provide meaningful messages.Step-by-step reproduction instructions
aria-live
regions at the end of the DOM in your browser dev tools inspector.Shift + Option + Command + Y
to move down.Shift + Option + Command + T
to move up.Screenshots, screen recording, code snippet
No response
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Please confirm which theme type you used for testing.
The text was updated successfully, but these errors were encountered: