Skip to content

Commit

Permalink
Fix 'Publish sidebar Cancel button not usable through speech recognit… (
Browse files Browse the repository at this point in the history
#25441)

* Fix 'Publish sidebar Cancel button not usable through speech recognition software' issue

* PR #25441 Committing back commits.
  • Loading branch information
prashanttholia authored Sep 21, 2020
1 parent 9ef9f2c commit 5a3364f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ describe( 'Multi-entity save flow', () => {
const templatePartSelector = '*[data-type="core/template-part"]';
const activatedTemplatePartSelector = `${ templatePartSelector } .block-editor-block-list__layout`;
const savePanelSelector = '.entities-saved-states__panel';
const closePanelButtonSelector = 'button[aria-label="Close panel"]';
const closePanelButtonSelector =
'.editor-post-publish-panel__header-cancel-button button';
const createNewButtonSelector =
'//button[contains(text(), "New template part")]';

Expand Down
6 changes: 1 addition & 5 deletions packages/editor/src/components/post-publish-panel/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,7 @@ export class PostPublishPanel extends Component {
/>
</div>
<div className="editor-post-publish-panel__header-cancel-button">
<Button
onClick={ onClose }
label={ __( 'Close panel' ) }
isSecondary
>
<Button onClick={ onClose } isSecondary>
{ __( 'Cancel' ) }
</Button>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ exports[`PostPublishPanel should render the pre-publish panel if post status is
>
<ForwardRef(Button)
isSecondary={true}
label="Close panel"
>
Cancel
</ForwardRef(Button)>
Expand Down Expand Up @@ -137,7 +136,6 @@ exports[`PostPublishPanel should render the pre-publish panel if the post is not
>
<ForwardRef(Button)
isSecondary={true}
label="Close panel"
>
Cancel
</ForwardRef(Button)>
Expand Down Expand Up @@ -178,7 +176,6 @@ exports[`PostPublishPanel should render the spinner if the post is being saved 1
>
<ForwardRef(Button)
isSecondary={true}
label="Close panel"
>
Cancel
</ForwardRef(Button)>
Expand Down

0 comments on commit 5a3364f

Please sign in to comment.