Repository navigation
DataViews: Announce when bulk actions become available or unavailable - #87247
HrithikDalal wants to merge 2 commits into
Conversation
49d4dd3 to
3c6bce9
Compare
🤖 PR meta 🤖🎉 PropsIf you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. Props Bot commandsYou can trigger Props Bot actions by commenting on this PR:
Updated as activity occurs, without notifying anyone named here. Add the 🏷️ LabelsThis pull request needs exactly one label indicating its type, and has 0.
Read more about Type labels in Gutenberg. If you cannot add labels yourself, a reviewer can do it for you. |
| icon: blockTable, | ||
| viewConfigOptions: DensityPicker, | ||
| // Renders the bulk actions toolbar. | ||
| hasBulkActions: true, |
There was a problem hiding this comment.
VIEW_LAYOUTS is exported from the package, so this makes hasBulkActions public API. Can we keep the table/grid check internal, like the footer does in trunk? Then the changes in the layouts and the footer aren't needed.
There was a problem hiding this comment.
Makes sense, moved it back to an internal table/grid check like the footer. The layouts and the footer are untouched now.
3c6bce9 to
a4d6a14
Compare
a4d6a14 to
62bb13a
Compare
What?
Part of #85052
DataViews now tells screen reader users when selecting items makes the bulk actions available, and when clearing the selection takes them away.
Why?
The bulk actions toolbar only shows up once something is selected, so there's nothing to find beforehand, and nothing says it appeared. Sighted users see the toolbar swap in; screen reader users get no signal.
How?
In the extensible site editor, selecting a page changes the URL, and on trunk Boot announces the page title on every URL change, which replaces this message. #87221 limits that to path changes, so v2 needs it for this to be heard. The classic site editor works on trunk.
Testing Instructions
#a11y-speak-polite) reads "Bulk actions available."Testing Instructions for Keyboard
With a screen reader on, Tab to a row checkbox and press Space. You hear the checkbox state, then "Bulk actions available."
Use of AI Tools
Used Claude Code to co-author the fix. Reviewed and tested by me.