Security News
Research
Supply Chain Attack on Rspack npm Packages Injects Cryptojacking Malware
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
@fluentui/react-aria
Advanced tools
@fluentui/react-aria is a library that provides accessible React components and hooks, following the Fluent UI design system. It focuses on ensuring that components are accessible and adhere to ARIA standards.
Button
The useButton hook provides the necessary ARIA attributes and event handlers to make a button accessible.
import { useButton } from '@fluentui/react-aria';
function MyButton(props) {
let ref = React.useRef();
let { buttonProps } = useButton(props, ref);
return (
<button {...buttonProps} ref={ref}>
{props.children}
</button>
);
}
Checkbox
The useCheckbox hook provides the necessary ARIA attributes and event handlers to make a checkbox accessible.
import { useCheckbox } from '@fluentui/react-aria';
function MyCheckbox(props) {
let ref = React.useRef();
let { inputProps } = useCheckbox(props, ref);
return (
<label>
<input {...inputProps} ref={ref} />
{props.children}
</label>
);
}
Dialog
The useDialog hook provides the necessary ARIA attributes and event handlers to make a dialog accessible.
import { useDialog } from '@fluentui/react-aria';
function MyDialog(props) {
let ref = React.useRef();
let { dialogProps } = useDialog(props, ref);
return (
<div {...dialogProps} ref={ref}>
{props.children}
</div>
);
}
Reakit is a low-level component library for building accessible web apps. It provides a set of unstyled components and hooks that you can use to build your own design system. It is similar to @fluentui/react-aria in its focus on accessibility, but it offers more flexibility in terms of styling and customization.
React Aria components for Fluent UI React
FAQs
React helper to ensure ARIA
We found that @fluentui/react-aria demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 12 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
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.
Security News
Sonar’s acquisition of Tidelift highlights a growing industry shift toward sustainable open source funding, addressing maintainer burnout and critical software dependencies.