Back to Reports

Accessibility: Incorrect semantic use of <dl> tag for cart item data

open Sep 23, 2025 PluginWoocommerce

Summary:

This bug report identifies an accessibility issue where the <dl> HTML tag is incorrectly used to display cart item data, such as vendor information. The <dl> tag is semantically intended for definition lists, representing a list of terms and their corresponding definitions. In this context, the displayed information (e.g., 'Sold By: Equalize Digital') is not a definition list, causing screen readers to announce the content in a way that does not match the visual presentation, which can be confusing for users relying on assistive technologies.

The issue originates from the core WooCommerce function wc_get_formatted_cart_item_data and the cart/cart-item-data.php template. This means the problem is not isolated to the Product Vendors extension but applies to any cart item data displayed by WooCommerce or its extensions. The incorrect markup creates a poor experience for screen reader users.

How to Replicate:

  1. Install, activate, and set up the WooCommerce Product Vendors plugin (or any extension that adds cart item data).
  2. Add a product to the cart.
  3. Open the mini-cart or view the cart page.
  4. Inspect the HTML of the cart item data (e.g., vendor details). The information will be wrapped in an incorrect <dl> structure.