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

  • SEARCH
  • Home
  • 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 4231748
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T02:00:31+00:00 2026-05-21T02:00:31+00:00

I have implemented my own drop down menu and wanted to clarify the accessibility

  • 0

I have implemented my own drop down menu and wanted to clarify the accessibility implication of my solution:

http://jsfiddle.net/tpHcv/5/

The piece of code i am interested in for now is:

$('#sub-nav > li ul').each(function(index){

    var $this = $(this),
        index = index + 1;

    $this    
    .clone()
    .appendTo('#main-nav > li:eq(' + index + ')');

});

‘sub-nav’ is hiddden from everyone via CSS to start. Then it is appended to the relevant ‘main-nav’ li. Will this approach prevent people using assistive technology from getting to the sub menu items?

Please don’t aks why i have done it this way. Suffice to say i have no access to the original markup of the project so cannot just append the sub-menu to the markup in the way that i would like.

  • 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-05-21T02:00:31+00:00Added an answer on May 21, 2026 at 2:00 am

    For greater accessibility, consider adding keyboard support. When a link has the focus (via tab or whatever), make sure its subnav is visible. Similarly, when a subnav link has focus, make sure it is visible. Some of that you can do with css via :focus.

    It’s unfortunate you don’t have access to the markup. Is there a reason you need to clone the <ul>, or is it ok to just move the original element? Do your dom manipulation with script, but do the show/hide with css via the :hover pseudo-class.

    This gets you part of the way there: http://jsfiddle.net/tpHcv/9/ You’ll still need some JavaScript to manage tabs and focus on the sub-items.

    #main-nav li > ul
    {
        display: none;
    }
    
    #main-nav > li a:focus + ul,
    #main-nav > li:hover > ul
    {
        display:block;
    }
    

    Will your #main-nav links go anywhere or are they just for triggering the sub navigation? If they don’t go anywhere, to support browsers with JavaScript disabled, consider hiding #main-nav initially with css, and then show it with JavaScript. This way it isn’t displayed unless the links will actually do something.

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

Sidebar

Related Questions

I have implemented my own RingBuffer , but I'm surprised to see that .NET
I have implemented my own simple version of a navigation window, mainly because navigation
Symfony2 and FOS User Bundle issue... I have implemented my own login form in
I have an own Tree object implemented in PHP. Say we have a tree
I have tried a few things to convert my navigation solution to include drop
I have implemented my own container class and need to implement a const_iterator for
I am trying to build a treemap, and have implemented my own Comparable interface
I have implemented my own class that inherits from the SettingsProvider class. If the
I have implemented my own custom Authorization Attribute in MVC 4 by inheriting from
So I have implemented my own custom membership provider, currently only overwriting ValidateUser(). I

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.