Skip to content

Commit

Permalink
Small improvements for the Document Overview labelling (#49555)
Browse files Browse the repository at this point in the history
* Improve document overview labels.

* Adjust test.
  • Loading branch information
afercia authored Apr 4, 2023
1 parent 67bca0a commit 0c0f3d7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ export default function ListViewSidebar() {
return (
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
<div
aria-label={ __( 'Document Overview' ) }
className="edit-post-editor__document-overview-panel"
onKeyDown={ closeOnEscape }
ref={ sidebarRef }
Expand All @@ -107,7 +106,7 @@ export default function ListViewSidebar() {
>
<Button
icon={ closeSmall }
label={ __( 'Close Document Overview Sidebar' ) }
label={ __( 'Close' ) }
onClick={ () => setIsListViewOpened( false ) }
/>
<ul>
Expand Down
8 changes: 5 additions & 3 deletions test/e2e/specs/editor/various/list-view.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -474,9 +474,11 @@ test.describe( 'List View', () => {
await pageUtils.pressKeys( 'shift+Tab' );
await pageUtils.pressKeys( 'shift+Tab' );
await expect(
editor.canvas.getByRole( 'button', {
name: 'Close Document Overview Sidebar',
} )
editor.canvas
.getByRole( 'region', { name: 'Document Overview' } )
.getByRole( 'button', {
name: 'Close',
} )
).toBeFocused();

// Close List View and ensure it's closed.
Expand Down

1 comment on commit 0c0f3d7

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in 0c0f3d7.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/4606520962
📝 Reported issues:

Please sign in to comment.