Skip to content

Block Comments: Accessibility improvements #71249

@t-hamano

Description

@t-hamano

This is a sub-issue of #66377

The block comment sidebar has many areas that need improvement from an accessibility perspective. The main areas for improvement are:

  • It cannot be operated using only the keyboard.
  • It sometimes loses focus, so screen reader users may not understand what is happening.

I believe we need to work with the accessibility team to resolve these issues.

Below are the issues I found.

  • Click the Comment button in the block toolbar:
    • The block comment sidebar is expanded, but the screen reader doesn't announce it.
    • The Options button is focused. Some element in the sidebar should be focused.
  • Add a comment:
    • The screen reader reads `Comment added successfully.' but the focus is lost.
  • Click the delete button in the action dropdown:
    • The screen reader reads Select an action menu button collapsed subMenu / Add Post ‹ gutenberg — WordPress document / dialog. This is redundant. The screen reader should just read dialog.
  • Click the "Yes" button in the delete modal:
    • The screen reader reads `Comment deleted successfully. ' but the focus is lost.
  • The comment sidebar shows {count} more replies.. text when there are a lot of replies. The hidden comments can be expanded by clicking with a mouse, but can not be expanded because there is no focusable button to expand them.

Sub-issues

Metadata

Metadata

Labels

[Feature] NotesPhase 3 of the Gutenberg roadmap around block commenting[Focus] Accessibility (a11y)Changes that impact accessibility and need corresponding review (e.g. markup changes).[Type] BugAn existing feature does not function as intended

Type

Projects

Status

✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions