From d3444734e4292aa266c9cfd69295e6fafe65f4fe Mon Sep 17 00:00:00 2001 From: Andrea Fercia Date: Thu, 8 Nov 2018 12:32:36 +0100 Subject: [PATCH] Simplify sidebar tabs aria-labels. --- .../components/sidebar/settings-header/index.js | 16 ++++++++-------- test/e2e/specs/preferences.test.js | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/edit-post/src/components/sidebar/settings-header/index.js b/packages/edit-post/src/components/sidebar/settings-header/index.js index 35d731881b567..74fc19067c338 100644 --- a/packages/edit-post/src/components/sidebar/settings-header/index.js +++ b/packages/edit-post/src/components/sidebar/settings-header/index.js @@ -18,16 +18,16 @@ const SettingsHeader = ( { count, openDocumentSettings, openBlockSettings, sideb sprintf( _n( '%d Block', '%d Blocks', blockCount ), blockCount ); const [ documentAriaLabel, documentActiveClass ] = sidebarName === 'edit-post/document' ? - // translators: ARIA label for the Document Settings sidebar tab, selected. - [ __( 'Document settings (selected)' ), 'is-active' ] : - // translators: ARIA label for the Document Settings sidebar tab, not selected. - [ __( 'Document settings' ), '' ]; + // translators: ARIA label for the Document sidebar tab, selected. + [ __( 'Document (selected)' ), 'is-active' ] : + // translators: ARIA label for the Document sidebar tab, not selected. + [ __( 'Document' ), '' ]; const [ blockAriaLabel, blockActiveClass ] = sidebarName === 'edit-post/block' ? - // translators: ARIA label for the Block Settings sidebar tab, selected. - [ __( 'Block settings (selected)' ), 'is-active' ] : - // translators: ARIA label for the Block Settings sidebar tab, not selected. - [ __( 'Block settings' ), '' ]; + // translators: ARIA label for the Block sidebar tab, selected. + [ __( 'Block (selected)' ), 'is-active' ] : + // translators: ARIA label for the Block sidebar tab, not selected. + [ __( 'Block' ), '' ]; return ( { expect( await getActiveSidebarTabText() ).toBe( 'Document' ); // Change to "Block" tab. - await page.click( '.edit-post-sidebar__panel-tab[aria-label="Block settings"]' ); + await page.click( '.edit-post-sidebar__panel-tab[aria-label="Block"]' ); expect( await getActiveSidebarTabText() ).toBe( 'Block' ); // Regression test: Reload resets to document tab.