{"_id":"aria-accordion","_rev":"52-59331fc156b6b7a858d3535e0efb848d","name":"aria-accordion","dist-tags":{"latest":"1.1.0"},"versions":{"0.1.0":{"name":"aria-accordion","version":"0.1.0","author":{"name":"18F"},"_id":"aria-accordion@0.1.0","maintainers":[{"name":"noahmanger","email":"noah.manger@gmail.com"}],"contributors":[{"name":"Josh Carp","email":"joshua.carp@gsa.gov"},{"name":"Noah Manger"}],"homepage":"https://github.com/18F/accordion#readme","bugs":{"url":"https://github.com/18f/accordion/issues"},"dist":{"shasum":"1b31ab38e6bcee51641d5293e84ea25348d074c4","tarball":"https://registry.npmjs.org/aria-accordion/-/aria-accordion-0.1.0.tgz","integrity":"sha512-zk+CcKKtbIJyBye5OBLglCjxzG+LSoMcuqpVx8zAnzgVj2OvQR3xzY7SDe57wXnM68vq2RbEWd/7rnpzRJvMPg==","signatures":[{"sig":"MEYCIQD+4oZK8csbjmDleJtAaBp+TxKRm55j8cXK7fDd3YIO/AIhAJHEjgdxNSN+o7Pgt4gnZH3e9qnOceS52yg/A64yW/J7","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"src/accordion.js","_from":".","_shasum":"1b31ab38e6bcee51641d5293e84ea25348d074c4","gitHead":"645f0ba765c5b7db62ae71f8592dcdd59126da29","scripts":{"test":"mochify tests/accordion.js","build":"browserify example/init.js > example/main.js"},"_npmUser":{"name":"noahmanger","email":"noah.manger@gmail.com"},"repository":{"url":"git://github.com/18F/accordion.git","type":"git"},"_npmVersion":"3.6.0","description":"A simple, accessible, ARIA accordion","directories":{},"_nodeVersion":"5.5.0","dependencies":{"underscore":"1.8.3"},"devDependencies":{"chai":"^3.2.0","mocha":"^2.2.5","mochify":"^2.13.0"},"_npmOperationalInternal":{"tmp":"tmp/aria-accordion-0.1.0.tgz_1457652925933_0.10550347506068647","host":"packages-13-west.internal.npmjs.com"}},"0.1.1":{"name":"aria-accordion","version":"0.1.1","author":{"name":"18F"},"_id":"aria-accordion@0.1.1","maintainers":[{"name":"18f-devops","email":"devops@gsa.gov"},{"name":"adam.biagianti","email":"adam.biagianti@gsa.gov"},{"name":"aidanfeldman","email":"aidan.feldman@gmail.com"},{"name":"jbarnicle","email":"michael.barnicle@gsa.gov"},{"name":"jeremiak","email":"jbkimelman@gmail.com"},{"name":"jmcarp","email":"jm.carp@gmail.com"},{"name":"jseppi","email":"james.seppi@gmail.com"},{"name":"juliaelman","email":"hello@juliaelman.com"},{"name":"mbenari","email":"hello@maya-benari.com"},{"name":"mgwalker","email":"npm@darkcooger.net"},{"name":"msecret","email":"msegreto@miceover.com"},{"name":"noahmanger","email":"noah.manger@gmail.com"},{"name":"rogeruiz","email":"hi@rog.gr"},{"name":"shawnbot","email":"shawnbot-npm@nym.hush.com"},{"name":"stvnrlly","email":"stvnrlly@stvnrlly.com"}],"contributors":[{"name":"Josh Carp","email":"joshua.carp@gsa.gov"},{"name":"Noah Manger"}],"homepage":"https://github.com/18F/accordion#readme","bugs":{"url":"https://github.com/18f/accordion/issues"},"dist":{"shasum":"e845f391b45e5a590fce4efa7b081d37b0cc7ca2","tarball":"https://registry.npmjs.org/aria-accordion/-/aria-accordion-0.1.1.tgz","integrity":"sha512-0s5VCYdvCeA79iuWTdIuX0Xcx/FX4/DuXsO7j4Yj/7m7a+sjGbL7QAZPlebUaKmrHjasy2k3qs3YqkAQXTXipg==","signatures":[{"sig":"MEUCIEmOCIqs/ZLji5aC7V0MqCK24cKyraZpsjkVkdNLqcOAAiEA3ucHDBQIlhAuFlLFeEyyz92rAKsY4y8AAMEr19kuc3k=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"src/accordion.js","_from":".","_shasum":"e845f391b45e5a590fce4efa7b081d37b0cc7ca2","gitHead":"c46560439530b54f06a760cf74e1f190e20add5d","scripts":{"test":"mochify tests/accordion.js","build":"browserify example/init.js > example/main.js"},"_npmUser":{"name":"noahmanger","email":"noah.manger@gmail.com"},"repository":{"url":"git://github.com/18F/accordion.git","type":"git"},"_npmVersion":"3.6.0","description":"A simple, accessible, ARIA accordion","directories":{},"_nodeVersion":"5.5.0","dependencies":{"underscore":"1.8.3"},"devDependencies":{"chai":"^3.2.0","mocha":"^2.2.5","mochify":"^2.13.0"},"_npmOperationalInternal":{"tmp":"tmp/aria-accordion-0.1.1.tgz_1467318011954_0.20592077216133475","host":"packages-16-east.internal.npmjs.com"}},"0.1.2":{"name":"aria-accordion","version":"0.1.2","author":{"name":"18F"},"_id":"aria-accordion@0.1.2","maintainers":[{"name":"18f-devops","email":"devops@gsa.gov"},{"name":"adam.biagianti","email":"adam.biagianti@gsa.gov"},{"name":"aidanfeldman","email":"aidan.feldman@gmail.com"},{"name":"jbarnicle","email":"michael.barnicle@gsa.gov"},{"name":"jeremiak","email":"jbkimelman@gmail.com"},{"name":"jmcarp","email":"jm.carp@gmail.com"},{"name":"jseppi","email":"james.seppi@gmail.com"},{"name":"juliaelman","email":"hello@juliaelman.com"},{"name":"mbenari","email":"hello@maya-benari.com"},{"name":"mgwalker","email":"npm@darkcooger.net"},{"name":"msecret","email":"msegreto@miceover.com"},{"name":"noahmanger","email":"noah.manger@gmail.com"},{"name":"rogeruiz","email":"hi@rog.gr"},{"name":"shawnbot","email":"shawnbot-npm@nym.hush.com"},{"name":"stvnrlly","email":"stvnrlly@stvnrlly.com"}],"contributors":[{"name":"Josh Carp","email":"joshua.carp@gsa.gov"},{"name":"Noah Manger"}],"homepage":"https://github.com/18F/accordion#readme","bugs":{"url":"https://github.com/18f/accordion/issues"},"dist":{"shasum":"f5175f000d004963dd8db49b757e180e1648de1e","tarball":"https://registry.npmjs.org/aria-accordion/-/aria-accordion-0.1.2.tgz","integrity":"sha512-MogW4hULFhzgPH9BDA9NmQ5Vjej37wYiLyW5giDL68HGia2zVaAiVTwHuMdq1A7CnmZUzZQC5KWLeyO6Lhj/tg==","signatures":[{"sig":"MEUCIQCyN0LNKHbMhMOOkZ1vVgNivgbrS+ulhyuwzlBS7unYWQIgbdzitAPIt/7si6RCdmB6fwYLeqekb4+Pw7JsMwUQkzI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"src/accordion.js","_from":".","_shasum":"f5175f000d004963dd8db49b757e180e1648de1e","gitHead":"7148e1258b955bfea1170a3216816d2198da06e6","scripts":{"test":"mochify tests/accordion.js","build":"browserify example/init.js > example/main.js"},"_npmUser":{"name":"noahmanger","email":"noah.manger@gmail.com"},"repository":{"url":"git://github.com/18F/accordion.git","type":"git"},"_npmVersion":"3.6.0","description":"A simple, accessible, ARIA accordion","directories":{},"_nodeVersion":"5.5.0","dependencies":{},"devDependencies":{"chai":"^3.2.0","mocha":"^2.2.5","mochify":"^2.13.0"},"_npmOperationalInternal":{"tmp":"tmp/aria-accordion-0.1.2.tgz_1481228884779_0.06852514739148319","host":"packages-12-west.internal.npmjs.com"}},"1.0.0":{"name":"aria-accordion","version":"1.0.0","author":{"name":"18F"},"_id":"aria-accordion@1.0.0","maintainers":[{"name":"18f-devops","email":"devops@gsa.gov"},{"name":"adam.biagianti","email":"adam.biagianti@gsa.gov"},{"name":"aidanfeldman","email":"aidan.feldman@gmail.com"},{"name":"jbarnicle","email":"michael.barnicle@gsa.gov"},{"name":"jeremiak","email":"jbkimelman@gmail.com"},{"name":"jmcarp","email":"jm.carp@gmail.com"},{"name":"jseppi","email":"james.seppi@gmail.com"},{"name":"juliaelman","email":"hello@juliaelman.com"},{"name":"mbenari","email":"hello@maya-benari.com"},{"name":"mgwalker","email":"npm@darkcooger.net"},{"name":"msecret","email":"msegreto@miceover.com"},{"name":"noahmanger","email":"noah.manger@gmail.com"},{"name":"rogeruiz","email":"hi@rog.gr"},{"name":"shawnbot","email":"shawnbot-npm@nym.hush.com"},{"name":"stvnrlly","email":"stvnrlly@stvnrlly.com"}],"contributors":[{"name":"Josh Carp","email":"joshua.carp@gsa.gov"},{"name":"Noah Manger"}],"homepage":"https://github.com/18F/accordion#readme","bugs":{"url":"https://github.com/18f/accordion/issues"},"dist":{"shasum":"2dcb25ba86c97ac20d258c3fcdc710863f9ea2a2","tarball":"https://registry.npmjs.org/aria-accordion/-/aria-accordion-1.0.0.tgz","integrity":"sha512-rYDEQGGlszSH40PmnF2LVqmZ6vLljKvhenaemJs5myxP0JBP84iI4RO+nAYSejLKFhqn+9UXc0QA1Rrlxxcg3w==","signatures":[{"sig":"MEQCIBVZWemTN8mdrvP5U5+hOZa7qZ8SepgbkicnGAQJBgjmAiACKDrFNUw3qbkBH/3a0jU+AJ9woukoMnBJOLGjqPgH/g==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"src/accordion.js","_from":".","_shasum":"2dcb25ba86c97ac20d258c3fcdc710863f9ea2a2","gitHead":"d19b0f4bcf38af47ee48816f89e69acc84741f65","scripts":{"test":"mochify test/accordion.js","build":"browserify example/init.js > example/main.js"},"_npmUser":{"name":"noahmanger","email":"noah.manger@gmail.com"},"repository":{"url":"git://github.com/18F/accordion.git","type":"git"},"_npmVersion":"3.6.0","description":"A simple, accessible, ARIA accordion","directories":{},"_nodeVersion":"5.5.0","dependencies":{},"devDependencies":{"chai":"^3.2.0","mocha":"^2.2.5","mochify":"^2.13.0"},"_npmOperationalInternal":{"tmp":"tmp/aria-accordion-1.0.0.tgz_1492815403324_0.5158031471073627","host":"packages-18-east.internal.npmjs.com"}},"1.1.0":{"name":"aria-accordion","version":"1.1.0","author":{"name":"18F"},"_id":"aria-accordion@1.1.0","maintainers":[{"name":"18f-devops","email":"devops@gsa.gov"},{"name":"adam.biagianti","email":"adam.biagianti@gsa.gov"},{"name":"aidanfeldman","email":"aidan.feldman@gmail.com"},{"name":"jbarnicle","email":"michael.barnicle@gsa.gov"},{"name":"jeremiak","email":"jbkimelman@gmail.com"},{"name":"jmcarp","email":"jm.carp@gmail.com"},{"name":"jseppi","email":"james.seppi@gmail.com"},{"name":"juliaelman","email":"hello@juliaelman.com"},{"name":"mbenari","email":"hello@maya-benari.com"},{"name":"mgwalker","email":"npm@darkcooger.net"},{"name":"msecret","email":"msegreto@miceover.com"},{"name":"noahmanger","email":"noah.manger@gmail.com"},{"name":"rogeruiz","email":"hi@rog.gr"},{"name":"shawnbot","email":"shawnbot-npm@nym.hush.com"},{"name":"stvnrlly","email":"stvnrlly@stvnrlly.com"}],"contributors":[{"name":"Josh Carp","email":"joshua.carp@gsa.gov"},{"name":"Noah Manger"}],"homepage":"https://github.com/18F/accordion#readme","bugs":{"url":"https://github.com/18f/accordion/issues"},"dist":{"shasum":"10260dd5adb70f0390dbc5062fbedafcfc7efd9a","tarball":"https://registry.npmjs.org/aria-accordion/-/aria-accordion-1.1.0.tgz","integrity":"sha512-7mCct3+KXKCp/0QrL1gT/RhE9lKok6Q9VphhKuNGZA9YHspp0X8gHd3pGoGd2aw2di1FEYrFX3uE2ypTLKczMw==","signatures":[{"sig":"MEQCICgpICeOD0R/h1GBGPDr5LZpgdgg5ZnDbycL7Av7WxK5AiBJUByIe2ahyYcCTk/p+cfsHWcV80mHku2ZoOTcV+C1NQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"src/accordion.js","_from":".","_shasum":"10260dd5adb70f0390dbc5062fbedafcfc7efd9a","gitHead":"fd16d51863bb4f5e98b83c39bb283d4c5057740e","scripts":{"test":"mochify test/accordion.js","build":"browserify example/init.js > example/main.js"},"_npmUser":{"name":"noahmanger","email":"noah.manger@gmail.com"},"repository":{"url":"git://github.com/18F/accordion.git","type":"git"},"_npmVersion":"3.6.0","description":"A simple, accessible, ARIA accordion","directories":{},"_nodeVersion":"5.5.0","dependencies":{},"devDependencies":{"chai":"^3.2.0","mocha":"^2.2.5","mochify":"^2.13.0"},"_npmOperationalInternal":{"tmp":"tmp/aria-accordion-1.1.0.tgz_1496249897850_0.23662200453691185","host":"s3://npm-registry-packages"}}},"time":{"created":"2016-03-10T23:35:26.372Z","modified":"2026-07-30T16:17:36.349Z","0.1.0":"2016-03-10T23:35:26.372Z","0.1.1":"2016-06-30T20:20:15.310Z","0.1.2":"2016-12-08T20:28:05.001Z","1.0.0":"2017-04-21T22:56:45.397Z","1.1.0":"2017-05-31T16:58:17.920Z"},"bugs":{"url":"https://github.com/18f/accordion/issues"},"author":{"name":"18F"},"homepage":"https://github.com/18F/accordion#readme","repository":{"url":"git://github.com/18F/accordion.git","type":"git"},"description":"A simple, accessible, ARIA accordion","contributors":[{"name":"Josh Carp","email":"joshua.carp@gsa.gov"},{"name":"Noah Manger"}],"maintainers":[{"email":"devops@gsa.gov","name":"18f-devops"},{"email":"rochelle.ribeiro@gsa.gov","name":"rori123"},{"email":"sheldon@navapbc.com","name":"sb-nava"},{"email":"gina.yamada@gsa.gov","name":"ginayam"},{"email":"micah.neveu@gsa.gov","name":"mneveunava"},{"email":"tts-tech-portfolio@gsa.gov","name":"tts-tech-portfolio"},{"email":"michael.r.king@gsa.gov","name":"mkgsa"},{"email":"charles.ferguson@gsa.gov","name":"cvfergus"},{"email":"matt.gardner@gsa.gov","name":"nava-matt"},{"email":"keithwilliams@navapbc.com","name":"keithnava"},{"email":"tai@taigrr.com","name":"taigrr"},{"email":"luigi.ray-montanez@gsa.gov","name":"luigiraymontanez"},{"email":"john.jediny@gsa.gov","name":"jjediny"},{"email":"lakeisha.russell@gsa.gov","name":"lrussell01"},{"email":"gerardo.cruz-ortiz@gsa.gov","name":"gerardo.cruz-ortiz"},{"email":"aj.farkas@gsa.gov","name":"ajfarkas_gsa"},{"email":"aidan.feldman@gmail.com","name":"aidanfeldman"},{"email":"noah.manger@gmail.com","name":"noahmanger"}],"readme":"# 18F Aria-Accordion\n\n[![Build Status](https://img.shields.io/travis/18F/accordion/master.svg)](https://travis-ci.org/18F/accordion)\n[![Test Coverage](https://img.shields.io/codecov/c/github/18F/accordion/master.svg)](https://codecov.io/github/18F/accordion)\n\n# About\nA simple, accessible JavaScript accordion.\n\n# Getting started\n## Download\n### Via npm\n```\nnpm install aria-accordion\n```\n\n## Set up your HTML\n\n```html\n\t<ul class=\"js-accordion\">\n\t    <li>\n\t      <button>\n\t        First Amendment\n\t      </button>\n\t      <div>\n\t        <p>\n\t        Congress shall make no law respecting an establishment of religion, or prohibiting the free exercise thereof; or abridging the freedom of speech, or of the press; or the right of the people peaceably to assemble, and to petition the Government for a redress of grievances.\n\t        </p>\n\t      </div>\n\t    </li>\n\t    <li>\n\t      <button>\n\t        Second Amendment\n\t      </button>\n\t      <div>\n\t        <p>\n\t        A well regulated Militia, being necessary to the security of a free State, the right of the people to keep and bear Arms, shall not be infringed.\n\t        </p>\n\t      </div>\n\t    </li>\n   </ul>\n```\n\nSimply create a series of `<button>` elements followed by `<div>`s and this will take care of the rest, adding the proper ARIA attributes. You can add custom IDs to the `<div>`s and the library will default to those. If you don't add IDs the library will generate them for you.\n\n\n## Initialize\nIn whichever file you initialize your JavaScript components, initialize the accordion like so:\n\n```js\n\tvar accordion = require('@18f/accordion');\n\n\t// Required element to turn into an accordion\n\tvar elm = document.querySelector('.js-accordion');\n\n\t// Optional configurion objects\n\tvar selectors = { ... };\n\tvar opts = { ... };\n\n\tnew accordion.Accordion(elm, selectors, opts);\n```\n\n\n# Configuration\nThe constructor requires an HTML element to turn into the accordion.\n\nThe constructor accepts an optional hash of selectors as its second parameter:\n\n- `trigger`: CSS selector for the elements to turn into the accordion triggers. The component will look for these items' next sibling to turn into the accordion content that is hidden and revealed. _Default_: `button`\n\nYou can also pass a hash of options. Currently, the only option is:\n\n- `collapseOthers`: Boolean for whether or not to collapse all other panels when one panel is open. _Default_: `false`\n- `customHiding`: Boolean for whether or not to use your own CSS to hide collapsed content areas. _Default_: `false`\n- `contentPrefix`: String prefix for the content div IDs in order to have multiple accordions on the same page. _Default_: `accordion`\n- `openFirst`: Boolean for whether or not to open the first item by default. _Default_: `false`\n- `reflectStatic`: Boolean for whether or not the accordion should reflect any attributes (`aria-hidden` and `aria-expanded`) that were rendered statically. _Default_: `false`\n\n# Styling\nYou're free to add classes and style your markup however you please. By default, the component sets any content element with `[aria-hidden=\"true\"]` to `display: none` inline, but you can override this to use your own custom hiding styles with the `customHiding` property. To style the buttons when they panel is open vs closed, target `[aria-expanded=\"true\"]`.\n\n\n# License\n## Public domain\n\nThis project is in the worldwide [public domain](LICENSE.md). As stated in [CONTRIBUTING](CONTRIBUTING.md):\n\n> This project is in the public domain within the United States, and copyright and related rights in the work worldwide are waived through the [CC0 1.0 Universal public domain dedication](https://creativecommons.org/publicdomain/zero/1.0/).\n>\n> All contributions to this project will be released under the CC0 dedication. By submitting a pull request, you are agreeing to comply with this waiver of copyright interest.\n","readmeFilename":"README.md"}