fix(category): correct setLiveRegionsAttributes typo in reset handler#2643
Merged
Conversation
Contributor
|
@sacr3dc0w can we proceed with this PR and merge it? |
Contributor
Author
|
@bc-yevhenii-buliuk All ready to merge! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
In
assets/js/theme/category.js, the reset-button click handler callsthis.setLiveRegionsAttributes(...)(plural "Regions"), but the method is actually defined assetLiveRegionAttributes(...)(singular "Region"). Every other invocation in the file (lines 18, 24, and 32) uses the correct singular spelling.Because the handler is bound via jQuery's
.on(), the resultingTypeErroris swallowed by jQuery's event dispatcher rather than surfacing in the console — which is likely why this has gone unnoticed. The functional impact is still real, though: clicking the reset filters link never appliesrole="status"/aria-live="polite"tospan.reset-message, so assistive technology doesn't announce that filters have been cleared. It's a silent accessibility regression.This PR corrects the single offending call site.
Before:
After:
No behavioral changes beyond restoring the intended accessibility announcement.
Tickets / Documentation