Documentation
JavaScript
HoverCraft uses small, purpose-specific JavaScript files for interactive theme behavior instead of a large frontend application or general-purpose JavaScript framework.
- Theme interactions use native browser APIs for menus, overlays, full-screen search, and back-to-top behavior.
- Scripts are separated by feature so navigation, search, and other controls remain easier to audit and maintain.
- Interactive state stays synchronized with classes and accessibility attributes such as
aria-expandedandaria-hidden. - Overlay-style interfaces support practical keyboard behavior such as Escape-to-close and returning focus to the control that opened them.
- JavaScript is used only where behavior requires it; normal links, forms, and browser navigation remain native whenever possible.
- HoverCraft avoids adding jQuery merely for theme interface behavior when the same result is straightforward with native JavaScript.
JavaScript should support the theme's markup rather than replace normal HTML behavior. See Markup, Navigation, and Accessibility for related frontend behavior.