How to add aria-hidden and aria-expanded
-
I am using your plugin and want to add aria-hidden and aria-expanded attributes to the code so that the clickable ‘a‘ tag toggles between aria-expanded=”true” (or false), and so that the disappearing span gets an aria-hidden=”false” (or true).
This is necessary for accessibility purposes, and I’m just having a little trouble modifying the code to get the state to change. I’m able to modify the “showhide_shortcode()” functions so that the attributes give me the correct initial values, but I am having trouble figuring out how to change your “showhide_toggle()” function to get the value states to change.
Please help so that I can use your shortcode. This is a MUST for all government sites that have to comply with accessibility standards.
- The topic ‘How to add aria-hidden and aria-expanded’ is closed to new replies.