Spatial Focus Navigation

This demo implements visual 2D directional navigation across a CSS Grid with reordered and spanning items, using live bounding-rect geometry and roving tabindex focus management.

Interactive Instructions: Press Tab to focus on the first card, then use the Arrow Keys to navigate spatially across rows and columns.
Pressing arrows at boundaries (e.g. Down at the bottom cards or Up at the top cards) allows the browser to scroll the viewport natively.
[Scroll Area Above Container]
Card 1-1 Grid item, order 1, span 4
Card 1-2 Grid item, order 3, span 4
Card 1-3 Grid item, order 2, span 4
Card 2-1 (Wide) Grid item, order 2, span 6
Card 2-2 (Wide) Grid item, order 1, span 6
Card 3-1 Grid item, order 2, span 1
Card 3-2 Grid item, order 3, span 1
Card 3-3 Grid item, order 4, span 1
Card 3-4 Grid item, order 1, span 1
[Scroll Area Below Container]
System initialized. Ready for keyboard input.