Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
react-a11y-announcer
Advanced tools
`react-a11y-announcer` is a React a11y component created by Think Company that helps ensure announcements are accessible and properly announced by screen readers.
react-a11y-announcer
is a React a11y component created by Think Company that helps ensure announcements are accessible and properly announced by screen readers.
We included an example that shows you how the component will behave when added to a page. To run the demo:
examples
directorynpm install
npm start
This will start a server. Open a browser window and navigate to the localhost url displayed in the console output (usually http://localhost:8080/.
Press the "Trigger new announcement" button to add the announcement to the page.
Install from npm
npm install react-a11y-announcer --save
Import Announcer
import Announcer from 'react-a11y-announcer';
Create a state to pass to the announcer's props
this.state = {
announcement: ''
}
Add the announcer to your template
<div className="App">
<Announcer text={this.state.announcement} />
<div className="App-header">
<h2>Basic Announcer Example</h2>
<button type="button" onClick={this.handleClick}>Trigger new announcement</button>
</div>
</div>
Update the state you passed to the text prop
handleClick() {
this.setState(prevState => ({
announcement: 'Here\'s a new announcement!'
}));
}
Whenever a user with a screenreader clicks on that button, they should hear the announcement.
React Announcer was tested and works as expected in the latest versions of:
Desktop screen reader:
Repeat steps but change ENTER key step to SPACE key, both should work.
Mobile screen reader (VO, TalkBack):
To contribute to this project, please review and follow the contributing guidelines.
FAQs
`react-a11y-announcer` is a React a11y component created by Think Company that helps ensure announcements are accessible and properly announced by screen readers.
The npm package react-a11y-announcer receives a total of 31 weekly downloads. As such, react-a11y-announcer popularity was classified as not popular.
We found that react-a11y-announcer demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.