Skip to content


JavaScript library to help modern web applications with accessibility concerns by making accessibility simpler


Determines if an element is considered focusable.

# Description

An element is considered focusable if it is, and not

Consult the data tables what browsers consider focusable and what ally.js fails to consider focusable to learn how HTML elements behave.

# Usage

var element = document.getElementById('victim');
var isFocusable =;

# Arguments

Name Type Default Description
element HTMLElement required The Element to test.

The underlying rules can also be accessed in the options argument style by calling

Name Type Default Description
context <selector> required The element to examine. The first element of a collection is used.
except <focus identification exception> {} The Element to test.

# Returns

Boolean, true if the element is focusable.

# Throws

TypeError if element argument is not of type HTMLElement.

# Changes

# Notes


# Contributing