/** * Accessibility (a11y) Constants * * WCAG compliance constants, ARIA attributes, color contrast calculations, * and other accessibility-related values used throughout the application. * * @module a11y/constants */ /** * Core accessibility constants for testing and validation */ export declare const A11Y_CONSTANTS: { /** * Delay before checking focus state (milliseconds) */ readonly FOCUS_CHECK_DELAY: 100; /** * Maximum number of tab key presses for focus testing */ readonly FOCUS_TAB_COUNT: 10; /** * Minimum time for focus to be visible (milliseconds) */ readonly MIN_FOCUS_VISIBLE_TIME: 200; /** * Maximum time to wait for focus change (milliseconds) */ readonly MAX_FOCUS_WAIT_TIME: 3000; /** * Debounce delay for screen reader announcements (milliseconds) */ readonly SCREEN_READER_DEBOUNCE: 150; /** * Minimum font size for large text (points) */ readonly MIN_LARGE_TEXT_SIZE: 18; /** * Minimum font size for bold large text (points) */ readonly MIN_LARGE_TEXT_BOLD_SIZE: 14; /** * Minimum font size for normal text (points) */ readonly MIN_NORMAL_TEXT_SIZE: 14; /** * Minimum touch target size (pixels) - WCAG 2.5.5 */ readonly MIN_TOUCH_TARGET_SIZE: 44; /** * Minimum touch target size for inline elements (pixels) */ readonly MIN_INLINE_TARGET_SIZE: 24; /** * Maximum value for RGB color channels */ readonly COLOR_CHANNEL_MAX: 255; /** * sRGB threshold for luminance calculation */ readonly SRGB_THRESHOLD: 0.03928; /** * sRGB divisor for linear conversion */ readonly SRGB_DIVISOR: 12.92; /** * sRGB offset for gamma correction */ readonly SRGB_OFFSET: 0.055; /** * sRGB scale factor for gamma correction */ readonly SRGB_SCALE: 1.055; /** * sRGB exponent for gamma correction */ readonly SRGB_EXPONENT: 2.4; /** * Red channel weight for luminance calculation */ readonly LUMINANCE_RED: 0.2126; /** * Green channel weight for luminance calculation */ readonly LUMINANCE_GREEN: 0.7152; /** * Blue channel weight for luminance calculation */ readonly LUMINANCE_BLUE: 0.0722; /** * Offset added to luminance for contrast ratio calculation */ readonly LUMINANCE_OFFSET: 0.05; /** * Minimum contrast ratio for AA compliance (normal text) */ readonly CONTRAST_RATIO_AA: 4.5; /** * Minimum contrast ratio for AA compliance (large text) */ readonly CONTRAST_RATIO_AA_LARGE: 3; /** * Minimum contrast ratio for AAA compliance (normal text) */ readonly CONTRAST_RATIO_AAA: 7; /** * Minimum contrast ratio for AAA compliance (large text) */ readonly CONTRAST_RATIO_AAA_LARGE: 4.5; /** * Minimum contrast ratio for non-text elements (graphics, UI components) */ readonly CONTRAST_RATIO_GRAPHICS: 3; /** * Maximum percentage value */ readonly PERCENTAGE_MAX: 100; /** * Maximum duration for essential animations (milliseconds) */ readonly MAX_ESSENTIAL_ANIMATION_DURATION: 5000; /** * Default duration for reduced motion (milliseconds) */ readonly REDUCED_MOTION_DURATION: 1; /** * Maximum flashes per second to avoid seizures (WCAG 2.3.1) */ readonly MAX_FLASH_RATE: 3; /** * Minimum time between auto-updating content (seconds) */ readonly MIN_AUTO_UPDATE_INTERVAL: 5; /** * Minimum warning time before timeout (seconds) - WCAG 2.2.1 */ readonly MIN_TIMEOUT_WARNING: 20; /** * Default session timeout (minutes) */ readonly DEFAULT_SESSION_TIMEOUT: 20; /** * Extended session timeout for accessibility (minutes) */ readonly EXTENDED_SESSION_TIMEOUT: 120; /** * Maximum background audio level (dB) - WCAG 1.4.7 */ readonly MAX_BACKGROUND_AUDIO_LEVEL: -20; /** * Default caption offset from bottom (pixels) */ readonly DEFAULT_CAPTION_OFFSET: 50; /** * Minimum caption font size (pixels) */ readonly MIN_CAPTION_FONT_SIZE: 16; /** * Default audio description delay (milliseconds) */ readonly AUDIO_DESCRIPTION_DELAY: 100; /** * Delay before showing validation errors (milliseconds) */ readonly VALIDATION_DELAY: 1000; /** * Maximum error message length for screen readers */ readonly MAX_ERROR_MESSAGE_LENGTH: 150; /** * Minimum password length for accessibility */ readonly MIN_PASSWORD_LENGTH: 8; /** * Maximum zoom level without horizontal scrolling (percentage) */ readonly MAX_ZOOM_WITHOUT_SCROLL: 200; /** * Minimum zoom level supported (percentage) */ readonly MIN_ZOOM_LEVEL: 50; /** * Maximum zoom level supported (percentage) */ readonly MAX_ZOOM_LEVEL: 500; /** * Maximum line length for readability (characters) */ readonly MAX_LINE_LENGTH: 80; /** * Optimal line length for reading (characters) */ readonly OPTIMAL_LINE_LENGTH: 66; /** * Minimum line height for readability */ readonly MIN_LINE_HEIGHT: 1.5; /** * Maximum paragraph width for readability (pixels) */ readonly MAX_PARAGRAPH_WIDTH: 600; }; /** * ARIA roles for semantic HTML */ export declare const ARIA_ROLES: { readonly BANNER: "banner"; readonly COMPLEMENTARY: "complementary"; readonly CONTENTINFO: "contentinfo"; readonly FORM: "form"; readonly MAIN: "main"; readonly NAVIGATION: "navigation"; readonly REGION: "region"; readonly SEARCH: "search"; readonly APPLICATION: "application"; readonly ARTICLE: "article"; readonly CELL: "cell"; readonly COLUMNHEADER: "columnheader"; readonly DEFINITION: "definition"; readonly DIRECTORY: "directory"; readonly DOCUMENT: "document"; readonly FEED: "feed"; readonly FIGURE: "figure"; readonly GROUP: "group"; readonly HEADING: "heading"; readonly IMG: "img"; readonly LIST: "list"; readonly LISTITEM: "listitem"; readonly MATH: "math"; readonly NOTE: "note"; readonly PRESENTATION: "presentation"; readonly ROW: "row"; readonly ROWGROUP: "rowgroup"; readonly ROWHEADER: "rowheader"; readonly SEPARATOR: "separator"; readonly TABLE: "table"; readonly TERM: "term"; readonly ALERT: "alert"; readonly ALERTDIALOG: "alertdialog"; readonly BUTTON: "button"; readonly CHECKBOX: "checkbox"; readonly COMBOBOX: "combobox"; readonly DIALOG: "dialog"; readonly GRIDCELL: "gridcell"; readonly LINK: "link"; readonly LISTBOX: "listbox"; readonly LOG: "log"; readonly MARQUEE: "marquee"; readonly MENU: "menu"; readonly MENUBAR: "menubar"; readonly MENUITEM: "menuitem"; readonly MENUITEMCHECKBOX: "menuitemcheckbox"; readonly MENUITEMRADIO: "menuitemradio"; readonly OPTION: "option"; readonly PROGRESSBAR: "progressbar"; readonly RADIO: "radio"; readonly RADIOGROUP: "radiogroup"; readonly SCROLLBAR: "scrollbar"; readonly SEARCHBOX: "searchbox"; readonly SLIDER: "slider"; readonly SPINBUTTON: "spinbutton"; readonly STATUS: "status"; readonly SWITCH: "switch"; readonly TAB: "tab"; readonly TABLIST: "tablist"; readonly TABPANEL: "tabpanel"; readonly TEXTBOX: "textbox"; readonly TIMER: "timer"; readonly TOOLBAR: "toolbar"; readonly TOOLTIP: "tooltip"; readonly TREE: "tree"; readonly TREEGRID: "treegrid"; readonly TREEITEM: "treeitem"; readonly COMMAND: "command"; readonly COMPOSITE: "composite"; readonly INPUT: "input"; readonly LANDMARK: "landmark"; readonly RANGE: "range"; readonly ROLETYPE: "roletype"; readonly SECTION: "section"; readonly SECTIONHEAD: "sectionhead"; readonly SELECT: "select"; readonly STRUCTURE: "structure"; readonly WIDGET: "widget"; readonly WINDOW: "window"; }; /** * Common ARIA attributes */ export declare const ARIA_ATTRIBUTES: { readonly ARIA_AUTOCOMPLETE: "aria-autocomplete"; readonly ARIA_CHECKED: "aria-checked"; readonly ARIA_DISABLED: "aria-disabled"; readonly ARIA_ERRORMESSAGE: "aria-errormessage"; readonly ARIA_EXPANDED: "aria-expanded"; readonly ARIA_HASPOPUP: "aria-haspopup"; readonly ARIA_HIDDEN: "aria-hidden"; readonly ARIA_INVALID: "aria-invalid"; readonly ARIA_LABEL: "aria-label"; readonly ARIA_LEVEL: "aria-level"; readonly ARIA_MODAL: "aria-modal"; readonly ARIA_MULTILINE: "aria-multiline"; readonly ARIA_MULTISELECTABLE: "aria-multiselectable"; readonly ARIA_ORIENTATION: "aria-orientation"; readonly ARIA_PLACEHOLDER: "aria-placeholder"; readonly ARIA_PRESSED: "aria-pressed"; readonly ARIA_READONLY: "aria-readonly"; readonly ARIA_REQUIRED: "aria-required"; readonly ARIA_SELECTED: "aria-selected"; readonly ARIA_SORT: "aria-sort"; readonly ARIA_VALUEMAX: "aria-valuemax"; readonly ARIA_VALUEMIN: "aria-valuemin"; readonly ARIA_VALUENOW: "aria-valuenow"; readonly ARIA_VALUETEXT: "aria-valuetext"; readonly ARIA_LIVE: "aria-live"; readonly ARIA_ATOMIC: "aria-atomic"; readonly ARIA_RELEVANT: "aria-relevant"; readonly ARIA_BUSY: "aria-busy"; readonly ARIA_DROPEFFECT: "aria-dropeffect"; readonly ARIA_GRABBED: "aria-grabbed"; readonly ARIA_ACTIVEDESCENDANT: "aria-activedescendant"; readonly ARIA_COLCOUNT: "aria-colcount"; readonly ARIA_COLINDEX: "aria-colindex"; readonly ARIA_COLSPAN: "aria-colspan"; readonly ARIA_CONTROLS: "aria-controls"; readonly ARIA_DESCRIBEDBY: "aria-describedby"; readonly ARIA_DETAILS: "aria-details"; readonly ARIA_FLOWTO: "aria-flowto"; readonly ARIA_LABELLEDBY: "aria-labelledby"; readonly ARIA_OWNS: "aria-owns"; readonly ARIA_POSINSET: "aria-posinset"; readonly ARIA_ROWCOUNT: "aria-rowcount"; readonly ARIA_ROWINDEX: "aria-rowindex"; readonly ARIA_ROWSPAN: "aria-rowspan"; readonly ARIA_SETSIZE: "aria-setsize"; readonly ARIA_CURRENT: "aria-current"; readonly ARIA_DESCRIPTION: "aria-description"; readonly ARIA_KEYSHORTCUTS: "aria-keyshortcuts"; readonly ARIA_ROLEDESCRIPTION: "aria-roledescription"; }; /** * Keyboard navigation constants */ export declare const KEYBOARD_CODES: { readonly TAB: "Tab"; readonly ENTER: "Enter"; readonly SPACE: " "; readonly ESCAPE: "Escape"; readonly ARROW_UP: "ArrowUp"; readonly ARROW_DOWN: "ArrowDown"; readonly ARROW_LEFT: "ArrowLeft"; readonly ARROW_RIGHT: "ArrowRight"; readonly HOME: "Home"; readonly END: "End"; readonly PAGE_UP: "PageUp"; readonly PAGE_DOWN: "PageDown"; readonly TAB_KEYCODE: 9; readonly ENTER_KEYCODE: 13; readonly ESCAPE_KEYCODE: 27; readonly SPACE_KEYCODE: 32; readonly ARROW_LEFT_KEYCODE: 37; readonly ARROW_UP_KEYCODE: 38; readonly ARROW_RIGHT_KEYCODE: 39; readonly ARROW_DOWN_KEYCODE: 40; }; /** * Screen reader announcement priorities */ export declare const ANNOUNCEMENT_PRIORITY: { /** * Polite announcement - waits for current speech to finish */ readonly POLITE: "polite"; /** * Assertive announcement - interrupts current speech */ readonly ASSERTIVE: "assertive"; /** * Off - no announcement */ readonly OFF: "off"; }; /** * Focus trap configurations */ export declare const FOCUS_TRAP: { /** * Initial focus selector */ readonly INITIAL_FOCUS: "[data-focus-initial], [autofocus]"; /** * Focusable elements selector */ readonly FOCUSABLE_ELEMENTS: "a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex=\"-1\"])"; /** * Interactive elements selector */ readonly INTERACTIVE_ELEMENTS: "button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])"; /** * Skip link selector */ readonly SKIP_LINK: "[data-skip-link], .skip-link"; }; /** * Type exports */ export type A11yConstant = (typeof A11Y_CONSTANTS)[keyof typeof A11Y_CONSTANTS]; export type AriaRole = (typeof ARIA_ROLES)[keyof typeof ARIA_ROLES]; export type AriaAttribute = (typeof ARIA_ATTRIBUTES)[keyof typeof ARIA_ATTRIBUTES]; export type KeyboardCode = (typeof KEYBOARD_CODES)[keyof typeof KEYBOARD_CODES]; export type AnnouncementPriority = (typeof ANNOUNCEMENT_PRIORITY)[keyof typeof ANNOUNCEMENT_PRIORITY]; //# sourceMappingURL=constants.d.ts.map