Skip to content

Commit

Permalink
Improve successful draft save notification for screen readers (#37683)
Browse files Browse the repository at this point in the history
* Improve Save draft notification for screen readers.

* Fix tests.

* Fix tests.
  • Loading branch information
alexstine committed Jan 3, 2022
1 parent a80da69 commit e68e4ca
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/editor/src/store/test/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ describe( 'Post generator actions', () => {
'createSuccessNotice',
currentPostStatus === 'publish'
? 'Updated Post'
: 'Saved',
: 'Draft saved',
{
actions: [],
id: 'SAVE_POST_NOTICE_ID',
Expand Down
2 changes: 1 addition & 1 deletion packages/editor/src/store/utils/notice-builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export function getNotificationArgumentsForSaveSuccess( data ) {
// Always should a notice, which will be spoken for accessibility.
if ( ! isPublished && ! willPublish ) {
// If saving a non-published post, don't show notice.
noticeMessage = __( 'Saved' );
noticeMessage = __( 'Draft saved' );
shouldShowLink = false;
} else if ( isPublished && ! willPublish ) {
// If undoing publish status, show specific notice
Expand Down
2 changes: 1 addition & 1 deletion packages/editor/src/store/utils/test/notice-builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ describe( 'getNotificationArgumentsForSaveSuccess()', () => {
[
'when previous post is not published and post will not be published',
[ 'draft', 'draft', false ],
[ 'Saved', defaultExpectedAction ],
[ 'Draft saved', defaultExpectedAction ],
],
[
'when previous post is published and post will be unpublished',
Expand Down

0 comments on commit e68e4ca

Please sign in to comment.