Skip to content
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

[Product card] Product state missing from heading announcement #1268

Closed
svinkle opened this issue Jan 26, 2022 · 0 comments · Fixed by #1731
Closed

[Product card] Product state missing from heading announcement #1268

svinkle opened this issue Jan 26, 2022 · 0 comments · Fixed by #1731
Labels
Category: Accessibility Bugs found while using assistive technology Critical Path: 1 Affects all merchants/buyers Effort: Low Severity: 3 Normal/Low Severity

Comments

@svinkle
Copy link
Member

svinkle commented Jan 26, 2022

Issue summary

When navigating via headings alone, product state such as "sold out" or "sale" is not included as part of the heading announcement.

Without front-loading these details, a screen reader user would need to click into the pdp and discover the product state after navigating through this content.

Screenshots Product cards, one with sale badge, another with sold out badge. Card headings and badges are highlighted.

Current code

HTML

<!-- Sale… -->
<h3 class="card__heading h5">
  <a
    href="/products/bamboo-case-for-shampoo-and-conditioner-bars"
    class="full-unstyled-link"
  >
    Bamboo Travel Case
  </a>
</h3>
<!-- … -->
<span class="badge badge--bottom-left color-background-2">Sale</span>

<!-- Sold out… -->
<h3 class="card__heading h5">
  <a href="/products/body-lotion-passionfruit" class="full-unstyled-link">
    Body Lotion
  </a>
</h3>
<!-- … -->
<span class="badge badge--bottom-left color-background-1">Sold out</span>

Steps to reproduce

  1. Go to any demo store with any supported browser
  2. With an active screen reader, navigate through product cards via headings alone

Behavior

Expected

  • Product state to be included in heading announcement in order to quickly inform the user of the current state.

Actual

  • Product state is not included.

Recommendation

  1. Add a unique id to each heading link.
  2. Add a unique id to each product state badge.
  3. Add the aria-labelledby attribute to each heading link, setting its value to reference its own id then the id of the state badge.

These changes will front-load the product state with the card heading announcement.

🗣 "Bamboo Travel Case Sale"
🗣 "Body Lotion Sold Out"

Recommended code

HTML

<!-- Sale… -->
<h3 class="card__heading h5">
  <a
    href="/products/bamboo-case-for-shampoo-and-conditioner-bars"
    id="cardLink-0"
    class="full-unstyled-link"
    aria-labelledby="cardLink-0 badge-0"
  >
    Bamboo Travel Case
  </a>
</h3>
<!-- … -->
<span id="badge-0" class="badge badge--bottom-left color-background-2">
  Sale
</span>

<!-- Sold out… -->
<h3 class="card__heading h5">
  <a
    href="/products/body-lotion-passionfruit"
    id="cardLink-1"
    class="full-unstyled-link"
    aria-labelledby="cardLink-1 badge-1"
  >
    Body Lotion
  </a>
</h3>
<!-- … -->
<span id="badge-1" class="badge badge--bottom-left color-background-1">
  Sold out
</span>

Specifications

  • Dawn version: 2.5.0
  • Browser: Any
  • Component: Product card
  • WCAG Principle: Perceivable
  • WCAG SC: 1.3.1 Info and Relationships
  • Severity: Low
  • Effort: Low
@svinkle svinkle added Severity: 3 Normal/Low Severity Category: Accessibility Bugs found while using assistive technology Effort: Low Critical Path: 1 Affects all merchants/buyers labels Jan 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Accessibility Bugs found while using assistive technology Critical Path: 1 Affects all merchants/buyers Effort: Low Severity: 3 Normal/Low Severity
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant