Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8497509
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T00:08:44+00:00 2026-06-11T00:08:44+00:00

We are in the process of implementing (i.e. adding) WAI-ARIA support to the main

  • 0

We are in the process of implementing (i.e. adding) WAI-ARIA support to the main navigation menu of a web portal. Menu is the one shown here:

Navigation menu screenshot

Menu is implemented by means of classic <ul> / <li> / <a> DOM tree, styled with CSS to look like horizontal tabs.

What is a WAI-ARIA compliant implementation for such a widget?

I’ve read many parts of most recent WAI-ARIA specs from w3org for a general understanding, taxonomy, and so on.
Then I’ve read about several examples of UI widget implementations. I could not find any example specifically targetd at such a CSS navigation menu. The closest widgets I’ve always found around are the Menu, the MenuBar, and the TabPanel. Of course I also looked in Free ARIA Community group (where this question was originally posted).

I’d say that none of those widgets exactly match a (CSS) navigation menu. As an example, TabPanel may control some content in the page (–> aria-controls), maybe MenuBar too; but I’m not at all sure that a navigation menu controls content in the page (it controls the next page to show). Without going further, there are some other differences as well.
References are at the end of the post. If anyone as better (or more fit) examples of navigation menu, we’d be glad to know about them.

References

  • https://developer.mozilla.org/en-US/docs/Accessibility/ARIA/ARIA_Test_Cases#Menubar_and_Menu
  • http://wiki.jqueryui.com/w/page/38666403/Menubar
  • http://www.oaa-accessibility.org/examplep/menubar2/
  • http://test.cita.illinois.edu/aria/menubar/
  • http://dev.aol.com/dhtml_style_guide#menu
  • http://whatsock.com/modules/aria_tabs_menu_modules/demo.htm
  • http://www.w3.org/TR/wai-aria-practices/#menu
  • http://www.w3.org/TR/wai-aria/roles
  • http://www-03.ibm.com/able/resources/wai_aria_intro.html
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T00:08:46+00:00Added an answer on June 11, 2026 at 12:08 am

    A possible implementation would be:

    HTML structure:

    <div> <!-- Outer wrapper -->
      <ul> <!-- Main navigation bar container -->
        <li> <!-- First-level item without submenu -->
          <a> <!-- Destination URL -->
          </a>
        </li>
        <li> <!-- First-level item with submenu -->
          <a> <!-- Destination URL -->
          </a>
          <ul> <!-- Second-level menu container -->
            <li> <!-- Second-level item -->
              <a>
              </a> <!-- Destination URL -->
            </li>
          </ul>
        </li>
      </ul>
    </div>
    

    Roles:

    • role=”navigation” for outer wrapper <div>
    • role=”menubar” for <ul> navigation bar container
    • role=”menu” for second-level <ul> containers
    • role=”presentation” for first- and second-level <li> menu items (they are not needed in the exposed accessible menubar structure)
    • role=”menuitem” for first- and second-level <a> menu items

    Properties:

    • aria-haspopup=”true” for first-level <a> menu items having a submenu
    • aria-labelledby=”ID of previous <a> menu item” for second-level <ul> containers

    States:

    • aria-selected=”true” on currently visited first- or second-level <a> item; aria-selected=”false” on the other <a> items. That is to enforce the concept “selected <==> current page”
    • aria-expanded=”true/false” for second-level <ul> containers
    • aria-hidden=”true/false” for second-level <ul> containers
    • aria-activedescendant=”” for main <ul> navigation bar container. This is an alternative to working with tabindex
    • tabindex=0 on currently visited <a> item; tabindex=-1 on the other <a> items. That is in order to first focus on the current page when tabbing to the navigation bar. It is an alternative to working with aria-activedescendant

    Keyboard:

    • Tab: Move focus in/out of the menu from other points in the web application.
    • Shift+Tab: Move focus in/out of the menu from other points in the web application, in the reversed order.
    • Right arrow: Next navigation bar item
    • Left arrow: Previous navigation bar item
    • Enter: Activate currently focused item (i.e. navigate to corresponding URL)
    • Space: Activate currently focused item (i.e. navigate to corresponding URL)

    Aug/2014: aria-selected Vs menuitem

    In reply to @Joshua Muheim comment: now I can see from here, as well as from his reference, that aria-selected attribute is not allowed for menuitem role.
    As I read from this recent SO answer there are some solutions given the current state of things, and there is a new proposed attribute too.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am in the process of implementing a favorites system into my web application.
I'm having some problems implementing an algorithm to read a foreign process' memory. Here
I am (still) in the process of implementing key navigation for an app. I
I'm implementing a pair of classes for interprocess communication where one process will be
We're currently designing a web api and are in the process of implementing authorization.
I am in process of implementing a REST API server using Apache CXF JAX-RS
Am in the process of implementing a fairly conventional shopping checkout flow. Currently it
I am in the process of implementing an audit log to record a brief
I am in the process of implementing jQuery, and taking out Prototype libraries in
I'm implementing a process elevation helper for Windows. It's a program that will run

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.