
Research
Security News
The Growing Risk of Malicious Browser Extensions
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
live-region
Advanced tools
Creates a configurable offscreen live region.
$ npm install live-region --save
var liveRegion = new LiveRegion();
liveRegion.announce('Hello Fred');
This will create an offscreen live region:
<div role="log" aria-live="polite" aria-relevant="additions" aria-atomic="false"></div>
var LiveRegion = require('live-region');
var liveRegion = new LiveRegion();
var assertive = new LiveRegion({
ariaLive: 'assertive',
role: 'log',
ariaRelevant: 'all',
ariaAtomic: 'true'
});
ariaLive
(String): "polite"
or "assertive"
- the desired value of the aria-live
attribute. Defaults to "polite"
.role
(String): "status"
, "alert"
, or "log"
- the desired value of the role
attribute. Defaults to "log"
.ariaRelevant
(String): "additions"
, "removals"
, "text"
, "all"
, or "additions text"
- the desired value of the aria-relevant
attribute. Defaults to "additions"
.ariaAtomic
(String): "true"
or "false"
- the desired value of the aria-atomic
attribute. Defaults to "false"
.LiveRegion#announce
message
(String): the message to be announcedexpire
(Number): the number of ms to wait before cleaning up the inserted message. This prevents the region from getting full of useless nodes. Defaults to 7000
. NOTE: to prevent the announcements from expiring, set to false
.region.announce('Hello Fred', 5e3);
LiveRegion#destroy
removes the live region DOM node inserted on initialization
region.destroy();
FAQs
Accessible live region module
The npm package live-region receives a total of 7,364 weekly downloads. As such, live-region popularity was classified as popular.
We found that live-region 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 how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.
Security News
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.