Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
a11y-status
Advanced tools
You'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.
Inject 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.
yarn add a11y-status # yarn
pnpm add a11y-status # pnpm
npm install a11y-status # npm
Note that the 11
is the number eleven. A-Eleven-Y
is a widely used shorthand for accessibility
.
Import the setStatus
function from this library and then use the function to set the desired status in your code.
import { setStatus } from 'a11y-status';
const button = document.querySelector('#insert-selection');
const select = document.querySelector('#selection');
button.addEventListener('click', (event) => {
const itemName = select.value;
// Notify the screen reader.
setStatus(`Selected item: ${itemName}`);
});
This code was taken from downshift
FAQs
Create a singleton live region for a11y status updates
The npm package a11y-status receives a total of 29,589 weekly downloads. As such, a11y-status popularity was classified as popular.
We found that a11y-status demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.