
Company News
Socket Joins the OpenJS Foundation
Socket is proud to join the OpenJS Foundation as a Silver Member, deepening our commitment to the long-term health and security of the JavaScript ecosystem.
@frankhoodbs/a11y-support
Advanced tools
A collection of JavaScript utilities designed to enhance web accessibility and improve user experience. This module leverages powerful features from the ally.js library, focus-trap, and body-scroll-lock.
Focus management:
Scroll management:
Utilities:
Here are some of the primary utilities and their descriptions:
elementFocus(element: HTMLElement): Focuses the given element.
isActiveElement(element: HTMLElement): Checks if the given element is currently active.
createFocusTrap(element: HTMLElement): Creates a focus trap for the given element, which is useful for modals and other UI components where trapping user focus is essential.
firstElementFocus(context: string | HTMLElement): Focuses on the first element within the provided context.
lockBodyScroll(target: HTMLElement): Locks the body's scroll while allowing the specified target element to remain scrollable.
unlockBodyScroll(target?: HTMLElement): Unlocks the body's scroll. If a target element is provided, it re-enables scrolling for that particular element. If no target is specified, it clears all body scroll locks.
boolToString(value: boolean): Converts a boolean value to its string representation ('true' or 'false').FAQs
Accessibility utilities
We found that @frankhoodbs/a11y-support demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 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.

Company News
Socket is proud to join the OpenJS Foundation as a Silver Member, deepening our commitment to the long-term health and security of the JavaScript ecosystem.

Security News
npm now links to Socket's security analysis on every package page. Here's what you'll find when you click through.

Security News
A compromised npm publish token was used to push a malicious postinstall script in cline@2.3.0, affecting the popular AI coding agent CLI with 90k weekly downloads.