Skip to main content
OpenKeyNav™Open-source JavaScript keyboard accessibility library

Improve keyboard accessibility for complex web interactions.

Developers use OpenKeyNav to add on-demand target labels, direct keyboard navigation, and keyboard-accessible drag-and-drop to websites and web apps.

  • MIT licensed
  • Configurable shortcuts
  • Framework-agnostic

Install with npm or a browser build

npm
npm install openkeynav
No npm? Use CDN or self-hosting
Package behavior

OpenKeyNav adds keyboard paths for configured interactions and can flag likely mouse-only controls during development.

Interactive demo 01

Click Mode demo

Call a firefly with one shortcut

Enable OpenKeyNav and press K without Shift. Type the label beside Juniper to send it straight to the lantern.

Click Mode lets you choose a visible target directly. Press Esc to leave Click Mode.

Live Click Mode demoShortcuts off
Midnight gardenThe lantern keeper
7 fireflies
Your task

Call Juniper to the lantern.

  1. Current step.
  2. Upcoming step. Press K without Shift
  3. Upcoming step. Type Juniper’s label
Garden quietThe lantern keeper waits for Juniper.

Interactive demo 02

Move Mode demo: Keyboard-accessible drag and drop

Choose where the magic lands

Enable OpenKeyNav and press M without Shift. Type the label beside Moon dust, then type the label beside the Starlight cauldron. The bottle crosses the lab and wakes the station you choose.

OpenKeyNav labels all three brewing stations after you choose an ingredient. One destination label completes the move. Press Esc to leave Move Mode.

Live Move Mode demoShortcuts off
Shortcut sorceryThe traveling apothecary
1 route
Your task

Send Moon dust to the Starlight cauldron.

  1. Current step.
  2. Upcoming step. Press M without Shift
  3. Upcoming step. Type the Moon dust label
  4. Upcoming step. Type the Starlight cauldron label
IngredientsDrag from here
DestinationsDrop at one station
Awaiting a routeThe Starlight cauldron waits for Moon dust.
Mouse users can drag a bottle to any of the three brewing stations.Configure Move Mode

Modes and tools

Keyboard interaction and navigation modes

Compare interaction modes, navigation commands, and development tooling. Items marked v.next are planned for the next package release.

OpenKeyNav capabilities, default commands, release status, and purposes
CapabilityKindDefault / triggerAvailabilityWhat it does
Click ModeInteraction modeKCurrentLabel available controls and choose one directly.
Move ModeInteraction modeMCurrentChoose a configured source and valid destination for keyboard-accessible drag-and-drop.
Heading NavigationNavigation commandH / 1–6CurrentMove to the next or previous heading, or jump by heading level.
Scroll NavigationNavigation commandSCurrentMove focus between scrollable regions without searching for each one.
Structural NavigationNavigation moderCurrentMove through existing focus targets by page structure while native Tab remains intact.
Debug diagnosticsDevelopment toolOn by defaultCurrentUse debug heuristics to label likely mouse-clickable, unfocusable elements for review.
Expanded audit panelDevelopment toolOn enablev.nextRun a page-wide heuristic scan and open a results panel when keyboard-audit debugging is on.

Scope

OpenKeyNav adds direct keyboard paths for complex interactions.

OpenKeyNav adds

  • Offer direct, on-demand target selection
  • Add configured keyboard paths for pointer actions
  • Support endpoint-based drag-and-drop workflows
  • Surface likely mouse-only elements for investigation
  • Provide configurable shortcuts and mode feedback

Use OpenKeyNav alongside

  • Semantic HTML, accessible names, roles, and states
  • Expected Tab, arrow, Enter, Space, and Escape behavior
  • Logical focus order, visible focus, and avoiding traps
  • Browser, screen reader, speech input, and user testing
  • Whole-page and complete-process WCAG conformance

WCAG 2.2 support for keyboard operation and character shortcuts

W3C

OpenKeyNav contributes keyboard paths for configured actions and keeps its character shortcuts off until users enable them. The local guides cover implementation limits and verification steps.

Research

OpenKeyNav in research and guidance

Researchers used OpenKeyNav in a Voyager 2 case study, recommended it for biomedical data resources, and discussed it as a supplementary accessibility strategy for visualization tools.

Research Conference: IEEE VIS

Using OpenKeyNav to Enhance the Keyboard-Accessibility of Web-based Data Visualization Tools

Presented at the AccessViz workshop, part of IEEE VIS. The National Institutes of Health funded the research paper through Harvard University’s HIDIVE Lab.

Research Journal: PLOS Computational Biology

Ten simple rules for making biomedical data resources accessible

Research affiliated with Harvard Medical School. Rule 6 includes OpenKeyNav in its guidance for keyboard access and multiple input devices.

Research Conference: IHC

Challenges in the Accessibility of Data Visualization: Lessons from an Evaluation of a Dam Safety System

The paper discusses OpenKeyNav as a way to reproduce complex mouse-driven interactions from a keyboard and as a supplementary strategy for inaccessible visualization tools.

Testing

Test before you ship

Complete the full task with a keyboard. Then test the browsers and assistive technologies your users rely on.

Open the accessibility practices
  1. 1
    Keyboard-only task flow

    Reach, operate, reverse, and exit every configured interaction.

  2. 2
    Focus and semantics

    Confirm visible focus, logical order, names, roles, states, and feedback.

  3. 3
    Assistive technology

    Check screen reader and speech-input behavior for shortcut conflicts.

  4. 4
    People using the product

    Include disabled users in evaluation alongside standards testing.

Get started

Install OpenKeyNav

Add the library with your package manager, a CDN, or a self-hosted browser build. Then initialize one instance at the persistent root of your site or app.

Add the library

Choose the route that fits your project.

Package manager

Use the command for the package manager already in your project.

npm command
npm install openkeynav

No package manager

Load the same UMD browser build from a CDN or keep a copy in your project.

CDN · latest npm release
<script src="https://cdn.jsdelivr.net/npm/openkeynav/dist/openkeynav.umd.min.js"></script>
Self-hosted file
<script src="/vendor/openkeynav.umd.min.js"></script>
Download the current browser build

Initialize it in your environment

These examples keep one instance at the document or application root.

Before the closing body tag
<script src="https://cdn.jsdelivr.net/npm/openkeynav/dist/openkeynav.umd.min.js"></script>

<script>
  new OpenKeyNav().init();
</script>

Using the self-hosted file? Replace the first script URL with /vendor/openkeynav.umd.min.js.

Start small

Choose one mouse-dependent interaction and add a keyboard path.