UNPKG

sicua

Version:

A tool for analyzing project structure and dependencies

121 lines (120 loc) 3.58 kB
/** * Constants for accessibility analysis * Comprehensive arrays of values used across the accessibility analyzer */ /** * Complete list of HTML elements for identifying HTML vs React components */ export declare const HTML_TAGS: string[]; /** * Meaningless alt text patterns that should be flagged */ export declare const MEANINGLESS_ALT_PATTERNS: string[]; /** * Non-descriptive link text patterns that should be flagged */ export declare const NON_DESCRIPTIVE_LINK_PATTERNS: string[]; /** * Complete list of valid ARIA roles * Based on ARIA 1.2 specification */ export declare const VALID_ARIA_ROLES: string[]; /** * ARIA roles that indicate interactive elements */ export declare const INTERACTIVE_ARIA_ROLES: string[]; /** * HTML elements that are inherently interactive */ export declare const INTERACTIVE_HTML_ELEMENTS: string[]; /** * Input types that don't require labels (hidden, submit buttons, etc.) */ export declare const INPUT_TYPES_WITHOUT_LABELS: string[]; /** * ARIA attributes that should not be empty */ export declare const ARIA_LABELING_ATTRIBUTES: string[]; /** * ARIA attributes with boolean values */ export declare const ARIA_BOOLEAN_ATTRIBUTES: string[]; /** * Valid values for specific ARIA attributes */ export declare const ARIA_ATTRIBUTE_VALUES: { "aria-hidden": string[]; "aria-expanded": string[]; "aria-pressed": string[]; "aria-checked": string[]; "aria-selected": string[]; "aria-current": string[]; "aria-disabled": string[]; "aria-invalid": string[]; "aria-haspopup": string[]; "aria-live": string[]; "aria-orientation": string[]; "aria-sort": string[]; "aria-autocomplete": string[]; }; /** * Heading tags for hierarchy validation */ export declare const HEADING_TAGS: string[]; /** * Form-related elements that should have labels */ export declare const FORM_CONTROLS: string[]; /** * Elements that can contain clickable content but aren't inherently interactive */ export declare const CLICKABLE_NON_INTERACTIVE_ELEMENTS: string[]; /** * Common event handler prop names in React */ export declare const INTERACTIVE_EVENT_HANDLERS: string[]; /** * Screen reader only class patterns * Used to identify content that is visually hidden but accessible to screen readers */ export declare const SCREEN_READER_ONLY_PATTERNS: RegExp[]; /** * Hidden element class patterns * Used to identify elements that are completely hidden */ export declare const HIDDEN_ELEMENT_PATTERNS: RegExp[]; /** * Style-based hiding patterns * CSS properties that indicate hidden content */ export declare const HIDDEN_STYLE_PATTERNS: RegExp[]; /** * Common icon component patterns * Used to identify React icon components */ export declare const ICON_COMPONENT_PATTERNS: RegExp[]; /** * Icon class patterns * CSS classes that indicate icon content */ export declare const ICON_CLASS_PATTERNS: RegExp[]; /** * Decorative element tag names * Elements that are typically decorative and don't need text */ export declare const DECORATIVE_ELEMENTS: string[]; /** * Variable names that likely contain text content * Used for static analysis when we can't evaluate expressions */ export declare const TEXT_VARIABLE_PATTERNS: RegExp[]; /** * Common labeling prop names in component libraries * Props that often contain accessibility labels */ export declare const LABELING_PROP_NAMES: string[]; /** * Common spread prop patterns * Prop names that suggest spread operators containing accessibility attributes */ export declare const SPREAD_PROP_PATTERNS: string[];