Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
@leafygreen-ui/a11y
Advanced tools
yarn add @leafygreen-ui/a11y
npm install @leafygreen-ui/a11y
import { VisuallyHidden } from '@leafygreen-ui/a11y';
const Button = () => {
return (
<button>
<svg role="presentation" aria-hidden />
<VisuallyHidden>Click me</VisuallyHidden>
</button>
);
};
Output HTML
<button>
<svg role="presentation" aria-hidden="true" />
<div>Click me</div>
</button>
Prop | Type | Description | Default |
---|---|---|---|
children | string | Text that is announced to screen readers but is hidden from the screen. |
Hook that returns two sets of props that accessibly associate a label and its respective input element
Parameter | Type | Description | Default |
---|---|---|---|
id | string | id that describes the input element. |
Function that validates that either aria-label or aria-labelledby are present within props.
Parameter | Type | Description | Default |
---|---|---|---|
props | Record<string, any> | Object of component properties. | |
componentName | string | Name of component with props to be validated. |
Returns an emotion CSS instance for rendering styles that respect OS-level preferences for reduced motion.
Use this function to remove scale, size, and positional transitions for users with that preference set.
Parameter | Type | Description | Default |
---|---|---|---|
styles | string | String of styles to render within preference media query. |
FAQs
leafyGreen UI Kit A11y
We found that @leafygreen-ui/a11y demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 5 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
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.