Toggle button accessibility
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2022
09:45 AM
I am interested in using toggle buttons in a canvas course but have questions about accessibility. I have not been able to activate the button using the tab key (tab+enter or tab+arrows) using the code I was provided. Is there something missing? How can I operate this button with keyboard only? Here is the code:
< div >
< h2 >< a class="element_toggler btn btn-primary" role="button" aria-controls="group_1" aria-label="Toggler toggle list visibility" aria-expanded="false" href="1">Button Title< /a>< /h2>
< ul id="group_1" style="list-style: none; display: none;" >
< li >
< h3 >Subtitle< /h3 >
< p >Content< /p >
< /ul >
< /li >
< /div >
< ul id="group_1" style="list-style: none; display: none;" >
< li >
< h3 >Subtitle< /h3 >
< p >Content< /p >
< /ul >
< /li >
< /div >