woocommerce icon indicating copy to clipboard operation
woocommerce copied to clipboard

[Accessibility] Trap focus inside the product gallery modal

Open Manussakis opened this issue 6 months ago • 11 comments

Submission Review Guidelines:

Changes proposed in this Pull Request:

Closes #43605 . Closes #43606 .

How to test the changes in this Pull Request:

Using the WooCommerce Testing Instructions Guide, include your detailed testing instructions:

  1. Go to a product page that has multiple images. If you have populated your store with the sample product data, you can go to the /product/hoodie/ page.
  2. Open the product gallery by clicking on the magnifying glass icon. image
  3. Once the gallery modal is open, tab navigate through the buttons and verify the focus never goes outside the modal. The order of the buttons is determined by the Photoswipe pluging and is out of the scope of this PR.
  4. Close the modal and verify the focus goes back to the magnifying glass icon. HEADS-UP: This PR doesn't implement any change on how screen readers announce the gallery trigger button (magnifying icon) since the #50493 PR has addressed those changes already.

Changelog entry

  • [ ] Automatically create a changelog entry from the details below.
  • [ ] This Pull Request does not require a changelog entry. (Comment required below)
Changelog Entry Details

Significance

  • [ ] Patch
  • [ ] Minor
  • [ ] Major

Type

  • [ ] Fix - Fixes an existing bug
  • [ ] Add - Adds functionality
  • [ ] Update - Update existing functionality
  • [ ] Dev - Development related task
  • [ ] Tweak - A minor adjustment to the codebase
  • [ ] Performance - Address performance issues
  • [ ] Enhancement - Improvement to existing functionality

Message

Changelog Entry Comment

Comment

Manussakis avatar Aug 16 '24 17:08 Manussakis