{"_id":"@acab/live-announcer","_rev":"3-681a073aa4c215ab973158403f2dabc6","name":"@acab/live-announcer","dist-tags":{"latest":"0.2.2"},"versions":{"0.1.0":{"name":"@acab/live-announcer","version":"0.1.0","author":{"name":"Mayank"},"_id":"@acab/live-announcer@0.1.0","maintainers":[{"name":"mayank-99","email":"mayaank0@proton.me"}],"homepage":"https://github.com/mayank99/live-announcer#readme","bugs":{"url":"https://github.com/mayank99/live-announcer/issues"},"dist":{"shasum":"e8b33bea97de99be65711590aebee39265aa5177","tarball":"https://registry.npmjs.org/@acab/live-announcer/-/live-announcer-0.1.0.tgz","fileCount":5,"integrity":"sha512-6t6/FiFUWn14EJG3QujE0q3C7D2Wli16E5DXzgxmiI/swfGNZ9Rcjoa3HALH/HHgXKahGzrwySW6VPVEslIkQw==","signatures":[{"sig":"MEYCIQDqcwyJPBlzhr76KXCeuhgruAJUTYX3X9v5PFekVjIw+AIhAJTaUUBf0Xc5eCtGIALzTkea2GQrPQ1AXSPCpMrxsA2z","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5737},"main":"index.js","type":"module","types":"index.d.ts","exports":{".":"./index.js"},"gitHead":"0df811c6b62788ebf63f7a7bed82da9817a003d1","_npmUser":{"name":"mayank-99","email":"mayaank0@proton.me"},"repository":{"url":"git+https://github.com/mayank99/live-announcer.git","type":"git"},"_npmVersion":"9.5.1","description":"A web component that makes it easier to work with [live regions](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Live_Regions).","directories":{},"_nodeVersion":"18.16.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/live-announcer_0.1.0_1703124723161_0.3172571156808863","host":"s3://npm-registry-packages"}},"0.2.0":{"name":"@acab/live-announcer","version":"0.2.0","author":{"name":"Mayank"},"_id":"@acab/live-announcer@0.2.0","maintainers":[{"name":"mayank-99","email":"mayaank0@proton.me"}],"homepage":"https://github.com/mayank99/live-announcer#readme","bugs":{"url":"https://github.com/mayank99/live-announcer/issues"},"dist":{"shasum":"7f3a24b3ac3bf8d118f2528b982efacf52ec2f84","tarball":"https://registry.npmjs.org/@acab/live-announcer/-/live-announcer-0.2.0.tgz","fileCount":5,"integrity":"sha512-hNVZMOXFtNmtUDUnBT1+QVhWrNxMj0fU+wyZFkcnW/RZthEQvHrSoU8LdH+AMgYdx/KQJeuwQHGI4583Nz9w7g==","signatures":[{"sig":"MEQCIGaJF+ltRBHSvIY+OMEjsj+JX7WKlogVjwgdIQ0uAHWYAiByR7BCvj7/QgyUx3mozvLzWPqZUbCLLuLk3TxC7XI0yg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5762},"main":"index.js","type":"module","types":"index.d.ts","exports":{".":"./index.js"},"gitHead":"3bb6ad24e5b70dfaf72da340f1dc3aa570e36e11","_npmUser":{"name":"mayank-99","email":"mayaank0@proton.me"},"repository":{"url":"git+https://github.com/mayank99/live-announcer.git","type":"git"},"_npmVersion":"9.5.1","description":"A web component that makes it easier to work with [live regions](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Live_Regions).","directories":{},"_nodeVersion":"18.16.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/live-announcer_0.2.0_1703130094564_0.04177125500758083","host":"s3://npm-registry-packages"}},"0.2.1":{"name":"@acab/live-announcer","version":"0.2.1","author":{"name":"Mayank"},"_id":"@acab/live-announcer@0.2.1","maintainers":[{"name":"mayank-99","email":"mayaank0@proton.me"}],"homepage":"https://github.com/mayank99/live-announcer#readme","bugs":{"url":"https://github.com/mayank99/live-announcer/issues"},"dist":{"shasum":"d0a0f51d810f38a0c6326419fc98a72a01ff303c","tarball":"https://registry.npmjs.org/@acab/live-announcer/-/live-announcer-0.2.1.tgz","fileCount":5,"integrity":"sha512-dxphWsZPiAWCtzislJvS7m2Gikla92GsQ2n/jNFUc/COMZh8r2PggEagXdjOpHR8yTaMBEMezo2EI2qVqYTSyQ==","signatures":[{"sig":"MEUCIQDbkpnHpOIV2SbapxlJkJL1SbYZynNwtn8Sk6SQZq/T8gIgQYVSIxUltHfxWwQKoWAvihdxg1PgIIT08g6WND5FCtM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":5747},"main":"index.js","type":"module","types":"index.d.ts","exports":{".":"./index.js"},"gitHead":"785e0241b433ae6776d7eb1ed268aaa95e95bc99","_npmUser":{"name":"mayank-99","email":"mayaank0@proton.me"},"repository":{"url":"git+https://github.com/mayank99/live-announcer.git","type":"git"},"_npmVersion":"9.5.1","description":"A web component that makes it easier to work with [live regions](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Live_Regions).","directories":{},"_nodeVersion":"18.16.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/live-announcer_0.2.1_1703130341191_0.6542676042589213","host":"s3://npm-registry-packages"}},"0.2.2":{"name":"@acab/live-announcer","type":"module","version":"0.2.2","exports":{".":"./index.js"},"repository":{"type":"git","url":"git+https://github.com/mayank99/live-announcer.git"},"author":{"name":"Mayank"},"main":"index.js","types":"index.d.ts","_id":"@acab/live-announcer@0.2.2","gitHead":"d67a0a6dd4bbfa7d2d0091bb3895eb15bd3d63eb","description":"A web component that makes it easier to work with [live regions](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Live_Regions).","bugs":{"url":"https://github.com/mayank99/live-announcer/issues"},"homepage":"https://github.com/mayank99/live-announcer#readme","_nodeVersion":"22.11.0","_npmVersion":"10.9.0","dist":{"integrity":"sha512-omqulcWzPiIQCEPit7D3cF4jnXnglxmvSqOSWlnqy8bOPu/wBLYuuK9sJC6RzKOFOdjVv+YNUSKHOqd5TL2Jxw==","shasum":"aab86ebe19467e48e3a800f124540c762c610a92","tarball":"https://registry.npmjs.org/@acab/live-announcer/-/live-announcer-0.2.2.tgz","fileCount":5,"unpackedSize":5820,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGkBRdTqRQ5JzMHMU/07Hx3j9n5PbSFcJnsMndYTU6hdAiEAjjl7bzlqY8jXf9dpfn2QDo+YGTb4+BTsK+rcyG36pUo="}]},"_npmUser":{"name":"mayank-99","email":"mayaank0@proton.me"},"directories":{},"maintainers":[{"name":"mayank-99","email":"mayaank0@proton.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/live-announcer_0.2.2_1732844150117_0.03922931085572667"},"_hasShrinkwrap":false}},"time":{"created":"2023-12-21T02:12:03.068Z","modified":"2024-11-29T01:35:50.470Z","0.1.0":"2023-12-21T02:12:03.492Z","0.2.0":"2023-12-21T03:41:34.746Z","0.2.1":"2023-12-21T03:45:41.375Z","0.2.2":"2024-11-29T01:35:50.290Z"},"bugs":{"url":"https://github.com/mayank99/live-announcer/issues"},"author":{"name":"Mayank"},"homepage":"https://github.com/mayank99/live-announcer#readme","repository":{"type":"git","url":"git+https://github.com/mayank99/live-announcer.git"},"description":"A web component that makes it easier to work with [live regions](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Live_Regions).","maintainers":[{"name":"mayank-99","email":"mayaank0@proton.me"}],"readme":"# live-announcer\n\nA web component that makes it easier to work with [live regions](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Live_Regions).\n\n```\nnpm add @acab/live-announcer\n```\n\n## Usage\n\n1. Set it up on page load. This should be done as early as possible.\n\n   ```js\n   import * as announcer from '@acab/live-announcer';\n   announcer.setup();\n   ```\n\n2. Announce notifications from anywhere on the page, in an [assertive](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-live#assertive) or [polite](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-live#polite) way.\n\n   ```js\n   announcer.notify('Something happened!', { priority: 'important' });\n   ```\n\n   ```js\n   announcer.notify('Something happened, but it can wait.');\n   ```\n\n### Best practices\n\n1. Keep the notification text short and concise. Don't use special characters or non-text content.\n2. Set up the announcer as early as possible, before even sending any notifications.\n3. Don't send too many notifications at the same time. Prefer static text.\n\n### Dialogs and popout windows\n\nCalling `setup()` will automatically create an instance of the announcer and inject it into the page. Specifically, it will be appended into the `<body>` element's shadow tree.\n\nIn some cases, you might want to inject it somewhere else, for example, into a modal `<dialog>` or a popout window. For such scenarios, use the constructor to create a separate instance and inject it wherever you'd like:\n\n```js\nimport { LiveAnnouncer } from '@acab/live-announcer';\n\nconst announcer = new LiveAnnouncer();\nannouncer.setup({ target: document.querySelector('dialog') });\n\nannouncer.notify('Something happened inside the dialog!');\n```\n","readmeFilename":"README.md"}