Best practice for semantic/accessible side menu
I'm planning new functionality for a site and before I start, I want to get the HTML structure right in my mind first. But as I plan this out, I find that I'm not totally sure whether what I'm doing is indeed best practice use of semantic elements and aria attributes.
I've attached the basic wireframe and my intended code structure, with the rationale underneath. I'm first examining the structure of the final HTML, rather than the script needed to handle the interactions.
I'm very open to different viewpoints and feedback
Here are the previews and code:
I've attached the basic wireframe and my intended code structure, with the rationale underneath. I'm first examining the structure of the final HTML, rather than the script needed to handle the interactions.
I'm very open to different viewpoints and feedback
Here are the previews and code:

