{"id":18056012,"url":"https://github.com/argyleink/roving-ux","last_synced_at":"2025-04-07T06:07:52.655Z","repository":{"id":42581576,"uuid":"363198542","full_name":"argyleink/roving-ux","owner":"argyleink","description":"stateful roving index for web ui","archived":false,"fork":false,"pushed_at":"2024-06-26T05:05:07.000Z","size":349,"stargazers_count":132,"open_issues_count":11,"forks_count":7,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-31T05:03:37.824Z","etag":null,"topics":["accessibility","keyboard-navigation","ui","ux"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/argyleink.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-04-30T16:28:52.000Z","updated_at":"2025-03-01T14:18:11.000Z","dependencies_parsed_at":"2024-10-31T01:13:22.890Z","dependency_job_id":"3cfe972b-82ee-48e2-8a3f-931c36415ae4","html_url":"https://github.com/argyleink/roving-ux","commit_stats":{"total_commits":19,"total_committers":7,"mean_commits":"2.7142857142857144","dds":"0.42105263157894735","last_synced_commit":"bbeb45407c1ead893b2611a42dbed2709ea4b160"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/argyleink%2Froving-ux","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/argyleink%2Froving-ux/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/argyleink%2Froving-ux/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/argyleink%2Froving-ux/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/argyleink","download_url":"https://codeload.github.com/argyleink/roving-ux/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247601448,"owners_count":20964864,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["accessibility","keyboard-navigation","ui","ux"],"created_at":"2024-10-31T01:13:19.887Z","updated_at":"2025-04-07T06:07:52.635Z","avatar_url":"https://github.com/argyleink.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# Roving UX\n\u003cp style=\"text-align='center'\"\u003e\n  \u003cimg src=\"https://img.shields.io/npm/dt/roving-ux.svg\" alt=\"Total Downloads\"\u003e\n  \u003cimg src=\"https://img.shields.io/npm/v/roving-ux.svg\" alt=\"Latest Release\"\u003e\n  \u003cimg src=\"https://img.shields.io/npm/l/roving-ux.svg\" alt=\"License\"\u003e\n\u003c/p\u003e\n\n\u003e Turns tedious tab UX into a controlled and stateful experience\n\n\u003cbr\u003e\n\n**Learn more** in [this article by Rob Dodson on web.dev](https://web.dev/control-focus-with-tabindex/)  \n**Try it** at this [GUI Challenge](https://gui-challenges.web.app/media-scroller/dist/) (use `tab` then `left || right` arrows)\n\n\n\u003cbr\u003e\n\n###### Features \u0026 Why\n1️⃣ User's shouldn't need to tab through each item in a list to see the next list  \n2️⃣ Providing keyboard list UX should be easy  \n3️⃣ Maintaining the last focused element should be easy  \n4️⃣ RTL Support  \n\n\u003cbr\u003e\n\n###### Getting Started\n### Installation\n```bash\nnpm i roving-ux\n```\nUse the SkyPack CDN https://cdn.skypack.dev/roving-ux  \nLooking for a React version, here ya go! https://www.npmjs.com/package/roving-ux-react\n\n\u003cbr\u003e\n\n### Importing\n```js\n// import from CDN\nimport { rovingIndex } from 'https://cdn.skypack.dev/roving-ux' // cdn es2020\n\n// import from NPM\nimport { rovingIndex } from 'roving-ux'      // npm es6/common modules\nconst rovingIndex = require('roving-ux')   // commonjs\n```\n\n\u003cbr\u003e\n\n###### Syntax\n\n### Quick API Overview\n```js\nrovingIndex({\n  element: node,     // required: the container to get roving index ux\n  target: \"#foo\",    // optional: a query selector for which children should be focusable\n})\n```\n\n### Example Usage\n```js\nimport { rovingIndex } from 'roving-ux'\n\n// just one roving ux container\n// roving-ux will use direct children as focus targets\nrovingIndex({\n  element: document.querySelector('#carousel')\n})\n```\n\n```js\nimport { rovingIndex } from 'roving-ux'\n\n// many roving ux containers\n// passes a custom query selector so the proper elements get focus\ndocument.querySelectorAll('.horizontal-media')\n  .forEach(scroller =\u003e {\n    rovingIndex({\n      element: scroller,\n      target: 'a',\n    })\n  })\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fargyleink%2Froving-ux","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fargyleink%2Froving-ux","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fargyleink%2Froving-ux/lists"}