Skip to content

[Backport to release/10.1] Fix shortcode cart table and update a th to td #59982

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

Merged
merged 2 commits into from
Jul 25, 2025

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Jul 24, 2025

This PR is a cherry-pick of #59962 to release/10.1.

Original PR Description

Submission Review Guidelines:

Changes proposed in this Pull Request:

In PR #57883 we improved the accessibility of the cart table, by introducing scoped headers. One of the td inside a tbody/tr was changed to a th , causing semantic issues.

With this PR, we keep the scope="row" that was added but change the th to a td.

Accessibility should function as expected.

This also fixes a visual regression, as reported by @eja2025

Closes #59951
Closes #59887

(For Bug Fixes) Bug introduced in PR #57883 .

Screenshots or screen recordings:

Before After
image image

How to test the changes in this Pull Request:

Using the WooCommerce Testing Instructions Guide, include your detailed testing instructions:

  1. Add a variable product to your cart
  2. Navigate to a cart page rendered via the [woocommerce_cart] shortcode.
  3. Visual regression should be solved, and dl should be rendered properly

I'll invite @amberhinds to also test this one, in case it breaks accessibility. Accoding to my research, this should't affect a11y.

Testing that has already taken place:

Changelog entry

  • Automatically create a changelog entry from the details below.
  • This Pull Request does not require a changelog entry. (Comment required below)
Changelog Entry Details

Significance

  • Patch
  • Minor
  • Major

Type

  • Fix - Fixes an existing bug
  • Add - Adds functionality
  • Update - Update existing functionality
  • Dev - Development related task
  • Tweak - A minor adjustment to the codebase
  • Performance - Address performance issues
  • Enhancement - Improvement to existing functionality

Message

Changelog Entry Comment

Comment

* Updates a `th` element to a `td`in cart table for improved semantics

This change ensures that the product name is rendered as a data cell, not a header, within the cart table.

* Bump template version

* Improve accessibility by adding role=rowheader to the product name cell
Copy link
Contributor

@PanosSynetos PanosSynetos left a comment

Choose a reason for hiding this comment

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

Backport approved!

@PanosSynetos PanosSynetos reopened this Jul 25, 2025
@github-actions github-actions bot added the plugin: woocommerce Issues related to the WooCommerce Core plugin. label Jul 25, 2025
@PanosSynetos PanosSynetos merged commit a91f216 into release/10.1 Jul 25, 2025
65 of 67 checks passed
@PanosSynetos PanosSynetos deleted the cherry-pick-PR59962-to-release/10.1 branch July 25, 2025 06:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plugin: woocommerce Issues related to the WooCommerce Core plugin.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant