Bug 70: Focus — Focus Order Not Logical

WCAG 2.4.3 (Focus Order) | Tab order doesn't match visual/reading order (misuse of tabindex).

Bug: Positive tabindex Values

Try tabbing through (focus order may jump around):

Focus jumps: Input 1 → Input 2 → Button, confusing order.

Bug: Multiple Elements with tabindex="0"

Elements with mix of tabindex="0" and positive values create unpredictable focus order.

Bug: CSS Reordered But tabindex Not Updated

Visually buttons appear right-to-left, but tab order goes left-to-right (DOM order).

Bug: Hidden Elements Still Focusable

Focus may jump to invisible elements with tabindex.

Bug: Modal Without Focus Trap

When a modal dialog opens, keyboard focus should be trapped within it. HAL ensures tabindex and focus management keeps users within modal.

How HAL Fixes This: HAL removes or refactors positive tabindex values (1, 2, 3...). HAL restructures DOM order to match visual order when needed. HAL ensures focus order is: top-to-bottom, left-to-right, matching reading order. HAL handles focus traps for modals/overlays. HAL ensures hidden/disabled elements aren't focusable.