Skip to content

ally.js

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

🔗ally.is.shadowed

Determines if an element is the descendant of a ShadowRoot.

🔗Usage

var element = document.getElementById('victim');
var isShadowed = ally.is.shadowed(element);

🔗Arguments

NameTypeDefaultDescription
elementHTMLElementrequiredThe Element to test.

🔗Returns

Boolean, true if the element is focus relevant.

🔗Throws

TypeError if element argument is not of type HTMLElement.

🔗Notes

NOTE: Requires Shadow DOM support

🔗Contributing