{"_id":"jquery-accessible-subnav-dropdown","_rev":"7-5dfa0f887f262ccae5358fcaf63625e5","name":"jquery-accessible-subnav-dropdown","description":"This jQuery plugin will enhance the keyboard navigation on a “classic” drop-down menu, by adding support of arrows.","dist-tags":{"latest":"1.2.1"},"versions":{"1.0.1":{"title":"jQuery accessible keyboard-enhanced dropdown navigation","name":"jquery-accessible-subnav-dropdown","description":"This jQuery plugin will enhance the keyboard navigation on a “classic” drop-down menu, by adding support of arrows.","version":"1.0.1","keywords":["Accessibility","jQueryPlugin","subnav","dropdown","a11y"],"author":"","dependencies":{"jquery":">=1.0.0"},"bugs":{"url":"https://github.com/nico3333fr/jquery-accessible-subnav-dropdown/issues"},"repositories":[{"type":"git","url":"git+https://github.com/nico3333fr/jquery-accessible-subnav-dropdown.git"}],"licenses":[{"name":"MIT","url":"https://github.com/nico3333fr/jquery-accessible-subnav-dropdown/blob/master/LICENSE"}],"homepage":"http://a11y.nicolas-hoffmann.net/subnav-dropdown/","repository":{"type":"git","url":"git+https://github.com/nico3333fr/jquery-accessible-subnav-dropdown.git"},"_id":"jquery-accessible-subnav-dropdown@1.0.1","scripts":{},"_shasum":"dec93f88df4c69654642aa3f90f30bc805c3bc88","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.3","_npmUser":{"name":"nico3333fr","email":"dante3333@gmail.com"},"dist":{"shasum":"dec93f88df4c69654642aa3f90f30bc805c3bc88","tarball":"https://registry.npmjs.org/jquery-accessible-subnav-dropdown/-/jquery-accessible-subnav-dropdown-1.0.1.tgz","integrity":"sha512-2usWoRsqx6gcCDtul91+RXKsyMEssE7sgDVYHbiaPfD/yXKteK+hu0DLvrZ+rl416zQSXBSr1dln81WBwpqKHA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCrQFiTtDu8uXsV8nyfnbU9sfnOi8EyzpqsrDVtXsKVXwIga5sS50nQsPiTXNXLSYfxe3V+mM8bkmuxhtaMQ9vtuHU="}]},"maintainers":[{"name":"nico3333fr","email":"dante3333@gmail.com"}],"_npmOperationalInternal":{"host":"packages-9-west.internal.npmjs.com","tmp":"tmp/jquery-accessible-subnav-dropdown-1.0.1.tgz_1454841955165_0.5020434870384634"}},"1.0.2":{"title":"jQuery accessible keyboard-enhanced dropdown navigation","name":"jquery-accessible-subnav-dropdown","description":"This jQuery plugin will enhance the keyboard navigation on a “classic” drop-down menu, by adding support of arrows.","version":"1.0.2","keywords":["Accessibility","jQueryPlugin","subnav","dropdown","a11y"],"author":"","dependencies":{"jquery":">=1.0.0"},"bugs":{"url":"https://github.com/nico3333fr/jquery-accessible-subnav-dropdown/issues"},"repositories":[{"type":"git","url":"git+https://github.com/nico3333fr/jquery-accessible-subnav-dropdown.git"}],"licenses":[{"name":"MIT","url":"https://github.com/nico3333fr/jquery-accessible-subnav-dropdown/blob/master/LICENSE"}],"homepage":"http://a11y.nicolas-hoffmann.net/subnav-dropdown/","repository":{"type":"git","url":"git+https://github.com/nico3333fr/jquery-accessible-subnav-dropdown.git"},"_id":"jquery-accessible-subnav-dropdown@1.0.2","scripts":{},"_shasum":"e5e225cba6e94b7d80157ce2790b394e2e02a90d","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.3","_npmUser":{"name":"nico3333fr","email":"dante3333@gmail.com"},"dist":{"shasum":"e5e225cba6e94b7d80157ce2790b394e2e02a90d","tarball":"https://registry.npmjs.org/jquery-accessible-subnav-dropdown/-/jquery-accessible-subnav-dropdown-1.0.2.tgz","integrity":"sha512-ktaTMwXQNtOPg39ytd1wFIl45r1sVqoYIpcfKp63q7KFoOs6PPC+DSdDu8jOPtQWLmhNLCSv6+UhMe53YNTwKA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC2EBc59moYmTNh4GD9a3BK+k7LjUMlPG6B2tQdFPHSPgIhAPMfPUOFf1jRhGO2hE8nIydfnB1X40M/Mbf7mFhtSoWY"}]},"maintainers":[{"name":"nico3333fr","email":"dante3333@gmail.com"}],"_npmOperationalInternal":{"host":"packages-5-east.internal.npmjs.com","tmp":"tmp/jquery-accessible-subnav-dropdown-1.0.2.tgz_1454842689557_0.7834869248326868"}},"1.1.0":{"title":"jQuery accessible keyboard-enhanced dropdown navigation","name":"jquery-accessible-subnav-dropdown","description":"This jQuery plugin will enhance the keyboard navigation on a “classic” drop-down menu, by adding support of arrows.","version":"1.1.0","keywords":["Accessibility","jQueryPlugin","subnav","dropdown","a11y"],"author":"","dependencies":{"jquery":">=1.0.0"},"bugs":{"url":"https://github.com/nico3333fr/jquery-accessible-subnav-dropdown/issues"},"repositories":[{"type":"git","url":"git+https://github.com/nico3333fr/jquery-accessible-subnav-dropdown.git"}],"licenses":[{"name":"MIT","url":"https://github.com/nico3333fr/jquery-accessible-subnav-dropdown/blob/master/LICENSE"}],"homepage":"http://a11y.nicolas-hoffmann.net/subnav-dropdown/","repository":{"type":"git","url":"git+https://github.com/nico3333fr/jquery-accessible-subnav-dropdown.git"},"_id":"jquery-accessible-subnav-dropdown@1.1.0","scripts":{},"_shasum":"4b71383d500ce92503c7de359b514d7820a5b41b","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.3","_npmUser":{"name":"nico3333fr","email":"dante3333@gmail.com"},"dist":{"shasum":"4b71383d500ce92503c7de359b514d7820a5b41b","tarball":"https://registry.npmjs.org/jquery-accessible-subnav-dropdown/-/jquery-accessible-subnav-dropdown-1.1.0.tgz","integrity":"sha512-aS12iBwRWt6/6IoKquJ9n5AygcM0JKkhtjzT/7fJyHe34NqKxsTHpHauE3qVuWAsjS8aelAtjmkC4keu/AGl9A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEe2BsaYTdghOWFOkqWjOuWxa7Evd3HOtXZCK96mnTcoAiBrAPyoQWQUfK57yAhGP3kWIuOG95RBYSDLFHv0qLk0Iw=="}]},"maintainers":[{"name":"nico3333fr","email":"dante3333@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/jquery-accessible-subnav-dropdown-1.1.0.tgz_1459067691781_0.6454583972226828"}},"1.2.0":{"title":"jQuery accessible keyboard-enhanced dropdown navigation","name":"jquery-accessible-subnav-dropdown","description":"This jQuery plugin will enhance the keyboard navigation on a “classic” drop-down menu, by adding support of arrows.","version":"1.2.0","keywords":["Accessibility","jQueryPlugin","subnav","dropdown","a11y"],"author":"","dependencies":{"jquery":">=1.0.0"},"bugs":{"url":"https://github.com/nico3333fr/jquery-accessible-subnav-dropdown/issues"},"repositories":[{"type":"git","url":"git+https://github.com/nico3333fr/jquery-accessible-subnav-dropdown.git"}],"licenses":[{"name":"MIT","url":"https://github.com/nico3333fr/jquery-accessible-subnav-dropdown/blob/master/LICENSE"}],"homepage":"http://a11y.nicolas-hoffmann.net/subnav-dropdown/","repository":{"type":"git","url":"git+https://github.com/nico3333fr/jquery-accessible-subnav-dropdown.git"},"_id":"jquery-accessible-subnav-dropdown@1.2.0","scripts":{},"_shasum":"91387f1e35a3a939eb4c6a316a551a1e532c4a8c","_from":".","_npmVersion":"2.14.7","_nodeVersion":"4.2.3","_npmUser":{"name":"nico3333fr","email":"dante3333@gmail.com"},"dist":{"shasum":"91387f1e35a3a939eb4c6a316a551a1e532c4a8c","tarball":"https://registry.npmjs.org/jquery-accessible-subnav-dropdown/-/jquery-accessible-subnav-dropdown-1.2.0.tgz","integrity":"sha512-O8jY0EVaFYczlv6UJDr2SXtYPPS+qmwlJC74B1gspdRl1ciAT5GrpkZ2FUalnIexJuLMTpqGaCXEUTv5KS9hYA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBpVfsdK5gNF+L87i8xALS6eWGYKEvgm5eqx+Lrov9CDAiAS7/EwFG0zGCQcFlZwdcw9R4/SLItAatROAtED8WgQ/A=="}]},"maintainers":[{"name":"nico3333fr","email":"dante3333@gmail.com"}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/jquery-accessible-subnav-dropdown-1.2.0.tgz_1460208461119_0.4146213491912931"}},"1.2.1":{"title":"jQuery accessible keyboard-enhanced dropdown navigation","name":"jquery-accessible-subnav-dropdown","description":"This jQuery plugin will enhance the keyboard navigation on a “classic” drop-down menu, by adding support of arrows.","version":"1.2.1","main":"jquery-accessible-subnav-dropdown.js","keywords":["Accessibility","jQueryPlugin","subnav","dropdown","a11y"],"author":"","dependencies":{"jquery":">=1.0.0"},"bugs":{"url":"https://github.com/nico3333fr/jquery-accessible-subnav-dropdown/issues"},"repositories":[{"type":"git","url":"git+https://github.com/nico3333fr/jquery-accessible-subnav-dropdown.git"}],"licenses":[{"name":"MIT","url":"https://github.com/nico3333fr/jquery-accessible-subnav-dropdown/blob/master/LICENSE"}],"homepage":"http://a11y.nicolas-hoffmann.net/subnav-dropdown/","gitHead":"0b5cc4a0dedb7213d525a5dc3bc76444e0967b1b","repository":{"type":"git","url":"git+https://github.com/nico3333fr/jquery-accessible-subnav-dropdown.git"},"_id":"jquery-accessible-subnav-dropdown@1.2.1","scripts":{},"_shasum":"0b8ec445ef01d0fe44bb3719d9b53cfab67f87a3","_from":".","_npmVersion":"3.10.9","_nodeVersion":"4.4.2","_npmUser":{"name":"nico3333fr","email":"dante3333@gmail.com"},"dist":{"shasum":"0b8ec445ef01d0fe44bb3719d9b53cfab67f87a3","tarball":"https://registry.npmjs.org/jquery-accessible-subnav-dropdown/-/jquery-accessible-subnav-dropdown-1.2.1.tgz","integrity":"sha512-9S4sFx1aBP6wpyrFqBAXREC+NuIJYCcXV5yPUhFY0Xq1GlZzR2EXH4Ahad5ehwDKlefiUGYe5Teq7HZNXCey1g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDojFY0S9BIiNphQRRCVSVv5YFxiltR1iHw8SmjPSo16AiEAzKMLmGvthX22avibvmYm7Zsa2C/aXUO0iGf6Q5Dsdjs="}]},"maintainers":[{"name":"nico3333fr","email":"dante3333@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/jquery-accessible-subnav-dropdown-1.2.1.tgz_1501151554687_0.03697365429252386"}}},"readme":"# jQuery accessible keyboard-enhanced dropdown navigation\r\nThis jQuery plugin enhances (a lot) keyboard navigation on a “classic” drop-down menu.\r\n\r\nYou can see a working demo here: http://a11y.nicolas-hoffmann.net/subnav-dropdown/\r\n\r\n<h2 id=\"accessible\">Accessible?</h2>\r\n \r\n <h3 class=\"mt0\" id=\"what-does-it-do\">What does it do?</h3>\r\n \r\n <p>This script adds listeners to keyboard and mouse to make a keyboard-friendly dropdown navigation system (using arrows and <kbd>Esc</kbd>). You can still use <kbd>Tab</kbd> if you prefer, it doesn’t affect this natural behaviour.</p>\r\n \r\n <h3 class=\"mt0\" id=\"keys\">Keys</h3>\r\n \r\n <p>If you are on “main” navigation:</p>\r\n \r\n <ul>\r\n \t<li>use <kbd>Left</kbd>/<kbd>Right</kbd> to see previous/next link</li>\r\n\t<li>if you are on the first one, using <kbd>Left</kbd> will bring you to last one (same for last one and <kbd>right</kbd></li>\r\n \t<li>if the element has a sub-navigation, you will focus the first sub-element</li>\r\n </ul>\r\n\r\n <p>If you are on a “sub”-navigation link:</p>\r\n\r\n <ul>\r\n \t<li>use <kbd>Up</kbd>/<kbd>Down</kbd> to navigate through “sub”-navigation links</li>\r\n\t<li>using <kbd>Up</kbd>/<kbd>Down</kbd> will trap you into “sub”-navigation links, for example, if you use <kbd>Down</kbd> on the last sub-element, the focus will be set to the first sub-element</li>\r\n\t<li>use <kbd>Left</kbd>/<kbd>Right</kbd> to go to previous/next “sub”-navigation, if it exists, it will to the first sub-element, if not, it will go to previous/next navigation element</li>\r\n \t<li>use <kbd>Esc</kbd> to close the sub-navigation, it will also give the focus back to parent navigation element</li>\r\n </ul>\r\n\r\n\r\n <h2 id=\"how-to\">How to</h2>\r\n \r\n <h3 class=\"mt0\" id=\"how-it-works\">How it works</h3> \r\n \r\n <p>The script detects a mouse enter in a navigation element and shows its sub-navigation. Of course, the sub-navigation will be visible as long as the mouse is in the navigation element.</p>\r\n \r\n <p>It will add an attribute <code>data-show-sub</code> to the navigation items (to indicate if the element is opened or not), and an attribute <code>data-visually-hidden</code> on sub-navigation (to indicate if the sub-navigation is visible or not).</p>\r\n \r\n <p>And of course: it also adds some keyboard listeners to enable a cool keyboard navigation using <kbd>Left</kbd>/<kbd>Right</kbd>,<kbd>Up</kbd>/<kbd>Down</kbd> arrows (and also <kbd>Esc</kbd>). Try it on the top menu, you will surely appreciate! ;)</p>\r\n \r\n <h3 class=\"mt0\" id=\"how-to-use-it\">How to use it</h3> \r\n \r\n <p>Just follow these conventions by using <code>js-nav-system</code>, <code>js-nav-system__item</code>, <code>js-nav-system__link</code>, <code>js-nav-system__subnav</code>, <code>js-nav-system__subnav__item</code>, <code>js-nav-system__subnav__link</code>:</p>\r\n \r\n   <pre><code class=\"language-markup\">&lt;ul class=\"js-nav-system\"&gt;\r\n\r\n &lt;li class=\"js-nav-system__item\"&gt;\r\n  &lt;a href=\"…\" class=\"js-nav-system__link\"&gt;Link&lt;/a&gt;\r\n &lt;/li&gt;\r\n\r\n &lt;li class=\"js-nav-system__item\"&gt;\r\n  &lt;a href=\"…\" class=\"js-nav-system__link\"&gt;Link 2&lt;/a&gt;\r\n   &lt;ul class=\"js-nav-system__subnav\"&gt;\r\n    &lt;li class=\"js-nav-system__subnav__item\"&gt;\r\n     &lt;a href=\"…\" class=\"js-nav-system__subnav__link\"&gt;Sub Link 1&lt;/a&gt;\r\n    &lt;/li&gt;\r\n    &lt;li class=\"js-nav-system__subnav__item\"&gt;\r\n     &lt;a href=\"…\" class=\"js-nav-system__subnav__link\"&gt;Sub Link 2&lt;/a&gt;\r\n    &lt;/li&gt;\r\n   &lt;/ul&gt;\r\n &lt;/li&gt;\r\n\r\n &lt;!-- etc. --&gt;\r\n\r\n &lt;li class=\"js-nav-system__item\"&gt;\r\n  &lt;a href=\"…\" class=\"js-nav-system__link\"&gt;Link x&lt;/a&gt;\r\n   &lt;ul class=\"js-nav-system__subnav\"&gt;\r\n    &lt;li class=\"js-nav-system__subnav__item\"&gt;\r\n     &lt;a href=\"…\" class=\"js-nav-system__subnav__link\"&gt;Sub Link x&lt;/a&gt;\r\n    &lt;/li&gt;\r\n    &lt;li class=\"js-nav-system__subnav__item\"&gt;\r\n     &lt;a href=\"…\" class=\"js-nav-system__subnav__link\"&gt;Sub Link x+1&lt;/a&gt;\r\n    &lt;/li&gt;\r\n    &lt;li class=\"js-nav-system__subnav__item\"&gt;\r\n     &lt;a href=\"…\" class=\"js-nav-system__subnav__link\"&gt;Sub Link x+1&lt;/a&gt;\r\n    &lt;/li&gt;\r\n   &lt;/ul&gt;\r\n  &lt;/li&gt;\t \r\n\r\n &lt;/ul&gt;\r\n</code></pre>\r\n \r\n <p>Of course it is supposed to work on <code>ul li a</code> tags, but it can work on other elements (like form inputs) if the structure is kept.</p>\r\n \r\n <p>For styles, here are minimal styles needed:</p>\r\n \r\n<pre><code class=\"language-css\">.subnav {\r\n  position: absolute;\r\n}\r\n\r\n[data-visually-hidden=\"true\"] {\r\n  display: none;\r\n}\r\n[data-visually-hidden=\"false\"] {\r\n  display: block;\r\n}\r\n</code></pre>\r\n\t\r\n  <p>The plugin will do the rest. Yes, just for you.</p>\r\n \r\n <h2 id=\"other-informations\">Other informations</h2>\r\n\r\n <h3 class=\"mt0\" id=\"last-news\">Last news</h3>\r\n\r\n \r\n <p>9th of April 2016: <a href=\"https://github.com/nico3333fr/jquery-accessible-subnav-dropdown/issues/3\">fixed and enhanced keyboard management in subnavs</a>, thanks again to <a href=\"https://twitter.com/jbcordina\">@jbcordina</a>.</p>\r\n \r\n <p>27th of March 2016: <a href=\"https://github.com/nico3333fr/jquery-accessible-subnav-dropdown/commit/02ac9e2d76447b14e0ec48d45684f4e7eaa9145d\">fixed two bugs in keyboard management</a>, thanks to <a href=\"https://twitter.com/jbcordina\">@jbcordina</a>.</p>\r\n \r\n\r\n <p class=\"mb1\">7th of February 2016: <a href=\"https://www.npmjs.com/package/jquery-accessible-subnav-dropdown\">this plugin is available on NPMjs.com</a>, and you can install it with <code>npm i jquery-accessible-subnav-dropdown</code>.</p>\r\n\r\n <h3 class=\"mt0\" id=\"license\">License</h3>  \r\n\r\n \r\n <p>No license problem, it uses <abbr title=\"Massachusetts Institute of Technology\">MIT</abbr> license, so <strong>it’s free, open-source and you can do whatever you want with it, including commercial use</strong>. <a href=\"https://github.com/nico3333fr/jquery-accessible-subnav-dropdown/blob/master/LICENSE\">This permission notice</a> shall be included in all copies or substantial portions of it. </p>\r\n <p>However, it is not prohibited to tell me that you’ve used it, or send me a little “thank you”. ;) </p>\r\n \r\n <h3 class=\"mt0\" id=\"weight\">Weight</h3>  \r\n \r\n <p>It is lightweight: 11<abbr title=\"kilobytes\">kb</abbr>(development), 4.7<abbr title=\"kilobytes\">kb</abbr> (minified), only <strong>700&nbsp;bytes minified and gzipped</strong>.</p>\r\n \r\n <h3 class=\"mt0\" id=\"used-by\">Used by</h3>  \r\n \r\n <p>This plugin has been used for example on <a href=\"http://www.visionlaser.ch/\">Vision Laser</a> or on <a href=\"http://ohchr.org/\">Office of the High Commissioner for Human Rights</a>.</p> \r\n\r\n <h3 class=\"mt0\" id=\"tribute\">Tribute</h3>  \r\n \r\n <p>The idea of this script is inspired by <a href=\"http://heydonworks.com/practical_aria_examples/#submenus\">Heydon’s simple dropdowns example</a>. Seriously, you should have a look at his great work in accessibility.</p> \r\n \r\n","maintainers":[{"name":"nico3333fr","email":"dante3333@gmail.com"}],"time":{"modified":"2022-06-19T04:57:07.209Z","created":"2016-02-07T10:45:57.571Z","1.0.1":"2016-02-07T10:45:57.571Z","1.0.2":"2016-02-07T10:58:10.695Z","1.1.0":"2016-03-27T08:34:54.080Z","1.2.0":"2016-04-09T13:27:42.113Z","1.2.1":"2017-07-27T10:32:35.683Z"},"homepage":"http://a11y.nicolas-hoffmann.net/subnav-dropdown/","keywords":["Accessibility","jQueryPlugin","subnav","dropdown","a11y"],"repository":{"type":"git","url":"git+https://github.com/nico3333fr/jquery-accessible-subnav-dropdown.git"},"bugs":{"url":"https://github.com/nico3333fr/jquery-accessible-subnav-dropdown/issues"},"readmeFilename":"README.md"}