Toggle button accessibility

Jen_Coventry
Community Member

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 >