18 lines
2.5 KiB
Markdown
18 lines
2.5 KiB
Markdown
# P5-15-04-A11Y-02 — Mobile navigation focus lifecycle
|
|
|
|
## Reproduction and demonstrated cause
|
|
|
|
The unchanged native reduced-motion drawer case still fails. A nonmutating test diagnostic records the actual focus attempt: MUI tries to focus the dialog while both dialog and modal ancestor have `visibility:hidden`. Focus remains on Open navigation. By the settled observation the dialog is visible, but the application's `onEntered` callback only selects a navigation item if the dialog already has focus. That condition cannot recover the failed initial attempt. Immediate Escape therefore originates outside the modal, and Tab recovery can give the focus trap a different restore target.
|
|
|
|
The instrument calls the original HTMLElement focus implementation without changing its arguments/behaviour. It records only synthetic fixture DOM states. The existing hard/soft assertions are unchanged; no sleep, skip or expected-failure marker is added. This is transition/entry handling, not evidence that all navigation permanently traps the user.
|
|
|
|
PRES-E07 remains FAIL at this RED checkpoint. A minimal successor must focus from the visible entering phase, preserve a user's already-selected internal focus, and leave MUI containment/Escape/restoration protection enabled. Human screen-reader/device acceptance remains incomplete; production remains NO-GO.
|
|
|
|
## Verified successor
|
|
|
|
The existing `onEntered` callback now also recovers focus when the active element is outside the drawer. It retains internal user-selected focus. Testing `onEntering` established that its ancestor can still be hidden; that attempted implementation was not committed. Waiting for the existing completed transition is the correct lifecycle boundary. MUI autofocus, containment, Escape and focus restoration remain enabled.
|
|
|
|
Fresh native assertions pass 2/2: keyboard opening under reduced motion selects Dashboard, Escape returns to Open navigation, and emulated touch mode/orientation navigation retains focus. The shell's three focused unit suites pass 10/10 and the production frontend build passes. One preceding run failed before exercising the drawer because a prebuilt export pointed at port 5202 instead of the fixture API at 5302; its trace establishes the setup error. The corrected native run uses the matching build, no retry, relaxed assertion or arbitrary delay.
|
|
|
|
The bounded defect is repaired. PRES-E07 can return to PARTIAL, with human screen-reader and physical-device obligations still open. This is not production or complete accessibility acceptance.
|