Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
react-untabbable
Advanced tools
Changelog
1.0.1 (May 9, 2020)
Readme
An extremely simple utility to make a container and all its children untabbable, but still focusable. This can be useful in achieving a better accessibility for you components, like a menu with nested panels or the dreaded carousel where you probably want some of the items to be untabbable.
It quite simply applies the value -1 to the tabbable elements inside a container, restoring afterwards when needed.
You can either use the hook or the component itself, pick what better suits your needs. Both have the same API.
Prop | Type | Default | Description |
---|---|---|---|
disabled | boolean | false | Restores the tabbable behaviour |
import { Untabbable } from 'react-untabbable';
<Untabbable>
<button>Can't click me 😢</button>
You can mix react elements and simple nodes! (string, number, etc...)
<div>
<button>Can't click me as well 😭</button>
</div>
</Untabbable>
Parameter | Type | Default | Description |
---|---|---|---|
ref | `ref | ref[]` | |
options? | object | {} | |
options.disabled | boolean | false | Restores the tabbable behaviour |
options.includeContainer | boolean | true | If the owner of the ref should also be untabbable |
import React, { useRef } from 'react';
import { useUntabbable } from 'react-untabbable';
const MyComponent = () => {
const firstButtonRef = useRef();
const secondButtonRef = useRef();
return (
<button ref={firstButtonRef}>
Can't click me 😢
</button>
<div>
<button ref={secondButtonRef}>Can't click me as well 😭</button>
</div>
);
};
FAQs
An extremely simple utility to make a container and all its children untabbable, but still focusable.
The npm package react-untabbable receives a total of 139 weekly downloads. As such, react-untabbable popularity was classified as not popular.
We found that react-untabbable 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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.