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

Accessibility: Gallery trigger incorrectly coded as a link and missing accessible name and modal information #43574

Open
5 tasks done
amberhinds opened this issue Jan 12, 2024 · 1 comment
Labels
focus: accessibility The issue/PR is related to accessibility. focus: shop Issues related to shop page. team: Kirigami & Origami type: community contribution

Comments

@amberhinds
Copy link

Prerequisites

  • I have carried out troubleshooting steps and I believe I have found a bug.
  • I have searched for similar bugs in both open and closed issues and cannot find a duplicate.

Describe the bug

This is the current code for the gallery trigger on single products:
<a href="#" class="woocommerce-product-gallery__trigger">🔍</a>

Links take people to a new page or a new part of a page. Buttons perform actions on a page. Because this opens the gallery modal, this should be a button and not a link.

Additionally, all screen readers say is "magnifying glass" when they reads the emoji. This does not describe what the modal does. It needs an accessible name that describes the button's purpose and information for screen readers that it will open a modal with aria-haspopup.read

Expected behavior

This is better code for this element:
<button class="woocommerce-product-gallery__trigger" aria-label="View full-screen image gallery" aria-haspopup="dialog">🔍</button>

Actual behavior

See above

Steps to reproduce

Go to a single product page and inspect the code for the woocommerce-product-gallery__trigger

WordPress Environment

N/A

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.
@amberhinds amberhinds changed the title Accessibility: Gallery trigger incorrect coded as a link and missing accessible name and modal information Accessibility: Gallery trigger incorrectly coded as a link and missing accessible name and modal information Jan 12, 2024
@rrennick rrennick added focus: accessibility The issue/PR is related to accessibility. focus: shop Issues related to shop page. team: Kirigami & Origami labels Jan 12, 2024
@roykho
Copy link
Member

roykho commented Jan 12, 2024

@amberhinds - Thanks for reporting this. We'll have a look when available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
focus: accessibility The issue/PR is related to accessibility. focus: shop Issues related to shop page. team: Kirigami & Origami type: community contribution
Projects
None yet
Development

No branches or pull requests

3 participants