{"id":40310000,"url":"https://github.com/phetsims/utterance-queue","last_synced_at":"2026-01-20T06:31:41.814Z","repository":{"id":37484083,"uuid":"216885872","full_name":"phetsims/utterance-queue","owner":"phetsims","description":"Alerting library powered by aria-live","archived":false,"fork":false,"pushed_at":"2025-12-17T12:39:31.000Z","size":845,"stargazers_count":1,"open_issues_count":16,"forks_count":2,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-12-21T00:58:26.271Z","etag":null,"topics":["scenerystack"],"latest_commit_sha":null,"homepage":"http://scenerystack.org/","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/phetsims.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,"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":"2019-10-22T18:45:04.000Z","updated_at":"2025-12-17T12:39:35.000Z","dependencies_parsed_at":"2023-11-29T16:27:07.787Z","dependency_job_id":"49991084-f258-4078-a282-344acb242e64","html_url":"https://github.com/phetsims/utterance-queue","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/phetsims/utterance-queue","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phetsims%2Futterance-queue","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phetsims%2Futterance-queue/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phetsims%2Futterance-queue/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phetsims%2Futterance-queue/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phetsims","download_url":"https://codeload.github.com/phetsims/utterance-queue/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phetsims%2Futterance-queue/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28597628,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T02:08:49.799Z","status":"ssl_error","status_checked_at":"2026-01-20T02:08:44.148Z","response_time":117,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["scenerystack"],"created_at":"2026-01-20T06:31:41.759Z","updated_at":"2026-01-20T06:31:41.809Z","avatar_url":"https://github.com/phetsims.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"utterance-queue\n=======================================================\n\nAlerting queue and library powered by aria-live\n\nBy PhET Interactive Simulations\nhttps://phet.colorado.edu/\n\n### Documentation\n\nThis is under active prototyping, so please expect any sort of API to change. Comments at this stage are very welcome.\n\n#### Dependencies\n\n[Grunt](http://gruntjs.com/) is used to build the source (\"npm update -g grunt-cli\", \"npm update\" and \"grunt\" at the top\nlevel should build into build/). [Node.js](http://nodejs.org/) is required for this process.\n\nBuilding source code requires the phetsims compiling repository: [chipper](http://github.com/phetsims/chipper/). Once\ndependencies are downloaded, source is compiled by running `grunt`.\n\nThis library also depends on [lodash](https://lodash.com/). You can find the current checked in dependency for this\nlibrary in [sherpa](http://github.com/phetsims/sherpa/lib).\n\n#### Hello World\n\n(to be tested with a screen reader or your AT of choice)\n\n```html\n\n\u003cscript src=\"../sherpa/lib/lodash-4.17.4.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"../utterance-queue/build/utterance-queue.min.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n  const utteranceQueue = phet.utteranceQueue.UtteranceQueue.fromFactory();\n  utteranceQueue.addToBack( 'hello world' );\n\u003c/script\u003e\n```\n\n`UtteranceQueue.fromFactory()` does a bit of setup work, and is a great place to start with the utterance-queue library.\nIf you want a bit more control you can setup like this:\n\n```html\n\n\u003chtml\u003e\n\u003cbody\u003e\n\u003cbutton id=\"hello-button\"\u003eHello\u003c/button\u003e\n\u003c/body\u003e\n\u003cscript src=\"../sherpa/lib/lodash-4.17.4.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"../utterance-queue/build/utterance-queue.min.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n  const ariaLiveAnnouncer = new phet.utteranceQueue.AriaLiveAnnouncer();\n\n  const utteranceQueue = new phet.utteranceQueue.UtteranceQueue( ariaLiveAnnouncer );\n\n  const container = ariaLiveAnnouncer.ariaLiveContainer;\n\n  // add the aria-live elements where ever is best\n  document.body.appendChild( container );\n\n  // step phet.axon.stepTimer (in seconds) each frame. This takes care of UtteranceQueue's timing\n  let previousTime = 0;\n  const step = elapsedTime =\u003e {\n    const dt = elapsedTime - previousTime;\n    previousTime = elapsedTime;\n    phet.axon.stepTimer.emit( dt / 1000 ); // time takes seconds\n\n    window.requestAnimationFrame( step );\n  };\n  window.requestAnimationFrame( step );\n\n  utteranceQueue.addToBack( 'Press the button to hear \"hello world\".' );\n\n  document.getElementById( 'hello-button' ).addEventListener( 'click', () =\u003e {\n\n    // Now you have a fully operational UtteranceQueue.\n    utteranceQueue.addToBack( 'hello world' );\n  } )\n\u003c/script\u003e\n\u003c/html\u003e\n```\n\nThe [PhET Development Overview](https://github.com/phetsims/phet-info/blob/main/doc/phet-development-overview.md) is the\nmost complete guide to PhET Simulation Development. This guide includes how to obtain simulation code and its\ndependencies, notes about architecture \u0026 design, how to test and build the sims, as well as other important information.\n\n### License\n\nSee the [license](LICENSE)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphetsims%2Futterance-queue","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphetsims%2Futterance-queue","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphetsims%2Futterance-queue/lists"}