Security News
UK Officials Consider Banning Ransomware Payments from Public Entities
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.
makeup-focusables
Advanced tools
Returns an array of all focusable descendants of the given element.
This CommonJS module is still in an experimental state, until it reaches v1.0.0 you must consider all minor releases as breaking changes. Patch releases may introduce new features, but will be backwards compatible.
// via npm
npm install makeup-focusables
// via yarn
yarn add makeup-focusables
Markup:
<div class="widget">
<h2 tabindex="-1">Widget Title</h2>
<p>Widget Text</p>
<button type="button">Widget Button</button>
<a href="#">Widget Link</a>
</div>
// require the module
const focusables = require('makeup-focusables');
// get element reference
const widgetEl = document.querySelector('.widget');
// get array of all focusable elements (keyboard and programmatic)
const allItems = focusables(widgetEl);
console.log(allItems.length) // outputs: 3
// get array of only keyboard focusable elements
const keyboardItems = focusables(widgetEl, true);
console.log(keyboardItems.length) // outputs: 2
el
: the element to search (default: undefined)keyboardOnly
: return only elements focusable in sequential keyboard navigation (default: false)FAQs
Returns an array of all focusable descendants of the given element
The npm package makeup-focusables receives a total of 176 weekly downloads. As such, makeup-focusables popularity was classified as not popular.
We found that makeup-focusables 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
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.
Security News
Snyk's use of malicious npm packages for research raises ethical concerns, highlighting risks in public deployment, data exfiltration, and unauthorized testing.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.