Is there a way to add an aria-label to the button element.
I need to add it so that a screen reader can get more information.
You can see in the private link I sent that the buttons are all “shop” but they are sending to a different category and I want to add the category to a label for screen readers.
Also, I need to add the aria-label to the back to top link and the navigation links on the full width sliders. How do I do that?
Thanks for your help!
Hey epkdesign,
Maybe this will help you out? https://stackoverflow.com/questions/63924843/add-aria-label-on-button
Best regards,
Rikard
Thanks Rikard,
That did help.
Can you tell me why the back to top link has an aria-hidden=”true” tag in there. Is it not useful to screen readers?
I see the woo commerce cart button has this as well. Why and how do we make it visible to screen readers?
Hi,
I’m not 100% sure as to why that is unfortunately, but I’m guessing that it has something to with it no being focusable. I can ask our developers if you should want further clarification though. You should be able to set it to false using JavaScript if you should feel the need for it. Here’s more documentation the tag in question: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-hidden
Best regards,
Rikard