/** * @license * Copyright 2023 Google LLC * SPDX-License-Identifier: Apache-2.0 */ import { LitElement } from 'lit'; import { MixinBase, MixinReturn } from '../../labs/behaviors/mixin.js'; /** * Mixes in aria delegation for elements that delegate focus and aria to inner * shadow root elements. * * This mixin fixes invalid aria announcements with shadow roots, caused by * duplicate aria attributes on both the host and the inner shadow root element. * * Note: this mixin **does not yet support** ID reference attributes, such as * `aria-labelledby` or `aria-controls`. * * @example * ```ts * class MyButton extends mixinDelegatesAria(LitElement) { * static shadowRootOptions = {mode: 'open', delegatesFocus: true}; * * render() { * return html` * * `; * } * } * ``` * ```html * +1 * ``` * * Use `ARIAMixinStrict` for lit analyzer strict types, such as the "role" * attribute. * * @example * ```ts * return html` * * `; * ``` * * In the future, updates to the Accessibility Object Model (AOM) will provide * built-in aria delegation features that will replace this mixin. * * @param base The class to mix functionality into. * @return The provided class with aria delegation mixed in. */ export declare function mixinDelegatesAria>(base: T): MixinReturn;