npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@p0tatoe/threlte-a11y

v0.0.2

Published

Provide accessibility support to Threlte such as focus indication, keyboard tab index, and screen reader support

Readme

threlte-a11y

Screen reader accessibility components for Threlte, the Svelte framework for Three.js.

This library provides accessibility support to Threlte such as focus indication, keyboard tab index, and screen reader support. Inspired by pmndrs/react-three-a11y

Installation

npm i @p0tatoe/threlte-a11y

Usage

Wrap your 3D objects with the appropriate A11y component. These components handle focus, hover, and click events.

A11yButton

Use A11yButton for interactive elements that trigger an action.

<script>
  import { A11yButton } from 'threlte-a11y';
  import { BoxGeometry, MeshStandardMaterial } from 'three';
</script>

<A11yButton
  description="Click me to perform an action"
  actionCall={() => console.log('Clicked!')}
  activationMsg="Action performed"
>
  <T.Mesh
    geometry={new BoxGeometry(1, 1, 1)}
    material={new MeshStandardMaterial({ color: 'red' })}
  />
</A11yButton>

Props:

  • description (string, required): The accessible name of the button.
  • actionCall (function): Callback function triggered on click or activation.
  • activationMsg (string): Message announced by the screen reader upon activation.
  • disabled (boolean): Whether the button is disabled.
  • tabIndex (number): Tab index for keyboard navigation (default: 0).
  • showAltText (boolean): Whether to show a visual tooltip on hover.

A11yLink

Use A11yLink for navigation.

<script>
  import { A11yLink } from 'threlte-a11y';
</script>

<A11yLink
  description="Go to Threlte documentation"
  href="https://threlte.xyz"
>
  <!-- Your 3D Object Here -->
</A11yLink>

Props:

  • description (string, required): The accessible name of the link.
  • href (string, required): The URL to navigate to.
  • showAltText (boolean): Whether to show a visual tooltip on hover.

A11yToggle

Use A11yToggle for toggleable states (like a checkbox or switch).

<script>
  import { A11yToggle } from 'threlte-a11y';
  let isToggled = false;
</script>

<A11yToggle
  description="Toggle light"
  startPressed={isToggled}
  activationMsg="Light turned on"
  deactivationMsg="Light turned off"
  actionCall={() => isToggled = !isToggled}
>
  <!-- Your 3D Object Here -->
</A11yToggle>

Props:

  • description (string, required): The accessible name of the toggle.
  • startPressed (boolean): Initial state of the toggle.
  • activationMsg (string): Message announced when toggled on.
  • deactivationMsg (string): Message announced when toggled off.
  • actionCall (function): Callback function triggered on toggle.

A11yImage

Use A11yImage for static images or non-interactive content that needs description.

<script>
  import { A11yImage } from 'threlte-a11y';
</script>

<A11yImage
  description="A beautiful landscape"
>
  <!-- Your 3D Object Here -->
</A11yImage>

A11yContent

Use A11yContent for generic content sections.

<script>
  import { A11yContent } from 'threlte-a11y';
</script>

<A11yContent
  description="Main content area"
>
  <!-- Your 3D Objects Here -->
</A11yContent>

License

MIT