Shopify / dawn

Shopify's first source available reference theme, with Online Store 2.0 features and performance built-in.
Other
2.53k stars 3.41k forks source link

[Collection page] Hidden content creates verbose experience #767

Open svinkle opened 3 years ago

svinkle commented 3 years ago

Issue summary

The collection page heading includes a visually hidden "Collection" element. Depending on the environment, this can cause an announcement of "2 item" within the heading, or a duplication of the announcement. This would lead to a confusing screen reader user experience.

Screenshots Dawn collection page, primary heading text is highlighted.

Current code

HTML

<h1 class="collection-hero__title">
  <span class="visually-hidden">Collection:</span>
  Bags and backpacks
</h1>

Steps to reproduce

  1. Go to a Dawn theme store with any supported browser
  2. Navigate to a collection page
  3. With an active screen reader, navigate to the h1 content using the virtual cursor

Behavior

Expected

Actual

Recommendation

Remove the span.visually-hidden element.

Recommended code

HTML

<h1 class="collection-hero__title">
  Bags and backpacks
</h1>

Specifications

ChinazoOnwukaike commented 2 years ago

I would like to take this issue please. I've sent a pull request, removing the span.