{"id":20036211,"url":"https://github.com/phenomnomnominal/screen-reader-reader","last_synced_at":"2025-07-12T01:36:07.146Z","repository":{"id":35532753,"uuid":"218163448","full_name":"phenomnomnominal/screen-reader-reader","owner":"phenomnomnominal","description":"A general purpose screen reader reader","archived":false,"fork":false,"pushed_at":"2023-01-04T23:39:14.000Z","size":794,"stargazers_count":57,"open_issues_count":17,"forks_count":3,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-26T16:46:09.539Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/phenomnomnominal.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":"2019-10-28T23:22:15.000Z","updated_at":"2024-02-16T07:17:48.000Z","dependencies_parsed_at":"2023-01-15T23:01:00.130Z","dependency_job_id":null,"html_url":"https://github.com/phenomnomnominal/screen-reader-reader","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/phenomnomnominal%2Fscreen-reader-reader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phenomnomnominal%2Fscreen-reader-reader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phenomnomnominal%2Fscreen-reader-reader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phenomnomnominal%2Fscreen-reader-reader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phenomnomnominal","download_url":"https://codeload.github.com/phenomnomnominal/screen-reader-reader/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252446403,"owners_count":21749229,"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":[],"created_at":"2024-11-13T10:11:26.322Z","updated_at":"2025-05-05T05:31:47.691Z","avatar_url":"https://github.com/phenomnomnominal.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# screen-reader-reader\n\n[![npm version](https://img.shields.io/npm/v/screen-reader-reader.svg)](https://img.shields.io/npm/v/screen-reader-reader.svg)\n\nThis is a very experimental attempt at creating a general purpose screen reader reader, with the aim of enabling more realistic end-to-end accessibility tests!\n\nThe goal would be to have something like this:\n\n```ts\ndescribe('my website', () =\u003e {\n  it(`should have correct screen reader output`, async () =\u003e {\n    await page.goto('https://www.my-website.com');\n\n    const result = await startScreenReader({\n      waitForStable: true\n    });\n\n    expect(result).toMatchSnapshot();\n  });\n});\n```\n\nThis is _very_ much a work in progress! I would love your help to make this more stable!\n\n## Currently working\n\n- Turning on VoiceOver (Mac OS), reading VoiceOver output as text, turning off VoiceOver.\n- Turning on [NVDA](https://www.nvaccess.org/) (Windows), reading NVDA output as text, turning off NVDA.\n\n## Goals\n\n- More stability. There is some unexpected behaviour when running the tests with Puppeteer that I'm sure people with more screen reader experience will be able to explain.\n- More screen readers. It would be good to get this working with [JAWS](https://www.freedomscientific.com/products/software/jaws/) and other commonly used screen readers.\n- Other things?\n\n## Installation\n\n```sh\nnpm install screen-reader-reader --save-dev\n```\n\n## Usage\n\n### CLI\n\nThere is a very basic CLI. It will enable the given screen reader (or automatically detect one), and read the screen reader output until it is stable.\n\n```sh\nnpx screen-reader-reader\n```\n\n### JavaScript\n\n#### Import\n\n```js\nimport { startScreenReader } from 'screen-reader-reader';\n```\n\nWhen using the API from JavaScript, there are two distinct modes:\n\n#### Stable mode\n\n```js\nconst result = await startScreenReader({\n  waitForStable: true\n});\n\nconsole.log(result);\n```\n\n#### Manual mode\n\n```js\nconst stop = await startScreenReader();\n\n// Do whatever you want to do...\n\nconst result = await stop();\n```\n\n#### Options\n\nThe `startScreenReader` function takes a number of options:\n\n```ts\ntype Options = {\n  screenreader: ScreenReaderName; // Default = from local environment\n  pollTimeout: number; // Default = 100ms\n  stableTimeout: number; // Default = 10000ms\n  waitForStable: boolean; // Default = false\n  filters: Array\u003cRegExp\u003e; // Default = []\n  mappers: Array\u003c(t: string) =\u003e string\u003e; // Default = []\n};\n\nconst enum ScreenReaderName {\n  voiceover,\n  nvda\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphenomnomnominal%2Fscreen-reader-reader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphenomnomnominal%2Fscreen-reader-reader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphenomnomnominal%2Fscreen-reader-reader/lists"}