NO BUG: Nav Items Div is not <UL> as standard (sort of)

Not sure this qualifies a bug per se, but it is different to other elements and it is regarding the menu and a11y compliance etc

Take a dropdown element for example, the HTML tag is “hard-coded” to be a <li> as in if you change it to something else then clear it it returns to a <li>

Now for the Nav Items div, this is a div with the <ul> added after, but if you clear the tag, it returns back to a standard <div>

As a QOL improvement perhaps if not a bug, it would be great if this could be “hard-coded” as a <ul> similar to the dropdown element so that it can’t accidentally be cleared and return the tag to a <div>

This would help with a11y compliance as if it is cleared by accident then the whole menu structure is non-compliant as you would have <li>'s wrapped in a div

Hi Dan,
Thanks so much for your report!

The way it is now is a conscious decision. Since we decided to build the menu markup as ul > li and the dropdown is used 99% of the time within a menu, it is a list item by default.

The nav items wrapper is nothing more than a simple div element that is set to ul in the context of the nestable nav element so that it can still be used flexibly and we don’t have to introduce an additional element that only serves as ul.

Best regards,

1 Like

That’s cool and understand your reasons why :grinning: