Skip to content
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
4 changes: 4 additions & 0 deletions plugins/woocommerce/changelog/fix-51905
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fix

Add span role heading and aria level for comments reply title
4 changes: 2 additions & 2 deletions plugins/woocommerce/templates/single-product-reviews.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php

Check notice on line 1 in plugins/woocommerce/templates/single-product-reviews.php

View workflow job for this annotation

GitHub Actions / Analyze Branch Changes

TEMPLATES

Version bump found (diff)
/**
* Display single product reviews (comments)
*
Expand All @@ -12,7 +12,7 @@
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates
* @version 9.6.0
* @version 9.7.0
*/

defined( 'ABSPATH' ) || exit;
Expand Down Expand Up @@ -75,7 +75,7 @@
'title_reply' => have_comments() ? esc_html__( 'Add a review', 'woocommerce' ) : sprintf( esc_html__( 'Be the first to review &ldquo;%s&rdquo;', 'woocommerce' ), get_the_title() ),
/* translators: %s is product title */
'title_reply_to' => esc_html__( 'Leave a Reply to %s', 'woocommerce' ),
'title_reply_before' => '<span id="reply-title" class="comment-reply-title">',
'title_reply_before' => '<span id="reply-title" class="comment-reply-title" role="heading" aria-level="3">',
'title_reply_after' => '</span>',
'comment_notes_after' => '',
'label_submit' => esc_html__( 'Submit', 'woocommerce' ),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,10 @@ test.describe( 'General tab', { tag: tags.GUTENBERG }, () => {
await page.goto( `?post_type=product&p=${ productId }` );

await expect(
page.getByRole( 'heading', { name: productData.name } )
page.getByRole( 'heading', {
name: productData.name,
level: 1,
} )
).toBeVisible();

const productsList = page.locator(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,10 @@ test.describe( 'General tab', { tag: tags.GUTENBERG }, () => {
await page.getByRole( 'button', { name: 'Enter' } ).click();

await expect(
page.getByRole( 'heading', { name: productData.name } )
page.getByRole( 'heading', {
name: productData.name,
level: 1,
} )
).toBeVisible();

await expect(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ test.describe(
await expect(
page.getByRole( 'heading', {
name: `${ products[ 0 ].name }`,
level: 1,
} )
).toBeVisible();
await expect( page.getByLabel( 'Breadcrumb' ) ).toContainText(
Expand Down Expand Up @@ -119,6 +120,7 @@ test.describe(
await expect(
page.getByRole( 'heading', {
name: products[ 1 ].name,
level: 1,
} )
).toBeVisible();
} );
Expand Down
Loading