Skip to content

fix(category): correct setLiveRegionsAttributes typo in reset handler#2643

Merged
bc-yevhenii-buliuk merged 2 commits into
bigcommerce:masterfrom
sacr3dc0w:typo
May 11, 2026
Merged

fix(category): correct setLiveRegionsAttributes typo in reset handler#2643
bc-yevhenii-buliuk merged 2 commits into
bigcommerce:masterfrom
sacr3dc0w:typo

Conversation

@sacr3dc0w
Copy link
Copy Markdown
Contributor

What?

In assets/js/theme/category.js, the reset-button click handler calls this.setLiveRegionsAttributes(...) (plural "Regions"), but the method is actually defined as setLiveRegionAttributes(...) (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 resulting TypeError is 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 applies role="status" / aria-live="polite" to span.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:

$('a.reset-btn').on('click', () => this.setLiveRegionsAttributes($('span.reset-message'), 'status', 'polite'));

After:

$('a.reset-btn').on('click', () => this.setLiveRegionAttributes($('span.reset-message'), 'status', 'polite'));

No behavioral changes beyond restoring the intended accessibility announcement.

Tickets / Documentation

@sacr3dc0w sacr3dc0w requested a review from a team as a code owner April 20, 2026 15:00
Copy link
Copy Markdown
Contributor

@bc-yevhenii-buliuk bc-yevhenii-buliuk left a comment

Choose a reason for hiding this comment

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

good catch!

@bc-yevhenii-buliuk
Copy link
Copy Markdown
Contributor

@sacr3dc0w can we proceed with this PR and merge it?

@sacr3dc0w
Copy link
Copy Markdown
Contributor Author

@bc-yevhenii-buliuk All ready to merge!

@bc-yevhenii-buliuk bc-yevhenii-buliuk merged commit 2e3f47c into bigcommerce:master May 11, 2026
1 check passed
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