Skip to content
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

Add tooltip to several Back buttons. #59760

Merged
merged 1 commit into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function ScreenHeader( { title } ) {
}
icon={ isRTL() ? chevronRight : chevronLeft }
size="small"
aria-label={ __( 'Navigate to the previous view' ) }
label={ __( 'Back' ) }
/>
<Spacer>
<Heading level={ 5 }>{ title }</Heading>
Expand Down
2 changes: 1 addition & 1 deletion packages/e2e-test-utils/src/site-editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export async function openGlobalStylesPanel( panelName ) {
*/
export async function openPreviousGlobalStylesPanel() {
await page.click(
'div[aria-label="Editor settings"] button[aria-label="Navigate to the previous view"]'
'div[aria-label="Editor settings"] button[aria-label="Back"]'
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ function FontCollection( { slug } ) {
onClick={ () => {
setSelectedFont( null );
} }
aria-label={ __( 'Navigate to the previous view' ) }
label={ __( 'Back' ) }
/>
<Heading
level={ 2 }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ function InstalledFonts() {
onClick={ () => {
handleSetLibraryFontSelected( null );
} }
aria-label={ __( 'Navigate to the previous view' ) }
label={ __( 'Back' ) }
/>
<Heading
level={ 2 }
Expand Down
2 changes: 1 addition & 1 deletion packages/edit-site/src/components/global-styles/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function ScreenHeader( { title, description, onBack } ) {
}
icon={ isRTL() ? chevronRight : chevronLeft }
size="small"
aria-label={ __( 'Navigate to the previous view' ) }
label={ __( 'Back' ) }
onClick={ onBack }
/>
<Spacer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,7 @@ export default function PreferencesModalTabs( { sections } ) {
? chevronRight
: chevronLeft
}
aria-label={ __(
'Navigate to the previous view'
) }
label={ __( 'Back' ) }
/>
<Text size="16">
{ section.tabLabel }
Expand Down
6 changes: 3 additions & 3 deletions test/e2e/specs/site-editor/style-book.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ test.describe( 'Style Book', () => {
} )
.click();

await page.click( 'role=button[name="Navigate to the previous view"]' );
await page.click( 'role=button[name="Navigate to the previous view"]' );
await page.click( 'role=button[name="Back"]' );
await page.click( 'role=button[name="Back"]' );

await expect(
page.locator( 'role=button[name="Blocks styles"]' )
Expand Down Expand Up @@ -172,7 +172,7 @@ test.describe( 'Style Book', () => {
'style book should be visible'
).toBeVisible();

await page.click( 'role=button[name="Navigate to the previous view"]' );
await page.click( 'role=button[name="Back"]' );

await page
.getByRole( 'region', { name: 'Editor settings' } )
Expand Down
20 changes: 5 additions & 15 deletions test/e2e/specs/site-editor/style-variations.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,7 @@ test.describe( 'Global styles variations', () => {
await editor.canvas.locator( 'body' ).click();
await siteEditorStyleVariations.browseStyles();
await page.click( 'role=button[name="pink"i]' );
await page.click(
'role=button[name="Navigate to the previous view"i]'
);
await page.click( 'role=button[name="Back"i]' );
await page.click( 'role=button[name="Colors styles"i]' );

await expect(
Expand All @@ -96,9 +94,7 @@ test.describe( 'Global styles variations', () => {
)
).toHaveCSS( 'background', /rgb\(74, 7, 74\)/ );

await page.click(
'role=button[name="Navigate to the previous view"i]'
);
await page.click( 'role=button[name="Back"i]' );
await page.click( 'role=button[name="Typography styles"i]' );
await page.click( 'role=button[name="Typography Text styles"i]' );

Expand All @@ -120,9 +116,7 @@ test.describe( 'Global styles variations', () => {
await editor.canvas.locator( 'body' ).click();
await siteEditorStyleVariations.browseStyles();
await page.click( 'role=button[name="yellow"i]' );
await page.click(
'role=button[name="Navigate to the previous view"i]'
);
await page.click( 'role=button[name="Back"i]' );
await page.click( 'role=button[name="Colors styles"i]' );

await expect(
Expand All @@ -137,9 +131,7 @@ test.describe( 'Global styles variations', () => {
)
).toHaveCSS( 'background', /rgb\(25, 25, 17\)/ );

await page.click(
'role=button[name="Navigate to the previous view"i]'
);
await page.click( 'role=button[name="Back"i]' );
await page.click( 'role=button[name="Typography styles"i]' );
await page.click( 'role=button[name="Typography Text styles"i]' );

Expand Down Expand Up @@ -167,9 +159,7 @@ test.describe( 'Global styles variations', () => {
await editor.canvas.locator( 'body' ).click();
await siteEditorStyleVariations.browseStyles();
await page.click( 'role=button[name="pink"i]' );
await page.click(
'role=button[name="Navigate to the previous view"i]'
);
await page.click( 'role=button[name="Back"i]' );
await page.click( 'role=button[name="Colors styles"i]' );
await page.click( 'role=button[name="Color palettes"i]' );

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ test.describe( 'Style Revisions', () => {
page.getByLabel( 'Global styles revisions list' )
).toBeVisible();

await page.click( 'role=button[name="Navigate to the previous view"]' );
await page.click( 'role=button[name="Back"]' );

await expect(
page.getByLabel( 'Global styles revisions list' )
Expand Down
Loading