Start a new discussion
To start a new discussion please visit the discussions section of the GitHub home page of the project.
You can also search our old self-hosted forums for any useful information below but please note that posting new content here is not possible any more.
Toggle and a Link v1.0
Home › Forums › Older releases › 1.0.x › Toggle and a Link v1.0
- This topic has 2 replies, 3 voices, and was last updated 7 years, 7 months ago by emmawatson901.
-
AuthorPosts
-
June 18, 2015 at 18:06 #2604beeryeParticipant
First of all, thank you again for all your hard work on this plugin and making accessibility such an important part of it. The new keyboard and ARIA support is great!
I’m trying to achieve some functionality you helped me add in a previous version in regards to the mobile view where the parent link with a toggle could be focused and linked to (landing page) and the toggle would be a separate element that would fire the submenu. This was preferred over the current method of tapping a parent twice to go to the landing page/URL.
Reference: http://www.smartmenus.org/forums/topic/toggle-and-a-link/
Is it possible to do this again? I’m not sure if I’m asking for too much or how complicated it could get considering all the ARIA attributes would have to shift from the parent link to the nested span toggle element.
Something like this (overly simplified):
<ul> <li> <a href="/about/">About</a> <button aria-expanded="false" aria-haspopup="true" aria-controls="submenu">+</button> <ul id="submenu" aria-hidden="true"> <li><a href="">Staff</a></li> <li><a href="">Staff</a></li> <li><a href="">Staff</a></li> </ul> </li> </ul>
Thanks again for any help you can offer.
June 24, 2015 at 12:19 #2616adminKeymasterHi and sorry for all this delay! It’s been very busy times here lately and I just don’t have the chance to look at the forums very regularly. 😳
It’s not that difficult to use a custom focusable element like a
BUTTON
after the link as a sub menu toggle in collapsible mode – this could be implemented as an add-on. But the main problem is moving the ARIA attributes from the link to that element since the script core would certainly need some modifications and this would prevent you from being able to upgrade easily in the future.What you could do with the original v1.0.x script core, is to use the following mod to make sure links are loaded on first tap in collapsible mode (the sub arrow SPAN’s are now actually sub menu toggle buttons in collapsible mode by default):
// don't show the sub menus in collapsible mode unless the sub arrow is clicked var $mainMenu = $('#main-menu').on('click', 'span.sub-arrow', function(e) { var obj = $mainMenu.data('smartmenus'); if (obj.isCollapsible()) { var $item = $(this).parent(), $sub = $item.parent().dataSM('sub'); $sub.dataSM('arrowClicked', true); } }).bind({ 'beforeshow.smapi': function(e, menu) { var obj = $mainMenu.data('smartmenus'); if (obj.isCollapsible()) { var $menu = $(menu); if (!$menu.dataSM('arrowClicked')) { return false; } $menu.removeDataSM('arrowClicked'); } } });
But, as you can guess, this will mess the ARIA attributes logic when the menu is in collapsible mode (and mobile screen reader users would not be able to activate the sub menus).
April 26, 2017 at 14:34 #3514emmawatson901Participant10th class results 2017, 12th class results 2017, ssc class results 2017, sslc class results 2017, intermediate class results 2017, hsc class results 2017, www resultsnic2017 in 2017, cbse result 2017, cbse 10th class result 2017, cbse board 12th result 2017, icse board results 2017, icse 10th board result 2017, icse 12th board result 2017, ap board results 2017, ap 10th result 2017, ap inter 1st and 2nd year result 2017, bihar board results 2017, bihar board 10th result 2017, bseb inter result 2017, cgbse board results 2017, cgbse 10th board result 2017, cgbse 12th class result 2017, gujarat board results 2017, gujarat board ssc result 2017, gujarat 12th result 2017, goaresults.nic.in 2017, goa ssc result 2017, goa hssc result 2017, hbse board results 2017, haryana 10th result 2017, haryana board 12th result 2017, hpbose result 2017, hpbose 10th result 2017, hp board 12th result 2017, jkbose result 2017, jammu board 10th results 2017, jkbose plus two result 2017, jac result 2017, jharkhand jac 10th result 2017, jac intermediate result 2017, karnataka result 2017, karnataka board sslc result 2017, karnataka board puc result 2017, kerala result 2017, kerala board 10th class result 2017, kerala dhse result 2017, mp result 2017, mpbse 10th result 2017, mp board 12th result 2017, mah result 2017, mah board ssc result 2017, maharashtra board 12th result 2017, odisha results 2017, odisha board 10th class result 2017, orissa chse result 2017, punjab board results 2017, pseb 10th class result 2017, pseb 12th class result 2017, rbse board results 2017, rajasthan 10th result 2017, rbse 12th result 2017, tn board result 2017, tamilnadu sslc result 2017, tn board 12th result 2017, up result 2017, up board 10th class results 2017, up board 12th result 2017, wb board result 2017, wbbse 10th result 2017, west bengal higher secondary result 2017, telangana exam result 2017, telangana board sslc result 2017, telangana board intermediate result 2017, icse 10th board result 2017, icse 12th board result 2017
-
AuthorPosts
- The forum ‘1.0.x’ is closed to new topics and replies.