Search code examples
htmlcssasp.nethtml-listswcag2.0

Does compliance to WCAG 2.0 AA use ul tab as navigation tabs in a master page?


I've got an aspx web application that uses an unordered list tags to parse a tab menu inside a master page. My question is: is it ok to use an ul tag according to WCAG 2.0 AA?

<div id="divTabsId">
    <ul>
        <li class="home" id="elementId">
            <a href="xxx.aspx">
                            Start</a>
        </li>

        <li>
            <a id="elementId2" href="zz.aspx">
                            T1</a>
        </li>
        <li>
            <a href="yyy.aspx">
                            Help</a>
        </li>   
    </ul>
</div>

Solution

  • There is nothing wrong with using ul tag. But adding the appropriate aria tags in addition to it would be useful, such as role="menu" to the ul.

    Please see W3 recommendation here: https://www.w3.org/WAI/GL/wiki/Using_ARIA_menus

    Depending on your requirement you could read up these roles:

    role="menu" : https://www.w3.org/TR/wai-aria/roles#menu

    role="menu-item" : https://www.w3.org/TR/wai-aria/roles#menuitem