Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
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 53 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
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.