-
Notifications
You must be signed in to change notification settings - Fork 219
Ensure aria-label is showing correct value based on setting #9672
Conversation
The release ZIP for this PR is accessible via:
Script Dependencies ReportThere is no changed script dependency between this branch and trunk. This comment was automatically generated by the TypeScript Errors Report
🎉 🎉 This PR does not introduce new TS errors. |
Size Change: +67 B (0%) Total Size: 1.1 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was actually working on this also, but forgot to assign myself 😅.
I have tested this PR and it works great!
I am adding some stylistic suggestions based on the code present in frontend.ts
but feel free to ignore them.
I'm pre-approving :)
@danieldudzic - great suggestions, I didn't know there were already existing code in |
Fixes #9645
This PR fixes the issue where the attribute
aria-label
is always displaying thetotal price
information even whenDisplay total price
setting is false.Screenshots
Testing
User Facing Testing
.wc-block-mini-cart__button
on themini cart block
. Find thearia-label
.X item(s) in cart
, with the price. Hover over themini cart
icon and click on. Inspect the element again to ensure it is still displayingX item(s) in cart
.mini cart
settings and switch it to showDisplay total price
.aria-label
should now show "X item(s) in cart, total price of Y".mini cart
in the header and perform the same tests and ensure each instance of themini cart
shows their ownaria-label
value depending on theDisplay total price
settings.WooCommerce Visibility
Performance Impact
Changelog