{"id":21817885,"url":"https://github.com/thawkin3/a11y-listbox","last_synced_at":"2025-03-21T10:23:34.100Z","repository":{"id":96052646,"uuid":"399887352","full_name":"thawkin3/a11y-listbox","owner":"thawkin3","description":"Demo app showing how to build accessible listbox components in React","archived":false,"fork":false,"pushed_at":"2022-03-01T02:26:48.000Z","size":382,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-26T06:44:46.198Z","etag":null,"topics":["a11y","accessibility","demo","react","tutorial"],"latest_commit_sha":null,"homepage":"http://tylerhawkins.info/a11y-listbox/build/","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/thawkin3.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-08-25T16:31:06.000Z","updated_at":"2022-03-01T02:26:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"9a908999-5bc1-44d2-b82c-68b0540ca278","html_url":"https://github.com/thawkin3/a11y-listbox","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thawkin3%2Fa11y-listbox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thawkin3%2Fa11y-listbox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thawkin3%2Fa11y-listbox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thawkin3%2Fa11y-listbox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thawkin3","download_url":"https://codeload.github.com/thawkin3/a11y-listbox/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244776350,"owners_count":20508507,"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":["a11y","accessibility","demo","react","tutorial"],"created_at":"2024-11-27T15:48:55.122Z","updated_at":"2025-03-21T10:23:34.068Z","avatar_url":"https://github.com/thawkin3.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Accessible Listbox\n\nThis project is meant to teach software engineers how to create accessible listbox components in React.\n\nYou can view the demo app here: http://tylerhawkins.info/a11y-listbox/build/\n\nThis project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).\n\n## Available Scripts\n\nIn the project directory, you can run:\n\n- `build`: Builds the app\n- `eject`: Ejects the app from using react-scripts\n- `format`: Formats the code using Prettier\n- `format-watch`: Formats the code using Prettier in watch mode\n- `start`: Starts the app in development mode\n- `test`: Runs the tests\n- `test-watch`: Runs the tests in watch mode\n\n## Acceptance Criteria\n\n### Mouse Users\n- Clicking the trigger button should show/hide the listbox options\n- Items should be hoverable and selectable with the mouse\n- When an item is clicked, the listbox should be closed and focus should be returned to the trigger button\n- Clicking away from the open listbox should close the listbox and return the focus to the trigger button\n\n### Keyboard Users\n- Pressing the `Enter`/`Space` key on the trigger button should show/hide the listbox options\n- Pressing the `Down Arrow` or `Up Arrow` on the trigger button when the listbox is closed should open the listbox\n- Items should be focusable and selectable with the keyboard\n  - `Down Arrow`: moves focus down by one item\n  - `Up Arrow`: moves focus up by one item\n  - `Enter`: selects the currently focused item and closes the listbox and returns the focus to the trigger button\n  - `Escape`: closes the listbox without making a selection and returns the focus to the trigger button\n  - `Home`: moves focus to the first item\n  - `End`: moves focus to the last item\n- When focus is moved to an item out of view, listbox should be scrolled so that the item is visible\n\n### Screen Reader Users\n- Trigger button should have `aria-haspopup=\"listbox\"`, `aria-labelledby`, and `aria-expanded` attributes\n- `\u003cul\u003e` element should have `role=\"listbox\"`, `aria-labelledby`, and `aria-activedescendant` attributes\n- `\u003cli\u003e` elements should have `role=\"option\"` and `aria-selected` attributes\n\n## Resources\n\n- [WAI-ARIA Authoring Practices](https://www.w3.org/TR/wai-aria-practices-1.1/#Listbox)\n- [Expand/Collapse Listbox Example](https://www.w3.org/TR/wai-aria-practices-1.1/examples/listbox/listbox-collapsible.html)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthawkin3%2Fa11y-listbox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthawkin3%2Fa11y-listbox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthawkin3%2Fa11y-listbox/lists"}