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

Add direct keyboard operation to websites and web apps.

OpenKeyNav labels detected targets for direct selection and gives developers reusable modes for navigation and configured keyboard drag-and-drop.

  • 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

Click Mode discovers supported targets when a user invokes it. Developer configuration maps specialized movement workflows.

Interactive demo 01

Click Mode demo

Call a firefly with one shortcut

Enable OpenKeyNav and press K to enter Click Mode. 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 to enter Click Mode
  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 to enter Move Mode. 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 to enter Move Mode
  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 detected targets and focus or activate 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 defaultCurrentIdentify actions for manual review of semantics, focus, activation, and task completion.
Expanded audit panelDevelopment toolOn enablev.nextRun a page-wide heuristic scan and open a results panel when keyboard-audit debugging is on.

Scope

One interaction layer for direct action, navigation, and movement.

Ready on initialization

  • On-demand labels for detected targets
  • Direct focus and activation through Click Mode
  • Heading, scroll-region, and structural navigation
  • Configurable commands with mode feedback
  • Focused review of likely conventional-keyboard gaps

Map to the application

  • Define valid sources and destinations for Move Mode
  • Connect completion callbacks to application state
  • Choose shortcuts that fit the host interface
  • Expose names, roles, states, focus, and feedback
  • Verify every action in the complete workflow

A reusable implementation path for WCAG keyboard operation

W3C

WCAG 2.1.1 requires all functionality to be operable through a keyboard interface. OpenKeyNav helps teams build those keyboard paths for detected targets and configured workflows, with focused guides for coverage and verification.

ADA Title II

Use OpenKeyNav to build keyboard paths for ADA Title II compliance.

WCAG 2.1 Level AA

  • State and local government websites and mobile apps
  • Content supplied directly or through vendor arrangements
  • April 26, 2027 for entities with populations of 50,000 or more
  • April 26, 2028 for smaller entities and special districts

Build the keyboard path

Research

OpenKeyNav in research and guidance

OpenKeyNav has been referenced in research conferences and journals, covering human-computer interaction and biomedical data resources best practices.

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 evaluates OpenKeyNav as a keyboard route for reproducing pointer-driven interactions in a dam-safety visualization system.

Accessibility Conference: IHD

Moving Away from Mouse-Dependency: Empowering Productive Web Experiences with Keyboard Accessibility

Presented in a breakout session at the Evidence for Success Disability Conference, hosted by Northern Arizona University’s Institute for Human Development.

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 implementing

Add the operation layer, verify detected targets, and map specialized workflows.