/** * TreeView * ======== * * A framework-agnostic, class-based implementation of the WAI-ARIA Authoring * Practices Guide (APG) "Tree View" pattern: * * https://www.w3.org/WAI/ARIA/apg/patterns/treeview/ * * Like the {@link ../accordion/Accordion Accordion}, this file is written as a * **reference / translation template**: plain, strictly-typed vanilla TypeScript * with heavy documentation so it can be hand- or AI-translated into React, Vue, * Svelte, etc. without losing any of the accessibility semantics. Prefer clarity * over cleverness here. * * --------------------------------------------------------------------------- * Accessibility contract (what the APG requires and what this class guarantees) * --------------------------------------------------------------------------- * * Roles & structure * - The root list becomes `role="tree"`. Because there is no native "tree" * element, roles are applied to semantic `