Skip to content

Store Notices missing aria role attributes #60261

@sunyatasattva

Description

@sunyatasattva

Describe the bug

Whilst working on #60253, I noticed that we have several templates used to create notices:

  1. templates/notices/ are used to render legacy notices in classic themes.
  2. templates/block-notices/ are used to render legacy notices in block themes.
  3. BlockTypes/StoreNotices.php are the actual store notices blocks.

The latter of the three are missing any ARIA role attributes.

Expected behavior

Notices should have appropriate role attribute.

Actual behavior

role attributes are missing.

Steps to reproduce

  1. Go to the checkout page.
  2. Trigger an error.
  3. Notice that role attribute is missing from the HTML.
Image

Isolating the problem

  • I have deactivated other plugins and confirmed this bug occurs when only WooCommerce plugin is active.
  • This bug happens with a default WordPress theme active, or Storefront.
  • I can reproduce this bug consistently using the steps above.

Metadata

Metadata

Labels

AccessibilityThe issue/PR is related to accessibility.BugThe issue is a confirmed bug.Store FrontendIssues related to shop page.

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions