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

[Collection card] Empty collection links #1619

Closed
andrewetchen opened this issue Apr 13, 2022 · 0 comments · Fixed by #1639
Closed

[Collection card] Empty collection links #1619

andrewetchen opened this issue Apr 13, 2022 · 0 comments · Fixed by #1639
Assignees
Labels
Category: Accessibility Bugs found while using assistive technology Category: Bug Something isn't working Critical Path: 1 Affects all merchants/buyers Effort: Low Severity: 3 Normal/Low Severity

Comments

@andrewetchen
Copy link
Contributor

andrewetchen commented Apr 13, 2022

Describe the current behavior

Related to the accessibility fixes here: #1315

I didn't account for empty collection links when card_style is set to card.

Describe the expected behavior

For empty card styled collection links to not be clickable.

Version information (Dawn, browsers and operating systems)

  • Dawn Version: 4.0.0, 5.0.0
  • Chrome Version 100.0.4896.127
  • macOS Version 12.3.1

Possible solution

In the card-collection.liquid snippet, change:

{% if settings.card_style == 'card' or card_collection.featured_image %} 
  ...
    <a href="{{ card_collection.url }}" class="full-unstyled-link">

... to this:

{% if settings.card_style == 'card' or card_collection.featured_image %} 
  ...
    <a{% if card_collection == blank %} role="link" aria-disabled="true"{% else %} href="{{ card_collection.url }}"{% endif %} class="full-unstyled-link">

Additional context/screenshots

Before

dawn_card-collection_empty--links-with-card-style-cards.mp4

With the above fix

dawn_card-collection_empty--links-with-card-style-cards-fix.mp4
@andrewetchen andrewetchen added Category: Bug Something isn't working Category: Accessibility Bugs found while using assistive technology labels Apr 13, 2022
@andrewetchen andrewetchen self-assigned this Apr 13, 2022
@andrewetchen andrewetchen added Severity: 3 Normal/Low Severity Effort: Low Critical Path: 1 Affects all merchants/buyers labels Apr 25, 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 Category: Bug Something isn't working 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