Add Aria-Label to WooCommerce Button
-
My client is being sued for accessibility non-compliance. One of the Level A errors that came up was an issue with a button
<button class=“zaddon-open></button>
You’ll see it under the Patient Name and Date of Birth. It appears on 72 product pages. Here’s one of them https://www.integrativepsychiatry.net/shop/diagnos-techs/adrenal-fatigueadrenal-stress-index/
Here is the full text of the error:
This?button?element is empty and has no accessible name.
A programmatically determined name allows screen readers to tell users what the control does. To add a name do one of the following:
Add text between the?button?start and end tags
Add a?title?attribute
Add an?aria-label?attributeAdd an?aria-labelledby?attribute
Add an?img alt?attribute if the button contains an?img?elementI need to add an aria-label to this button. I added a php snippet to accomplish this but it only appears in browser DOM, not in page source code.
Can you please show me how I can add an aria-label to this button so that it appears in the page source code (during server-side rendering)?
Thank you in advance for your help.
The page I need help with: [log in to see the link]
- The topic ‘Add Aria-Label to WooCommerce Button’ is closed to new replies.