WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: 4.1.1 Parsing > nested elements

for

From: JP Jamous
Date: Mar 31, 2018 11:52AM


Just throwing my 2 cents in here.

I agree with using the role on the Div and not the UL. Especially if we are constructing a dropdown menu. Personally, I prefer for the sake of semantic to use role on a div and stick with children divs to construct the dropdown menu.

I understand that UL is used to create navigation menus, because logically it contains a list of links. So UL is a container for unordered lists of something and using a role on it would overwrite its purpose. Whereas, DIV is used for almost anything. It's main purpose is to divide the pages into various segments. So using DIVs with CSS classes to construct menus and submenus, would be more logical from a HTML semantic prospective. It would not be the easiest way to do it, but that is the reason why in HTML most developers try to create components the easy way. Let's not forget that time is money and in an Agile environment, so many language semantics get violated for the sake of each sprint.





--------------------
JP Jamous
Senior Digital Accessibility Engineer
E-Mail Me |Join My LinkedIn Network
--------------------