![38% of CISOs Fear They’re Not Moving Fast Enough on AI](https://cdn.sanity.io/images/cgdhsj6q/production/faa0bc28df98f791e11263f8239b34207f84b86f-1024x1024.webp?w=400&fit=max&auto=format)
Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
@accessible/link
Advanced tools
🅰 A component that adds aria attributes and keydown events to non-A elements in order to make them act like native links
npm i @accessible/link
A component that adds aria attributes and keydown events to non-A elements in order to make them act like native links.
Check out the example on CodeSandbox
import {Link as AccessibleLink} from '@accessible/link'
const LinkButton = () => (
<AccessibleLink>
<button onClick={() => (window.location.href = '/foo')}>Go to /foo</button>
</AccessibleLink>
)
Adds role="link"
and tabIndex={0}
props to its child component unless those props are already
defined in the child component's props. Also adds a keydown
event for the Enter
key which
causes the component's onClick
property to fire.
Prop | Type | Default | Required? | Description |
---|---|---|---|---|
children | React.ReactElement | undefined | Yes | The component you want to add accessible roles and keydown events to. |
A React hook for adding a11y properties and link/role=link interop to elements.
const Link = () => {
const ref = React.useRef(null)
const a11yProps = useA11yButton(ref, (event) => {
// This is your `onClick` handler
navigate.to('/home')
event.preventDefault()
})
return <button {...a11yProps} ref={ref} />
}
Argument | Type | Required? | Description |
---|---|---|---|
target | React.RefObject<T> | T | null | Yes | A React ref or HTML element |
children | React.ReactElement | Yes | The component you want to turn into a button that handles focus and space , enter keydown events. |
{
readonly onClick: (event: React.MouseEvent<T, MouseEvent>) => void;
readonly role: "button";
readonly tabIndex: 0;
}
MIT
2.0.0 (2020-07-08)
import {Link} from '@accessible/link'
.FAQs
🅰 A component that adds aria attributes and keydown events to non-A elements in order to make them act like native links
We found that @accessible/link 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
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.