UNPKG

@a11y/skip-navigation

Version:

Web component friendly skip navigation functionality.

57 lines (56 loc) 1.27 kB
/** * Typings required for ShadyCSS. */ declare global { interface Window { ShadyCSS?: any; ShadyDOM?: any; } } /** * Button that skips to an anchor. * @slot - Text to the user. Defaults to "Skip to main content" * @attr {String} for - Optional ID of the anchor that should be navigated to. * @cssprop --skip-button-bg - Background. * @cssprop --skip-button-color - Foreground. * @cssprop --skip-button-padding - Padding. * @cssprop --skip-button-font-size - Font size. * @cssprop --skip-button-border-radius - Border radius. * @cssprop --skip-button-transition - Transition. */ declare class SkipButton extends HTMLElement { /** * Attaches the shadow root. */ /** * Attaches the shadow root. */ constructor(); /** * Hooks up the component. */ /** * Hooks up the component. */ connectedCallback(): void; /** * Tears down the component. */ /** * Tears down the component. */ disconnectedCallback(): void; /** * Focuses the anchor. */ /** * Focuses the anchor. */ focusAnchor(): void; } declare global { interface HTMLElementTagNameMap { "skip-button": SkipButton; } } export { SkipButton };