{"_id":"focus-group","_rev":"4461613","name":"focus-group","description":"Create a group of nodes with special focusing powers","dist-tags":{"latest":"0.3.1"},"maintainers":[{"name":"davidtheclark","email":"david.dave.clark@gmail.com"},{"name":"shirshendu","email":""}],"time":{"modified":"2026-04-08T14:41:17.000Z","created":"2016-02-08T01:44:13.713Z","0.3.1":"2016-10-16T20:50:54.617Z","0.3.0":"2016-07-10T19:24:36.863Z","0.2.3":"2016-05-27T20:23:16.572Z","0.2.2":"2016-03-29T03:26:09.971Z","0.2.1":"2016-02-19T23:07:09.881Z","0.2.0":"2016-02-13T19:39:18.584Z","0.1.0":"2016-02-08T01:44:13.713Z"},"users":{},"author":{"name":"David Clark"},"repository":{"type":"git","url":"git+https://github.com/davidtheclark/focus-group.git"},"versions":{"0.3.1":{"name":"focus-group","version":"0.3.1","description":"Create a group of nodes with special focusing powers","main":"index.js","scripts":{"demo-bundle":"browserify demo/index.js -o demo/demo-bundle.js","demo-watch":"watchify demo/index.js -d -v -o demo/demo-bundle.js","demo-dev":"npm run demo-watch & http-server demo","test-dev":"karma start","test":"karma start --single-run --browsers PhantomJS --reporters progress,coverage,coveralls"},"repository":{"type":"git","url":"git+https://github.com/davidtheclark/focus-group.git"},"keywords":["focus","accessibility","a11y","arrows","keyboard","navigation","aria"],"author":{"name":"David Clark"},"license":"MIT","bugs":{"url":"https://github.com/davidtheclark/focus-group/issues"},"homepage":"https://github.com/davidtheclark/focus-group#readme","devDependencies":{"browserify":"13.0.0","browserify-istanbul":"0.2.1","d3-queue":"2.0.2","eslint":"^3.0.1","http-server":"0.8.5","karma":"0.13.19","karma-browserify":"5.0.1","karma-chrome-launcher":"0.2.2","karma-coverage":"0.5.3","karma-coveralls":"1.1.2","karma-mocha":"0.2.1","karma-phantomjs-launcher":"1.0.0","mocha":"2.4.5","phantomjs-prebuilt":"2.1.3","power-assert":"1.2.0","simulant":"0.2.0","watchify":"3.7.0"},"gitHead":"b9de0536aa9b065b110a3880650f83e925ceef13","_id":"focus-group@0.3.1","_shasum":"e0f32ed86b0dabdd6ffcebdf898ecb32e47fedce","_from":".","_npmVersion":"2.15.11","_nodeVersion":"4.6.0","_npmUser":{"name":"davidtheclark","email":"david.dave.clark@gmail.com"},"dist":{"shasum":"e0f32ed86b0dabdd6ffcebdf898ecb32e47fedce","size":11695,"noattachment":false,"key":"/focus-group/-/focus-group-0.3.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/focus-group/download/focus-group-0.3.1.tgz"},"maintainers":[{"name":"davidtheclark","email":"david.dave.clark@gmail.com"},{"name":"shirshendu","email":""}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/focus-group-0.3.1.tgz_1476651054379_0.20519786444492638"},"directories":{},"publish_time":1476651054617,"_hasShrinkwrap":false,"_cnpm_publish_time":1476651054617,"_cnpmcore_publish_time":"2021-12-16T14:11:23.601Z"},"0.3.0":{"name":"focus-group","version":"0.3.0","description":"Create a group of nodes with special focusing powers","main":"index.js","scripts":{"demo-bundle":"browserify demo/index.js -o demo/demo-bundle.js","demo-watch":"watchify demo/index.js -d -v -o demo/demo-bundle.js","demo-dev":"npm run demo-watch & http-server demo","test-dev":"karma start","test":"karma start --single-run --browsers PhantomJS --reporters progress,coverage,coveralls"},"repository":{"type":"git","url":"git+https://github.com/davidtheclark/focus-group.git"},"keywords":["focus","accessibility","a11y","arrows","keyboard","navigation","aria"],"author":{"name":"David Clark"},"license":"MIT","bugs":{"url":"https://github.com/davidtheclark/focus-group/issues"},"homepage":"https://github.com/davidtheclark/focus-group#readme","devDependencies":{"browserify":"13.0.0","browserify-istanbul":"0.2.1","d3-queue":"2.0.2","eslint":"^3.0.1","http-server":"0.8.5","karma":"0.13.19","karma-browserify":"5.0.1","karma-chrome-launcher":"0.2.2","karma-coverage":"0.5.3","karma-coveralls":"1.1.2","karma-mocha":"0.2.1","karma-phantomjs-launcher":"1.0.0","mocha":"2.4.5","phantomjs-prebuilt":"2.1.3","power-assert":"1.2.0","simulant":"0.2.0","watchify":"3.7.0"},"gitHead":"66b01f4382a509bb09c2235671cdd45c9ced2556","_id":"focus-group@0.3.0","_shasum":"7c6e2e7f71bb59371e6b1914de10de8d444c3064","_from":".","_npmVersion":"2.15.9","_nodeVersion":"4.4.7","_npmUser":{"name":"davidtheclark","email":"david.dave.clark@gmail.com"},"dist":{"shasum":"7c6e2e7f71bb59371e6b1914de10de8d444c3064","size":11662,"noattachment":false,"key":"/focus-group/-/focus-group-0.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/focus-group/download/focus-group-0.3.0.tgz"},"maintainers":[{"name":"davidtheclark","email":"david.dave.clark@gmail.com"},{"name":"shirshendu","email":""}],"_npmOperationalInternal":{"host":"packages-16-east.internal.npmjs.com","tmp":"tmp/focus-group-0.3.0.tgz_1468178674176_0.09881620877422392"},"directories":{},"publish_time":1468178676863,"_hasShrinkwrap":false,"_cnpm_publish_time":1468178676863,"_cnpmcore_publish_time":"2021-12-16T14:11:23.844Z"},"0.2.3":{"name":"focus-group","version":"0.2.3","description":"Create a group of nodes with special focusing powers","main":"index.js","scripts":{"demo-bundle":"browserify demo/index.js -o demo/demo-bundle.js","demo-watch":"watchify demo/index.js -d -v -o demo/demo-bundle.js","demo-dev":"npm run demo-watch & http-server demo","test-dev":"karma start","test":"karma start --single-run --browsers PhantomJS --reporters progress,coverage,coveralls"},"repository":{"type":"git","url":"git+https://github.com/davidtheclark/focus-group.git"},"keywords":["focus","accessibility","a11y","arrows","keyboard","navigation","aria"],"author":{"name":"David Clark"},"license":"MIT","bugs":{"url":"https://github.com/davidtheclark/focus-group/issues"},"homepage":"https://github.com/davidtheclark/focus-group#readme","devDependencies":{"browserify":"13.0.0","browserify-istanbul":"0.2.1","d3-queue":"2.0.2","http-server":"0.8.5","karma":"0.13.19","karma-browserify":"5.0.1","karma-chrome-launcher":"0.2.2","karma-coverage":"0.5.3","karma-coveralls":"1.1.2","karma-mocha":"0.2.1","karma-phantomjs-launcher":"1.0.0","mocha":"2.4.5","phantomjs-prebuilt":"2.1.3","power-assert":"1.2.0","simulant":"0.2.0","watchify":"3.7.0"},"gitHead":"bd4eaa001a2e210ff242565b5a1b3d9ffa7d705b","_id":"focus-group@0.2.3","_shasum":"956a1124a1495f7d0f4f2dd4c612502abf4a45f9","_from":".","_npmVersion":"3.9.0","_nodeVersion":"0.12.13","_npmUser":{"name":"davidtheclark","email":"david.dave.clark@gmail.com"},"dist":{"shasum":"956a1124a1495f7d0f4f2dd4c612502abf4a45f9","size":10601,"noattachment":false,"key":"/focus-group/-/focus-group-0.2.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/focus-group/download/focus-group-0.2.3.tgz"},"maintainers":[{"name":"davidtheclark","email":"david.dave.clark@gmail.com"},{"name":"shirshendu","email":""}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/focus-group-0.2.3.tgz_1464380596099_0.37813811004161835"},"directories":{},"publish_time":1464380596572,"_hasShrinkwrap":false,"_cnpm_publish_time":1464380596572,"_cnpmcore_publish_time":"2021-12-16T14:11:24.082Z"},"0.2.2":{"name":"focus-group","version":"0.2.2","description":"Create a group of nodes with special focusing powers","main":"index.js","scripts":{"demo-bundle":"browserify demo/index.js -o demo/demo-bundle.js","demo-watch":"watchify demo/index.js -d -v -o demo/demo-bundle.js","demo-dev":"npm run demo-watch & http-server demo","test-dev":"karma start","test":"karma start --single-run --browsers PhantomJS --reporters progress,coverage,coveralls"},"repository":{"type":"git","url":"git+https://github.com/davidtheclark/focus-group.git"},"keywords":["focus","accessibility","a11y","arrows","keyboard","navigation","aria"],"author":{"name":"David Clark"},"license":"MIT","bugs":{"url":"https://github.com/davidtheclark/focus-group/issues"},"homepage":"https://github.com/davidtheclark/focus-group#readme","devDependencies":{"browserify":"13.0.0","browserify-istanbul":"0.2.1","d3-queue":"2.0.2","http-server":"0.8.5","karma":"0.13.19","karma-browserify":"5.0.1","karma-chrome-launcher":"0.2.2","karma-coverage":"0.5.3","karma-coveralls":"1.1.2","karma-mocha":"0.2.1","karma-phantomjs-launcher":"1.0.0","mocha":"2.4.5","phantomjs-prebuilt":"2.1.3","power-assert":"1.2.0","simulant":"0.2.0","watchify":"3.7.0"},"gitHead":"58d29332d2d40ed974b6ac8f70e1f7d2bf454996","_id":"focus-group@0.2.2","_shasum":"136f3abb27713cd2fabbd1b3e5b1c5dba51a8845","_from":".","_npmVersion":"3.8.3","_nodeVersion":"5.9.1","_npmUser":{"name":"davidtheclark","email":"david.dave.clark@gmail.com"},"dist":{"shasum":"136f3abb27713cd2fabbd1b3e5b1c5dba51a8845","size":10553,"noattachment":false,"key":"/focus-group/-/focus-group-0.2.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/focus-group/download/focus-group-0.2.2.tgz"},"maintainers":[{"name":"davidtheclark","email":"david.dave.clark@gmail.com"},{"name":"shirshendu","email":""}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/focus-group-0.2.2.tgz_1459221969571_0.10655351262539625"},"directories":{},"publish_time":1459221969971,"_hasShrinkwrap":false,"_cnpm_publish_time":1459221969971,"_cnpmcore_publish_time":"2021-12-16T14:11:24.288Z"},"0.2.1":{"name":"focus-group","version":"0.2.1","description":"Create a group of nodes with special focusing powers","main":"index.js","scripts":{"demo-bundle":"browserify demo/index.js -o demo/demo-bundle.js","demo-watch":"watchify demo/index.js -d -v -o demo/demo-bundle.js","demo-dev":"npm run demo-watch & http-server demo","test-dev":"karma start","test":"karma start --single-run --browsers PhantomJS --reporters progress,coverage,coveralls"},"repository":{"type":"git","url":"git+https://github.com/davidtheclark/focus-group.git"},"keywords":["focus","accessibility","a11y","arrows","keyboard","navigation","aria"],"author":{"name":"David Clark"},"license":"MIT","bugs":{"url":"https://github.com/davidtheclark/focus-group/issues"},"homepage":"https://github.com/davidtheclark/focus-group#readme","devDependencies":{"browserify":"13.0.0","browserify-istanbul":"0.2.1","d3-queue":"2.0.2","http-server":"0.8.5","karma":"0.13.19","karma-browserify":"5.0.1","karma-chrome-launcher":"0.2.2","karma-coverage":"0.5.3","karma-coveralls":"1.1.2","karma-mocha":"0.2.1","karma-phantomjs-launcher":"1.0.0","mocha":"2.4.5","phantomjs-prebuilt":"2.1.3","power-assert":"1.2.0","simulant":"0.2.0","watchify":"3.7.0"},"gitHead":"3616cfd57899964622b8aa7ed51f0aed08c799e0","_id":"focus-group@0.2.1","_shasum":"39d56d47c2254e20f9d04bca57dab5c0633c3be3","_from":".","_npmVersion":"3.7.2","_nodeVersion":"4.2.5","_npmUser":{"name":"davidtheclark","email":"david.dave.clark@gmail.com"},"dist":{"shasum":"39d56d47c2254e20f9d04bca57dab5c0633c3be3","size":10458,"noattachment":false,"key":"/focus-group/-/focus-group-0.2.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/focus-group/download/focus-group-0.2.1.tgz"},"maintainers":[{"name":"davidtheclark","email":"david.dave.clark@gmail.com"},{"name":"shirshendu","email":""}],"_npmOperationalInternal":{"host":"packages-6-west.internal.npmjs.com","tmp":"tmp/focus-group-0.2.1.tgz_1455923226945_0.0959140402264893"},"directories":{},"publish_time":1455923229881,"_hasShrinkwrap":false,"_cnpm_publish_time":1455923229881,"_cnpmcore_publish_time":"2021-12-16T14:11:24.489Z"},"0.2.0":{"name":"focus-group","version":"0.2.0","description":"Create a group of nodes with special focusing powers","main":"index.js","scripts":{"demo-bundle":"browserify demo/index.js -o demo/demo-bundle.js","demo-watch":"watchify demo/index.js -d -v -o demo/demo-bundle.js","demo-dev":"npm run demo-watch & http-server demo","test-dev":"karma start","test":"karma start --single-run --browsers PhantomJS --reporters progress,coverage,coveralls"},"repository":{"type":"git","url":"git+https://github.com/davidtheclark/focus-group.git"},"keywords":["focus","accessibility","a11y","arrows","keyboard","navigation","aria"],"author":{"name":"David Clark"},"license":"MIT","bugs":{"url":"https://github.com/davidtheclark/focus-group/issues"},"homepage":"https://github.com/davidtheclark/focus-group#readme","devDependencies":{"browserify":"13.0.0","browserify-istanbul":"0.2.1","d3-queue":"2.0.2","http-server":"0.8.5","karma":"0.13.19","karma-browserify":"5.0.1","karma-chrome-launcher":"0.2.2","karma-coverage":"0.5.3","karma-coveralls":"1.1.2","karma-mocha":"0.2.1","karma-phantomjs-launcher":"1.0.0","mocha":"2.4.5","phantomjs-prebuilt":"2.1.3","power-assert":"1.2.0","simulant":"0.2.0","watchify":"3.7.0"},"gitHead":"35fef7283af4af94bc6daaaa384f3b72e52ac8e8","_id":"focus-group@0.2.0","_shasum":"d5d7eb04f682d2afdbef7bf097b94d266091d778","_from":".","_npmVersion":"3.7.2","_nodeVersion":"5.5.0","_npmUser":{"name":"davidtheclark","email":"david.dave.clark@gmail.com"},"dist":{"shasum":"d5d7eb04f682d2afdbef7bf097b94d266091d778","size":10490,"noattachment":false,"key":"/focus-group/-/focus-group-0.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/focus-group/download/focus-group-0.2.0.tgz"},"maintainers":[{"name":"davidtheclark","email":"david.dave.clark@gmail.com"},{"name":"shirshendu","email":""}],"_npmOperationalInternal":{"host":"packages-9-west.internal.npmjs.com","tmp":"tmp/focus-group-0.2.0.tgz_1455392356770_0.6451322052162141"},"directories":{},"publish_time":1455392358584,"_hasShrinkwrap":false,"_cnpm_publish_time":1455392358584,"_cnpmcore_publish_time":"2021-12-16T14:11:25.082Z"},"0.1.0":{"name":"focus-group","version":"0.1.0","description":"Create a group of nodes with special focusing powers","main":"index.js","scripts":{"test-dev":"karma start","test":"karma start --single-run --browsers PhantomJS --reporters progress,coverage,coveralls"},"repository":{"type":"git","url":"git+https://github.com/davidtheclark/focus-group.git"},"keywords":["focus","accessibility","a11y","arrows","keyboard","navigation","aria"],"author":{"name":"David Clark"},"license":"MIT","bugs":{"url":"https://github.com/davidtheclark/focus-group/issues"},"homepage":"https://github.com/davidtheclark/focus-group#readme","devDependencies":{"browserify":"13.0.0","browserify-istanbul":"0.2.1","karma":"0.13.19","karma-browserify":"5.0.1","karma-chrome-launcher":"0.2.2","karma-coverage":"0.5.3","karma-coveralls":"1.1.2","karma-mocha":"0.2.1","karma-phantomjs-launcher":"1.0.0","mocha":"2.4.5","phantomjs-prebuilt":"2.1.3","power-assert":"1.2.0","simulant":"0.2.0","watchify":"3.7.0"},"gitHead":"5e6e4856ae4497d2b4391001dd3f73a35a121352","_id":"focus-group@0.1.0","_shasum":"a2081b0903558e4fc6062c777c9797bd30db85d9","_from":".","_npmVersion":"3.5.3","_nodeVersion":"5.5.0","_npmUser":{"name":"davidtheclark","email":"david.dave.clark@gmail.com"},"dist":{"shasum":"a2081b0903558e4fc6062c777c9797bd30db85d9","size":6333,"noattachment":false,"key":"/focus-group/-/focus-group-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/focus-group/download/focus-group-0.1.0.tgz"},"maintainers":[{"name":"davidtheclark","email":"david.dave.clark@gmail.com"},{"name":"shirshendu","email":""}],"_npmOperationalInternal":{"host":"packages-9-west.internal.npmjs.com","tmp":"tmp/focus-group-0.1.0.tgz_1454895852753_0.1192471154499799"},"directories":{},"publish_time":1454895853713,"_hasShrinkwrap":false,"_cnpm_publish_time":1454895853713,"_cnpmcore_publish_time":"2021-12-16T14:11:25.347Z"}},"readme":"# focus-group\n\n[![Build Status](https://travis-ci.org/davidtheclark/focus-group.svg?branch=master)](https://travis-ci.org/davidtheclark/focus-group)\n[![Coverage Status](https://coveralls.io/repos/github/davidtheclark/focus-group/badge.svg?branch=master)](https://coveralls.io/github/davidtheclark/focus-group?branch=master)\n\nCreate a group of nodes with special focus-related powers.\n\nSpecifically, you can do the following with your focus group:\n\n- Use different keybindings to move focus through the nodes\n- Type (with letters) to jump focus to a specific node based on its text\n\nEssentially, it mimics some of the essential keyboard interactions of a native `<select>`.\n\nThese kinds of powers are useful for:\n\n- Accessible menus, like [react-aria-menubutton](//github.com/davidtheclark/react-aria-menubutton)\n- Any other widgets whose keyboard UX will improve by enabling arrow-key navigation and letter-key jumping\n\n## Concepts\n\nA focus-group is composed of members.\n\nThe order of the members matters, because focus moves forwards and backwards through the group, in order.\n\nEach member consists of a DOM node and some text associated with that node.\nThe member's text will be used for letter-key jumping (a.k.a. string searching).\nEach member's text can be established in a few ways:\n\n- It can be manually specified when adding the member to the group, via `setMembers()` or `addMember()` (see below).\n- If the member's node has a `data-focus-group-text` attribute, that value will serve as the member's text.\n- If neither of the above is provided, the member's text will be the `textContent` of its node.\n\n## Keyboard Interactions\n\nWhen focus is inside the focus-group, the following things should happen:\n\n- If you press one of your `next` `keybindings` (the down arrow by default), focus moves\n  from the currently focused member to the next member in the group (or wraps back\n  to the front, according to the `wrap` option).\n- If you press one of your `prev` `keybindings` (the up arrow by default), focus moves\n  from the currently focused member to the previous member in the group (or wraps around\n  to the back, according to the `wrap` option).\n- If you press a letter key, string searching begins (see below!).\n\n### String searching\n\nIf the option `stringSearch` is `true` and focus is within the group, the following things happen:\n\n- When you start typing, focus moves to the first member whose registered text begins with\n  whatever you've been typing.\n- As long as each keystroke occurs within `stringSearchDelay`,\n  the search string will extend (e.g. `f` -> `fa` -> `far` -> `farm`) and focus will move\n  accordingly.\n- If no text matches the search string, focus will not move.\n- After you have not typed any letters for `stringSearchDelay`, the search\n  string resets and you can start over (e.g. you type `fa` then wait and type `go` to match `gorge`).\n\nThis all mimics the native `<select>` behavior.\n\nNote that like the native `<select>`, typing only matches the *beginning of words*. So you can't focus `David Clark` by typing `Clark`.\n\n## API\n\n### var focusGroup = createFocusGroup([options])\n\nThis is the function you get when you `require()` or `import` the module.\n\n```js\nvar createFocusGroup = require('focus-group');\nvar myMegaMenuFocusGroup = createFocusGroup();\n```\n\n#### Options\n\n**members** { Array }: Designate initial members of the group. Can be any of the following:\n\n- An array of DOM nodes (or a NodeList, like what's returned by `querySelectorAll()`)\n- An array of member objects, each object with the following properties: `node` (the DOM node),\n  and (optionally) `text` (the text that should be associated with that node for letter-navigation)\n\nYou can omit this option and add members later with `addMember()` or `setMembers()`. Default: `[]`.\n\n**keybindings** { Object of `'next'`, `'prev'`, `'first'`, or `'last'` }:\nSpecify which key events should move the focus *forward*, *back*, to the *first* member, or to the *last* member through the group. Provide objects (or arrays of objects) that describe the requirements of a [KeyboardEvent](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent) that should trigger that keybinding. Undesignated modifier keys are false by default. So when using something like `{ keyCode: 38 }`, that keybinding will be ignored if key 38 is combined with meta, ctrl, or alt.\n\nDefault:\n``` js\n{\n  next: { keyCode: 40 }, // ArrowDown\n  prev: { keyCode: 38 }, // ArrowUp\n}\n```\n\nUse arrays of objects for multiple key bindings:\n``` js\n{\n  next: [{ key: 'ArrowDown' }, { key: 'ArrowRight' }],\n  prev: [{ key: 'ArrowUp' }, { key: 'ArrowLeft' }],\n}\n```\n\nEven add modifiers or any valid event properties:\n``` js\n{\n  first: { keyCode: 74, metaKey: true },\n  last: { keyCode: 75, metaKey: true },\n}\n```\n\n**wrap** { Boolean }:\nIf `true`, when the arrow keys are moving focus they will wrap around the group. That is, when focus is on the last item and you move focus forward, the first item will focus; and when focus is on the first item and you move focus back, the last item will focus.\n\n**stringSearch** { Boolean }:\nIf `true`, string searching is enabled (see below).\nDefault: `false`.\n\n**stringSearchDelay** { Number }:\nThe number of milliseconds that should elapse between the user's last letter entry (with the keyboard)\nand a refresh of the string search (see below).\nDefault: `800`.\n\n### focusGroup.activate()\n\nStart this group listening to keyboard events and responding accordingly.\n\nReturns the focus group instance.\n\n### focusGroup.deactivate()\n\nStop this group listening to keyboard events.\n\nReturns the focus group instance.\n\n### focusGroup.addMember(member[, index])\n\nAdd a member to the group.\n\n`member` can be any of the following:\n\n- A DOM node\n- An object with the following properties:\n  - `node` (the node itself)\n  - (optionally) `text`: Text that should be associated with that node for letter-navigation. If none is provided, focus-group will check for a `data-focus-group-text` attribute or fallback to the node's `textContent.`\n\nIf `index` is provided, the member will be added at that index.\nOtherwise, it will be added to the end of the group.\n\nReturns the focus group instance.\n\n### focusGroup.removeMember(member)\n\nRemove a member from the group.\n\n`member` can be any of the following:\n\n- A DOM node\n- An index for the member that should be removed.\n\nReturns the focus group instance.\n\n### focusGroup.clearMembers()\n\nEmpty the focus group of members.\n\nReturns the focus group instance.\n\n### focusGroup.setMembers(members)\n\nSet the focus group's members (clearing any that already exist).\n\n`members` can be any of the following:\n\n- An array of DOM nodes (or a NodeList, like what's returned by `querySelectorAll()`)\n- An array of member objects, each object with the following properties:\n  - `node` (the node itself)\n  - (optionally) `text`: Text that should be associated with that node for letter-navigation. If none is provided, focus-group will check for a `data-focus-group-text` attribute or fallback to the node's `textContent.\n\nReturns the focus group instance.\n\n### focusGroup.getMembers()\n\nReturns the focus group's current array of members.\n\nEach item in the array is an object with `node` and `text` properties.\n\n### focusGroup.focusNodeAtIndex(index)\n\nFocuses the node at a particular index in the focus group's member array.\n\nIf no member exists at that index, does nothing.\n\nReturns the focus group instance.\n\n### focusGroup.moveFocusForward()\n\nMoves the focus forward one member, if focus is already within the group.\n\nIf focus is not within the group, does nothing.\n\nReturns the index of the newly focused member.\n\n### focusGroup.moveFocusBack()\n\nMoves the focus back one member, if focus is already within the group.\n\nIf focus is not within the group, does nothing.\n\nReturns the index of the newly focused member.\n\n## Contributing\n\nPlease note that this project is released with a Contributor Code of Conduct.\nBy participating in this project you agree to abide by its terms.\n","_attachments":{},"homepage":"https://github.com/davidtheclark/focus-group#readme","bugs":{"url":"https://github.com/davidtheclark/focus-group/issues"},"license":"MIT"}