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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@allystudio/focus-order-visualizer

v1.0.0

Published

A lightweight library for visualizing focus order on web pages with numbered overlays and connecting lines

Readme

@allystudio/focus-order-visualizer

A lightweight, fast library for visualizing focus order on web pages with numbered overlays and connecting lines. Perfect for accessibility testing and development.

Features

  • 🎯 Visual Focus Order: Shows numbered circles on focusable elements
  • 🔗 Connecting Lines: Solid straight lines showing tab flow
  • Real-time Updates: Responds to DOM changes and scrolling
  • 🎨 Customizable: Colors, sizes, and visibility options
  • Accessibility Focused: Follows HTML tabindex specification
  • 🪶 Lightweight: Zero dependencies except focusable-selectors
  • 📱 Responsive: Works with scrollable content and dynamic layouts

Installation

npm install @allystudio/focus-order-visualizer

Quick Start

import { createFocusOrderVisualizer } from '@allystudio/focus-order-visualizer';

// Create visualizer
const visualizer = createFocusOrderVisualizer();

// Start visualization
visualizer.start();

// Stop visualization
visualizer.stop();

// Toggle visualization
visualizer.toggle();

Configuration

const visualizer = createFocusOrderVisualizer({
  includeHidden: false,
  showConnectingLines: true,
  colors: {
    overlay: '#2563eb',
    overlayText: '#ffffff',
    connectingLine: 'rgba(37, 99, 235, 0.3)',
    focusOutline: '#2563eb',
  },
  zIndex: 2147483646,
  overlaySize: 24,
});

Options

| Option | Type | Default | Description | |--------|------|---------|-------------| | includeHidden | boolean | false | Include hidden focusable elements | | showConnectingLines | boolean | true | Show lines between elements | | colors.overlay | string | '#2563eb' | Circle background color | | colors.overlayText | string | '#ffffff' | Circle text color | | colors.connectingLine | string | 'rgba(37, 99, 235, 0.3)' | Line color | | zIndex | number | 2147483646 | Z-index for overlays | | overlaySize | number | 24 | Circle size in pixels |

API Reference

Methods

start()

Start the focus order visualization.

stop()

Stop the visualization and clean up all elements.

toggle()

Toggle visualization on/off. Returns current state.

isActive()

Check if visualization is currently active.

getStats()

Get statistics about focusable elements:

const stats = visualizer.getStats();
// {
//   total: 15,
//   positiveTabIndex: 3,
//   actuallyFocusable: 12
// }

updateConfig(options)

Update configuration options:

visualizer.updateConfig({
  colors: { overlay: '#10b981' },
  overlaySize: 32
});

destroy()

Completely destroy the visualizer instance.

Focus Order Rules

The visualizer follows the HTML specification for focus order:

  1. Positive tabindex (1, 2, 3...) - focused first, in ascending order
  2. Zero tabindex (0) and naturally focusable elements - focused after positive tabindex
  3. Negative tabindex (-1) - excluded from tab order

Browser Support

  • Chrome/Edge 88+
  • Firefox 87+
  • Safari 14+

Use Cases

  • Accessibility Testing: Verify focus order matches visual layout
  • Development: Debug keyboard navigation issues
  • QA: Validate tabindex implementation
  • Education: Demonstrate focus flow to designers/stakeholders

Demo

Check out the interactive demo for examples of:

  • Form elements
  • Navigation links
  • Custom tabindex values
  • Scrollable content
  • Dynamic content changes

License

MIT License - see LICENSE file for details.

Contributing

Part of the Allyship.dev accessibility toolkit.

Join us in building the next generation of accessibility testing tools that will make the web accessible for everyone.