UNPKG

md2

Version:

Angular2 based Material Design components, directives and services are Accordion, Autocomplete, Chips(Tags), Collapse, Colorpicker, Data Table, Datepicker, Dialog(Modal), Menu, Multiselect, Select, Tabs, Tags(Chips), Toast and Tooltip.

46 lines (45 loc) 1.58 kB
import { Platform } from '../platform/platform'; /** * The InteractivityChecker leans heavily on the ally.js accessibility utilities. * Methods like `isTabbable` are only covering specific edge-cases for the browsers which are * supported. */ /** * Utility for checking the interactivity of an element, such as whether is is focusable or * tabbable. */ export declare class InteractivityChecker { private _platform; constructor(_platform: Platform); /** * Gets whether an element is disabled. * * @param element Element to be checked. * @returns Whether the element is disabled. */ isDisabled(element: HTMLElement): boolean; /** * Gets whether an element is visible for the purposes of interactivity. * * This will capture states like `display: none` and `visibility: hidden`, but not things like * being clipped by an `overflow: hidden` parent or being outside the viewport. * * @returns Whether the element is visible. */ isVisible(element: HTMLElement): boolean; /** * Gets whether an element can be reached via Tab key. * Assumes that the element has already been checked with isFocusable. * * @param element Element to be checked. * @returns Whether the element is tabbable. */ isTabbable(element: HTMLElement): boolean; /** * Gets whether an element can be focused by the user. * * @param element Element to be checked. * @returns Whether the element is focusable. */ isFocusable(element: HTMLElement): boolean; }