-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wrong notification message shown when an entity is moved to trash #19144
Comments
@tellthemachines When you have a moment, would you mind confirming if you can reproduce this? Thank you in advance! |
Using VoiceOver with Safari I could not reproduce this issue on macOX 10.14.5. |
I was able to reproduce this again. It appears that there are several consecutive messages that VoiceOver announces really quick that "Post reverted to draft" gets omitted. I changed VO's verbosity settings to "Low" and I was able to see and hear "Post reverted to draft" for a split second before I get navigated to the Post's list page. |
@enriquesanchez I was also able to reproduce the issue at the second time of trying, it seems a little inconsistent, as you say, probably related to the message being interrupted as the page and focus changes. |
Thanks for testing @talldan! I wonder if it's possible to enqueue the announcements so none gets interrupted? |
Actually this is because we don't handle the |
Looking alsto at #25563, I couldn't reproduce this. Maybe it happens only when the "redirect" to the Posts page is very slow so that the screen reader has time to announce the aria-live message delivered on the block editor page. However, I'm not sure why the aria-live message should be delivered on the block editor page in the first place. When trashing a post, users are brought to the Posts page so they're (rightfully) forced to abandon the page where the aria-live message is supposed to work. Instead, I'd tend to think the final trashing confirmation step is on the Posts page, where an admin notice is already displayed: To improve accessibility I wouldn't try to make the message on the block editor page "work". Instead I'd try to:
|
It happens after successful deletion of the entity and right before redirecting. For now the respective PR fixed the case of showing proper message and the current issue.
This is something to work on core and is not part of GB. Thanks for having opened that ticket @afercia. |
Thanks @ntsekouras
My point is that I can't reproduce this issue 🙂 I would have appreciated more details instructions to reproduce it. Also, I think my previous point sill stands: why we would want to use an aria-live message on a page where users are redirected away from? |
I don't know why, but I could see the notification every time, before redirecting :). And this could probably be the case for more users when using a live site and redirecting to something other than localhost (internet connections come in play).
I'm not sure about this from accessibility perspective, but in cases like mine (always seeing the message), I think this is definitely an improvement, being notified properly for my action.. |
Fair enough 🙂 @ntsekouras can you please have a look at my comment on the PR? The message string is not translatable. |
Edit: just saw #25604 Very easy but not ideal solution: noticeMessage = sprintf(
/* translators: %s: post type singular name. */
__( '%s trashed.' ),
postType.labels.singular_name
); Better solution: noticeMessage = postType.labels.item_trashed; // where item_trashed is "Post trashed." or "Page trashed." Filter post type labels to add needed label as long as https://core.trac.wordpress.org/ticket/51387 is pending There's some precedence here: Lines 473 to 510 in 5de94bb
|
This allows the block editor to announce the correct message when an entity is moved to the Trash. Original issue from Gutenberg repository: * [WordPress/gutenberg#19144 #19144 Wrong notification message shown when an entity is moved to trash] Props james-roberts, ntsekouras, nrqsnchz, afercia, swissspidy, joedolson, talldanwp, SergeyBiryukov. Fixes #51387. git-svn-id: https://develop.svn.wordpress.org/trunk@55923 602fd350-edb4-49c9-b593-d223f7449a82
The |
This allows the block editor to announce the correct message when an entity is moved to the Trash. Original issue from Gutenberg repository: * [WordPress/gutenberg#19144 #19144 Wrong notification message shown when an entity is moved to trash] Props james-roberts, ntsekouras, nrqsnchz, afercia, swissspidy, joedolson, talldanwp, SergeyBiryukov. Fixes #51387. Built from https://develop.svn.wordpress.org/trunk@55923 git-svn-id: http://core.svn.wordpress.org/trunk@55435 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This allows the block editor to announce the correct message when an entity is moved to the Trash. Original issue from Gutenberg repository: * [WordPress/gutenberg#19144 #19144 Wrong notification message shown when an entity is moved to trash] Props james-roberts, ntsekouras, nrqsnchz, afercia, swissspidy, joedolson, talldanwp, SergeyBiryukov. Fixes #51387. Built from https://develop.svn.wordpress.org/trunk@55923 git-svn-id: https://core.svn.wordpress.org/trunk@55435 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Describe the bug
When moving a post to trash from the Document settings pane in Gutenberg:
(Image above is a screen shot of the Gutenberg editor with focus set to the "Move to trash button")
VoiceOver announces after successful completion of operation that the post has been reverted to draft:
(Image above is a screenshot of the Posts section in wp-admin, where the recently deleted post appears to have been moved to trash but the VoiceOver caption is announcing that the post has been reverted to draft)
I expect the announcement to be "Post moved to trash" instead. Also, the just-deleted post does not appear as a draft, as announced, but instead appears in the Trash, as expected.
To reproduce
Steps to reproduce the behavior:
Desktop
The text was updated successfully, but these errors were encountered: