Skip to content

fix: Fix keyboard tabbing order in product image zoom view#21353

Open
Zeyber wants to merge 2 commits intodevelopfrom
feature/CXSPA-12682
Open

fix: Fix keyboard tabbing order in product image zoom view#21353
Zeyber wants to merge 2 commits intodevelopfrom
feature/CXSPA-12682

Conversation

@Zeyber
Copy link
Copy Markdown
Contributor

@Zeyber Zeyber commented Apr 9, 2026

@Zeyber Zeyber requested a review from a team as a code owner April 9, 2026 08:56
@github-actions github-actions Bot marked this pull request as draft April 9, 2026 08:57
@Zeyber Zeyber marked this pull request as ready for review April 9, 2026 09:02
@cypress
Copy link
Copy Markdown

cypress Bot commented Apr 9, 2026

spartacus    Run #52679

Run Properties:  status check passed Passed #52679  •  git commit 662b7f84bf ℹ️: Merge a555028549c504fcacde4015e7aa90831fdfa267 into bf086159c58f7907907fdd1cad38...
Project spartacus
Branch Review feature/CXSPA-12682
Run status status check passed Passed #52679
Run duration 04m 08s
Commit git commit 662b7f84bf ℹ️: Merge a555028549c504fcacde4015e7aa90831fdfa267 into bf086159c58f7907907fdd1cad38...
Committer Caine Rotherham
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 3
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 101
View all changes introduced in this branch ↗︎


@include cx-highContrastTheme-dark {
.cx-image-container .cx-zoom-btn {
background-color: var(--cx-color-dark);
Copy link
Copy Markdown
Member

@BenjaminEmiliani BenjaminEmiliani Apr 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why remove the background color in this change? Could this be a breaking change for customer implementations using class cx-image-container for their own custom components?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both css changes are already encapsulated in the @include forFeature('a11yKeyboardAccessibleZoom'). So the breaking changes have been accounted for.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But shouldn't the breaking change be accounted for the default context where customer upgrades but feature flag comes in as false, and they keep it as such. So we want to preserve existing styling.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it won't be affected if the customer does not enable the a11yKeyboardAccessibleZoom feature flag. We don't really mind too much if we change anything that is already behind this flag since we have to change many things rapidly in an a11y audit. For more complex features, we could consider nested or overriding flags for breaking changes related to breaking changes. But that is a lot of unnecessary tech debt and difficult to maintain for simple changes.


@include cx-highContrastTheme-light {
.cx-image-container .cx-zoom-btn .cx-zoom-indicator {
.cx-image-container .cx-zoom-btn-container .cx-zoom-btn .cx-zoom-indicator {
Copy link
Copy Markdown
Member

@BenjaminEmiliani BenjaminEmiliani Apr 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

by moving location of #zoomButton outside of the cx-image-container, this include chain and the below one are no longer aligned with the template

Copy link
Copy Markdown
Contributor Author

@Zeyber Zeyber Apr 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think they are chained because of the spaces between the classes. Or are you suggesting some clean up?

Copy link
Copy Markdown
Member

@BenjaminEmiliani BenjaminEmiliani Apr 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The way scss interprets line 148 is equivalent to "find a .cx-zoom-indicator that lives inside .cx-zoom-btn inside .cx-zoom-btn-container inside .cx-image-container, and apply these styles to it."

You can even test it, change the color first (you should not see it changed for that theme when you select it in FE) Then remove cx-image-container you should now see the zoom icon change color when the theme is selected

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I think you might be referring to the styling changes of the zoom button. Sorry, yes this was an intentional change. No styling for this feature was provided by any official ux at the time so something was improvised. As the change was new (within the last year) and still behind the feature flag. I have changed it to be more consistent and easier to maintain.

In regards to breaking changes, we do not mind as its already behind a flag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants