Component Learning Guide

Comprehensive reference of automated pattern detection, lightweight tracking, and component classification across your digital estate.

Module Overview & Tracking Engine

How the system automatically discovers, tracks, and classifies unknown UI patterns during multi-engine accessibility scans.

How Component Learning Works

This module acts as a lightweight tracking database. It monitors incoming DOM patterns that the analyzer fails to recognize. If an unknown pattern appears frequently enough across the estate, the engine attempts to auto-guess its component type and saves it to a persistent JSON file for future runs.


Core Engine Capabilities

  • Pattern Discovery: Automatically flags recurring custom widgets, unmapped design system primitives, and third-party components during scan execution.
  • Frequency Thresholding: Tracks occurrence counts across multiple pages and sites to filter out isolated anomalies before triggering auto-classification.
  • Heuristic Auto-Guessing: Analyzes tag names, ARIA attributes, and structural selectors to predict whether an unknown pattern functions as a button, dropdown, dialog, or form control.
  • Persistent Storage: Saves learned definitions directly to a persistent JSON mapping file, ensuring continuous improvement and consistent categorization across subsequent audit runs.

Inspector & Editor View: User Guide

Step-by-step instructions for reviewing, verifying, and manually editing learned component definitions via the inspector interface.

1. Reviewing Unrecognized Patterns

Access the inspector view to inspect raw DOM snippets and selectors flagged by the tracking database. Review the occurrence count and frequency distribution across your scanned pages.

2. Verifying Auto-Guessed Types

Examine the engine's preliminary classification. Verify whether the component has been correctly assigned a functional category (e.g., interactive button, modal overlay, or navigation list).

3. Manual Overrides & Editing

Use the built-in editor controls to manually correct component classifications, refine selector matching rules, or assign custom tags for bespoke design system elements.

4. Committing to Persistent Storage

Save your verified adjustments directly back to the persistent JSON storage layer, ensuring future audit runs instantly recognize and correctly classify the updated component signatures.

Core Interactive Components

Fundamental building blocks for user interaction, ensuring proper keyboard operability, semantic markup, and clear focus states.

Buttons & Actions

Must use native <button> elements with clear, descriptive accessible names. Avoid styling generic divs as buttons unless explicit ARIA roles (role="button"), tab indexing, and keyboard event handlers (Space/Enter) are fully implemented.

Links & Navigation

Must use native <a href="..."> elements for navigation. Links change page location or jump to anchors, whereas buttons trigger in-page actions. Ensure link text clearly describes the destination.

Form Inputs & Labels

Every form control requires an explicit, associated <label> element using `for`/`id` association or explicit wrapping, combined with descriptive error messaging and aria-describedby attributes.

Checkboxes & Radios

Require robust label associations and keyboard toggle support. Custom-styled checkboxes must maintain visible focus rings and preserve native state semantics via ARIA attributes.

Complex & Overlay Components

Advanced UI patterns requiring precise keyboard trap management, focus containment, and ARIA state management.

Modals & Dialogs

Must trap keyboard focus within the modal dialog while open, return focus to the triggering element upon closure, support Esc-key dismissal, and hide background content using aria-hidden.

Menus & Dropdowns

Require arrow-key navigation between menu items, ESC-key closure, and proper use of ARIA attributes like aria-haspopup and aria-expanded to convey state to screen readers.

Accordions & Collapsibles

Utilize header buttons controlling collapsible panels with explicit aria-expanded states and unique ID linkages via aria-controls for reliable screen reader announcements.

Tabs & Tab Panels

Implement roving tabindex or arrow key navigation across tab headers, with explicit aria-selected states linking each tab to its corresponding tabpanel region.