{"id":45988033,"url":"https://github.com/abbott567/wcagify","last_synced_at":"2026-07-22T18:00:42.394Z","repository":{"id":136172681,"uuid":"396979071","full_name":"abbott567/wcagify","owner":"abbott567","description":"Gets information for WCAG 2.2 criteria based on a reference number.","archived":false,"fork":false,"pushed_at":"2025-10-10T06:30:26.000Z","size":70,"stargazers_count":23,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-28T20:12:27.839Z","etag":null,"topics":["a11y","a11y-testing","accessibility","accessibility-reporter","accessibility-testing","wcag","wcag2","wcag21","wcag22","wcag2a","wcag2aa","wcag2aaa"],"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/abbott567.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-08-16T21:28:34.000Z","updated_at":"2025-10-10T06:30:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"546bad0c-2197-4233-8785-eea87eac7225","html_url":"https://github.com/abbott567/wcagify","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/abbott567/wcagify","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abbott567%2Fwcagify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abbott567%2Fwcagify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abbott567%2Fwcagify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abbott567%2Fwcagify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abbott567","download_url":"https://codeload.github.com/abbott567/wcagify/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abbott567%2Fwcagify/sbom","scorecard":{"id":159985,"data":{"date":"2025-08-11","repo":{"name":"github.com/abbott567/wcagify","commit":"69846d79899e43a016ad5ab5e4a22077fabadb95"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/20 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-16T13:06:22.141Z","repository_id":136172681,"created_at":"2025-08-16T13:06:22.141Z","updated_at":"2025-08-16T13:06:22.141Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35771493,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-07-20T02:08:10.276Z","status":"online","status_checked_at":"2026-07-22T02:00:06.236Z","response_time":124,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","a11y-testing","accessibility","accessibility-reporter","accessibility-testing","wcag","wcag2","wcag21","wcag22","wcag2a","wcag2aa","wcag2aaa"],"created_at":"2026-02-28T19:17:59.413Z","updated_at":"2026-07-22T18:00:42.386Z","avatar_url":"https://github.com/abbott567.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WCAGify\n\nWCAGify is a simple function for people who need to reference the Web Content Accessibility Guidelines frequently and are tired of copying and pasting.\n\nWCAGify looks up WCAG 2.2 criteria based on a reference number supplied as a string and returns an object with the URL and name etc. It means you don't have to get the criterion name 100% correct as long as you know the reference number. It also adds consistency to your reports by returning the name exactly as it's formatted in the WCAG 2.2 standard.\n\n## Usage\n\nInstall WCAGify:\n\n```\nnpm install wcagify\n```\n\nRequire WCAGify:\n```javascript\nconst wcagify = require('wcagify')\n```\n\nIn the following examples, all the function calls would return the same object.\n\n```javascript\n// Look up by reference number\nwcagify('1.1.1 Non-text Content')\nwcagify('1.1.1 nontext content')\nwcagify('1.1.1')\nwcagify('1.1.1 Potato')\n\n// Or look up by name alone - case, punctuation and small typos are forgiven\nwcagify('Non-text Content')\nwcagify('non text content')\nwcagify('non-text contnet')\n\n// Return object\n{\n  criterion: '1.1.1 Non-text Content',\n  ref: '1.1.1',\n  name: 'Non-text Content',\n  link: 'https://www.w3.org/WAI/WCAG22/Understanding/non-text-content.html',\n  level: 'A',\n  impacts: ['Auditory', 'Visual', 'Cognitive']\n}\n```\n\nIf a string contains both a reference number and a name, the reference number wins. A name-only lookup that could match more than one criterion equally well (for example `'contrast'`) throws an error rather than guessing.\n\nIf you would rather branch on the result than catch errors - handy inside templates - use `wcagify.safe`, which returns `null` on a miss instead of throwing:\n\n```javascript\nconst reference = wcagify.safe(userInput)\nif (reference) { /* use reference.link */ }\n```\n\n### WCAG 2.1\n\nIf you audit against WCAG 2.1, pass a version option and links, names and levels follow the 2.1 standard - for example `2.5.5` becomes \"Target Size\" again, and `4.1.1 Parsing` is level A rather than removed:\n\n```javascript\nwcagify('1.4.3', { version: '2.1' })\n// link: 'https://www.w3.org/WAI/WCAG21/Understanding/contrast-minimum.html'\n\nwcagify('2.4.11', { version: '2.1' })\n// throws: criteria added in 2.2 are not part of WCAG 2.1\n```\n\nThe `byLevel` and `byImpact` filters accept the same option.\n\nName lookups follow the version too: `wcagify('target size', { version: '2.1' })` resolves to 2.5.5 because that was its name in 2.1, but the same lookup without the option throws - against WCAG 2.2 it would be a guess between \"Target Size (Minimum)\" and \"Target Size (Enhanced)\".\n\n### Listing criteria\n\nThe full criteria list and two filters are available for building checklists:\n\n```javascript\nwcagify.criteria // all 87 criteria as the same objects wcagify() returns\nwcagify.byLevel('AA') // only level AA criteria ('aa' works too)\nwcagify.byImpact('Cognitive') // only criteria impacting cognitive accessibility\n```\n\n`wcagify.criteria` is frozen so nothing can corrupt the shared list - spread it (`[...wcagify.criteria]`) if you need to sort. The filters return fresh arrays you can do what you like with.\n\n### Command line\n\nThe same lookups work from a terminal:\n\n```\nnpx wcagify 1.4.3\nnpx wcagify focus order\nnpx wcagify 1.4.3 --markdown   # [1.4.3 Contrast (Minimum)](https://...)\nnpx wcagify 1.4.3 --json\nnpx wcagify --level AA         # list every AA criterion\nnpx wcagify --level AA --impact Cognitive --markdown\n```\n\nRun `npx wcagify --help` for all options.\n\n### Nunjucks filter\nYou can use WCAGify in your Nunjucks templates using a filter. The filter needs a `string` value to work. For example:\n\n```javascript\n{% set issue = '1.1.1'|wcagify %}\n\n{{issue.criterion}} // 1.1.1 Non-text Content\n{{issue.name}} // Non-text Content\n{{issue.ref}} // 1.1.1\n{{issue.url}} // https://www.w3.org/WAI/WCAG22/Understanding/non-text-content.html\n```\n\n#### Installing the Nunjucks filter\n\nYou need to expose the WCAGify function to Nunjucks as a simple filter. This wont make the macro work, this functionality just means we have the ability to call WCAGify from inside Nunjucks templates and return the object which you can use for your own Nunjucks templates. For example `{{'1.1.1'|wcagify}}`. If you need to return formatted HTML, use the supplied Macro or write your own.\n\nAn example `server.js` might look something like the following:\n\n```javascript\nconst nunjucks = require('nunjucks')\nconst express = require('express')\n\nconst app = express()\n\nconst env = nunjucks.configure('src', { express: app, })\n\n// Add the Nunjucks filter\nconst wcagify = require('wcagify')\nenv.addFilter('wcagify', wcagify)\n```\n\n### Nunjucks macro\n\nThere is an included macro if you don't want to template your own Nunjucks. It needs a `string` value to work. For example:\n\n```javascript\n// Nunjucks code\n{{ wcagify('1.1.1') }}\n```\n\n```html\n\u003c!-- Output when compiled --\u003e\n\u003ca href=\"https://www.w3.org/WAI/WCAG22/Understanding/non-text-content.html\"\u003e\n  1.1.1 Non-text Content\n\u003c/a\u003e\n```\n\nYou can also pass in an object to set an ID and classes as optional parameters. For example:\n\n```javascript\n// Nunjucks code\n{{ wcagify('1.1.1', {\n  id: 'wcag-ref-1',\n  class: 'link link--small'\n}) }}\n```\n\n```html\n\u003c!-- Output when compiled --\u003e\n\u003ca id=\"wcag-ref-1\" class=\"link link--small\" href=\"https://www.w3.org/WAI/WCAG22/Understanding/non-text-content.html\"\u003e\n  1.1.1 Non-text Content\n\u003c/a\u003e\n```\n\n#### Installing the Nunjucks macro\n\nFirst, expose the location of the macro to your Nunjucks environment, and then make sure you've passed in the filter. The macro wont work without the filter as it calls it from inside the template. An example `server.js` file might look something like the following:\n\n```javascript\nconst path = require('path')\nconst nunjucks = require('nunjucks')\nconst express = require('express')\n\nconst app = express()\n\nconst paths = [\n  ...\n  // Add a link to the Nunjucks folder in the WCAGify module\n  path.join(__dirname, 'node_modules', 'wcagify', 'nunjucks')\n]\n\nconst env = nunjucks.configure(paths, { express: app, })\n\n// Add the Nunjucks filter\nconst wcagify = require('wcagify')\nenv.addFilter('wcagify', wcagify)\n\n```\n\nImport the macro into your Nunjucks template and use it. For example:\n\n```javascript\n// Imports from the .njk file from the node_modules path\n{%- from 'wcagify.njk' import wcagify -%}\n\n{{ wcagify('1.1.1', {\n  id: 'wcag-ref-1',\n  class: 'link link--small'\n}) }}\n```\n\n### Markdown macro\n\nYou can use WCAGify in your Markdown templates using [MarkedJS](https://www.npmjs.com/package/marked) as the renderer.\n\n```markdown\n\u003c!-- Markdown code --\u003e\n[1.1.1]({wcagify})\n```\n\n```html\n\u003c!-- Output when compiled --\u003e\n\u003ca href=\"https://www.w3.org/WAI/WCAG22/Understanding/non-text-content.html\"\u003e\n  1.1.1 Non-text Content\n\u003c/a\u003e\n```\n\n#### Installing the Markdown macro\n\nThe macro is a standard marked extension and needs marked v13 or later:\n\n```javascript\nconst { marked } = require('marked')\nconst wcagifyMarked = require('wcagify/markedjs')\n\nmarked.use(wcagifyMarked())\n\nmarked.parse('[1.1.1]({wcagify})')\n```\n\nPass a version option to link to WCAG 2.1 instead:\n\n```javascript\nmarked.use(wcagifyMarked({ version: '2.1' }))\n```\n\n## Tests\n\n```\nnpm test\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabbott567%2Fwcagify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabbott567%2Fwcagify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabbott567%2Fwcagify/lists"}