a11y-status
Advanced tools
Comparing version
@@ -40,2 +40,1 @@ // packages/a11y-status/src/a11y-status.ts | ||
}; | ||
//# sourceMappingURL=a11y-status.js.map |
{ | ||
"name": "a11y-status", | ||
"version": "0.0.0-pr1966.1", | ||
"version": "0.0.0-pr2100.1", | ||
"description": "Create a singleton live region for a11y status updates", | ||
@@ -18,5 +18,5 @@ "homepage": "https://github.com/remirror/remirror/tree/HEAD/packages/a11y-status", | ||
".": { | ||
"types": "./dist/a11y-status.d.ts", | ||
"import": "./dist/a11y-status.js", | ||
"require": "./dist/a11y-status.cjs", | ||
"types": "./dist-types/index.d.ts" | ||
"require": "./dist/a11y-status.cjs" | ||
}, | ||
@@ -27,3 +27,3 @@ "./package.json": "./package.json" | ||
"module": "./dist/a11y-status.js", | ||
"types": "./dist-types/index.d.ts", | ||
"types": "./dist/a11y-status.d.ts", | ||
"files": [ | ||
@@ -34,13 +34,9 @@ "dist", | ||
"dependencies": { | ||
"@babel/runtime": "^7.13.10", | ||
"@babel/runtime": "^7.22.3", | ||
"@types/throttle-debounce": "^2.1.0", | ||
"throttle-debounce": "^3.0.1" | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"@remirror": { | ||
"sizeLimit": "1 KB" | ||
}, | ||
"readme": "# a11y-status\n\n[](https://bundlephobia.com/result?p=a11y-status) [](https://www.npmjs.com/package/a11y-status)\n\n## Problem\n\nYou'd like to update your screen reader users on changes in the status of your ui but don't want to create multiple dom elements to notifiy them.\n\n### Solution\n\nInject a visually hidden singleton element in the dom which is responsible for notifying screen reader users of updates to the accessibility status of the UI.\n\n## Installation\n\n```bash\nyarn add a11y-status # yarn\npnpm add a11y-status # pnpm\nnpm install a11y-status # npm\n```\n\nNote that the `11` is the number eleven. `A-Eleven-Y` is a widely used shorthand for `accessibility`.\n\n## Usage\n\nImport the `setStatus` function from this library and then use the function to set the desired status in your code.\n\n```ts\nimport { setStatus } from 'a11y-status';\n\nconst button = document.querySelector('#insert-selection');\nconst select = document.querySelector('#selection');\n\nbutton.addEventListener('click', (event) => {\n const itemName = select.value;\n\n // Notify the screen reader.\n setStatus(`Selected item: ${itemName}`);\n});\n```\n\n## Acknowledgements\n\nThis code was taken from [downshift](https://github.com/downshift-js/downshift/blob/master/src/set-a11y-status.js)\n" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
193
69.3%22647
-10.28%Updated