My client has engaged a 3rd party company to conduct a web accessibility audit on a site I created for them a while back. I’ve been able to address all the issues they’ve flagged except for one.
I have a DIV that is acting as a button that triggers an animation/interaction that reveals more content. The audit company is telling me that for accessibility reasons the DIV “button” needs to communicate to screen readers that the button has been pressed and the content has been “expanded”
Specifically, this is what they are suggesting that I do:
Add an
aria-controls
attribute to the element that controls the expandable content and set the value of that attribute to equal theid
of the tag that wraps the expanded content. Also add anaria-expanded="true"
attribute to that same control element when content is expanded, andaria-expanded="false"
otherwise.
Unfortunately, this is beyond my expertise. Is this difficult to do? Is anyone familiar with this type of situation or has run into similar issues in regards to accessibility audits?
Any help would be greatly appreciated!