/** * @license * Copyright 2023 Nuraly, Laabidi Aymen * SPDX-License-Identifier: MIT */ import { BaseMenuController } from './base.controller.js'; import type { MenuAccessibilityController } from '../interfaces/index.js'; import type { StateController } from './state.controller.js'; /** * Accessibility controller manages ARIA attributes and screen reader support * Ensures the menu component is fully accessible */ export declare class AccessibilityController extends BaseMenuController implements MenuAccessibilityController { private stateController; private announcementElement; constructor(host: any, stateController: StateController); hostConnected(): void; hostDisconnected(): void; /** * Create a screen reader announcement element */ private createAnnouncementElement; /** * Remove the screen reader announcement element */ private removeAnnouncementElement; /** * Update all ARIA attributes throughout the menu */ updateAriaAttributes(): void; /** * Update ARIA attributes on the menu root */ private updateMenuRoot; /** * Update ARIA attributes on all menu items */ private updateAllMenuItems; /** * Update ARIA attributes on all submenus */ private updateAllSubMenus; /** * Set aria-expanded attribute on an element * @param element - The element to update * @param expanded - Whether the element is expanded */ setAriaExpanded(element: HTMLElement, expanded: boolean): void; /** * Set aria-selected attribute on an element * @param element - The element to update * @param selected - Whether the element is selected */ setAriaSelected(element: HTMLElement, selected: boolean): void; /** * Manage focus on an element * @param element - The element to focus */ manageFocus(element: HTMLElement): void; /** * Announce a message to screen readers * @param message - The message to announce */ announceToScreenReader(message: string): void; /** * Announce menu item selection * @param itemText - The text of the selected item * @param path - The path to the item */ announceSelection(itemText: string, path: number[]): void; /** * Announce submenu state change * @param itemText - The text of the submenu * @param isOpen - Whether the submenu is now open */ announceSubMenuToggle(itemText: string, isOpen: boolean): void; /** * Set focus to the first interactive menu item */ focusFirstItem(): void; /** * Set focus to the last interactive menu item */ focusLastItem(): void; } //# sourceMappingURL=accessibility.controller.d.ts.map