• daveprogrammingartscom

    (@daveprogrammingartscom)


    We are using a cart icon for our cart link in the main nav. I noticed the cart icon without the badge / count overlay properly shows ‘aria-label’. However when I add the badge / count overlay the ‘aria-label’ disappears and is not included in the cart link.

    The badge / counter appears to remove the aria-label.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author megamenu

    (@megamenu)

    Hi Dave,

    I’ve checked the code and the aria-label is (was) removed on purpose “Pagespeed insights (now Lighthouse) does not like it when the link text does not match the aria-label (which is set to the menu item title when the text is hidden)”.

    It seems Lighthouse doesn’t mind that now, so I’ll change it back and include it in the next update. As a quick workaround in the mean time, you could change your HTML replacement to:

    <span aria-label='Cart items'>[maxmegamenu_woo_cart_count]</span>

    Regards,
    Tom

    Thread Starter daveprogrammingartscom

    (@daveprogrammingartscom)

    Hey Tom – Thanks for quick response. I did add the work-around (which is very helpful) but it’s only showing the aria-label for ‘cart items’. The aria-label for the main cart icon (shopping cart) is still missing it’s aria-label ‘cart’. I think this is what you’ll update in this next release? The ‘cart’ aria-label? Thx you!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘aria-label missing cart icon when count badge shows’ is closed to new replies.