I have a mega menu in the header of a site. It’s made with 4 bootstrap columns.
On desktop viewport sizes, I need the columns to display just as they are. On tablet and mobile, I need them to display as accordions. The <h6> tag, which is used at the top of each column, would be used to collapse/expand the accordions. What’s the best way to go about this?
1st I preface by saying I know NADDA about bootstrap. That being said, I want to lay out the complexity of what you ask.
First… are you SURE you want to use an h6, headers are NOT just for styling. Second they should be buttons… but… you only want them to be buttons on mobile. For accessibility, these buttons need to be associated to the content below (open / closed). This is something you do NOT want on desktop. Odds are, and this is just off the cuff thinking, you would want that trigger button only to show on mobile and hide the “normal” heading every where else.