{"id":13630613,"url":"https://github.com/github/accessibilityjs","last_synced_at":"2025-09-29T00:30:59.916Z","repository":{"id":57172403,"uuid":"95114338","full_name":"github/accessibilityjs","owner":"github","description":"Client side accessibility error scanner.","archived":true,"fork":false,"pushed_at":"2020-08-03T15:47:33.000Z","size":144,"stargazers_count":2173,"open_issues_count":5,"forks_count":72,"subscribers_count":38,"default_branch":"main","last_synced_at":"2025-01-15T03:55:17.112Z","etag":null,"topics":["accessibility"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/github.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-06-22T12:41:18.000Z","updated_at":"2025-01-11T19:13:12.000Z","dependencies_parsed_at":"2022-08-24T13:30:59.798Z","dependency_job_id":null,"html_url":"https://github.com/github/accessibilityjs","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Faccessibilityjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Faccessibilityjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Faccessibilityjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Faccessibilityjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/github","download_url":"https://codeload.github.com/github/accessibilityjs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234575215,"owners_count":18854924,"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"],"created_at":"2024-08-01T22:01:49.962Z","updated_at":"2025-09-29T00:30:54.600Z","avatar_url":"https://github.com/github.png","language":"JavaScript","readme":"# accessibilityjs ![build status](https://travis-ci.org/github/accessibilityjs.svg?branch=master)\n\nClient side accessibility error scanner.\n\n## Install\n\n```\nnpm install accessibilityjs --save\n```\n\n## Usage\n\n```javascript\nimport {scanForProblems} from 'accessibilityjs'\n\nfunction logError(error) {\n  error.element.classList.add('accessibility-error')\n  error.element.addEventListener('click', function () {\n    alert(`${error.name}\\n\\n${error.message}`)\n  }, {once: true})\n}\n\ndocument.addEventListener('DOMContentLoaded', function() {\n  scanForProblems(document, logError)\n})\n```\n\nList of errors:\n\n- `ImageWithoutAltAttributeError`\n- `ElementWithoutLabelError`\n- `LinkWithoutLabelOrRoleError`\n- `LabelMissingControlError`\n- `InputMissingLabelError`\n- `ButtonWithoutLabelError`\n- `ARIAAttributeMissingError`\n\n## Scenario\n\nIn GitHub we use this script to scan for inaccessible elements in development and production staff mode. We style the elements with red borders in the `logError` function passed in, and add a click handler explaining the reasons.\n\n![Red borders are added to offending elements example](https://user-images.githubusercontent.com/1153134/31491689-bb8d8068-af0d-11e7-862b-01b059e13ba1.png)\n\n![An alert pops up on clicking the elements](https://user-images.githubusercontent.com/1153134/31491972-c8547512-af0e-11e7-9d0d-db116eb7cf58.png)\n\n## Browser support\n\n- Chrome\n- Firefox\n- Safari 6+\n- Internet Explorer 9+\n- Microsoft Edge\n\nInternet Explorer and Edge require a polyfill for [`closest`](https://developer.mozilla.org/en-US/docs/Web/API/Element/closest#Polyfill).\n\n## Development\n\n```bash\n\u003e npm install\n\u003e npm test\n\u003e npm run example\n```\n","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithub%2Faccessibilityjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgithub%2Faccessibilityjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithub%2Faccessibilityjs/lists"}