fix(dashboard): pilot native dialog focus and safe dismissal
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
# MX native-dialog pilot
|
||||
|
||||
Implemented and verified locally 2026-11-13 on codex/scada-ui-consistency.
|
||||
No deployment, COM/worker interaction, real API key creation or session operation.
|
||||
|
||||
Shared Theme is exact 1.0.1, with official-source/package and served-CSS hash proof
|
||||
in `evidence/mx02/theme-package.json`. Secrets packages remain 0.6.2 pending the
|
||||
separately reviewed shared Secrets release. Blue/IBM Plex/shared semantic inks
|
||||
retain the family contract. Native dialog geometry is local pilot code, not a
|
||||
new shared package or an extraction decision.
|
||||
|
||||
The app-local NativeDialog adapter is used by existing ConfirmDialog callers and
|
||||
the API-key create form. Native showModal supplies top-layer presentation and
|
||||
background inertness. Native Tab behavior is preserved. Confirmations initially
|
||||
focus Cancel; the long create form starts on visible Key ID. Native cancel is
|
||||
prevented synchronously, then delegated to current-generation safe parent cancel
|
||||
only while idle. Busy and dispatch ownership remain in existing pages. JS receives
|
||||
DOM references, busy/generation metadata and cancel callback only: no form fields,
|
||||
key value, operation or token.
|
||||
|
||||
Lifecycle import/open/close/dispose is serialized. Changed target generations and
|
||||
disposal reject obsolete completion; interop listeners/module and DotNet reference
|
||||
are released. Client MutationObserver cleanup covers removed nodes when a lost
|
||||
circuit cannot call JS disposal. A second active native modal is refused. Focus
|
||||
returns to a usable connected trigger; otherwise the page heading gets temporary
|
||||
programmatic focus, with tabindex removed on blur. A newly claimed outside focus
|
||||
is respected. Native backdrop is the only dimming layer.
|
||||
|
||||
## Observed checks
|
||||
|
||||
- Baseline 341 dashboard tests passed. Two semantic tests failed on the old overlay,
|
||||
then 10 focused tests passed; 343 dashboard tests pass with every 341 prior test
|
||||
identity retained, no failures/skips. Framework HtmlRenderer is preserved; bUnit
|
||||
was not added. Final validation-markup adjustment has 10 focused tests plus actual
|
||||
browser rectangle verification. Full gateway tests remain for chapter acceptance.
|
||||
- Actual components and existing create form run with inert snapshots and fake
|
||||
management/auth services in an OS-port loopback host. No production providers.
|
||||
Fixture source is `host/`; build outputs are task-local /tmp artifacts.
|
||||
- First batched browser pass and one confirmation cover 1440,1024, 390 and real 200%
|
||||
zoom (720 CSS px/DPR 2). Initial focus, native modal/background inertness, keyboard
|
||||
scope, Escape/cancel, focus return and exactly one delayed synthetic confirm while
|
||||
Escape is pressed pass. No browser page errors; no document overflow. Served
|
||||
Theme CSS equals the published exact package.
|
||||
- The correction batch removed legacy forced display on the native create class,
|
||||
supplied header/body/footer padding previously inherited from Bootstrap's old
|
||||
outer modal variables, and chose the visible initial form field.
|
||||
- A focused functional regression subsequently reproduced an offscreen validation
|
||||
alert in the independently scrolling form body. Fixed non-sensitive feedback now
|
||||
stays between the header and bounded flex body. Red and green rectangle evidence
|
||||
at 1440/390/200% prove visibility; 180 Tab samples keep application focus inside the
|
||||
modal. Browser chrome samples are explicitly document.hasFocus=false.
|
||||
- Focused lifecycle checks prove requested dialog hidden during deferred import,
|
||||
disposal before completion without resurrection, reopen, connected-disabled
|
||||
trigger fallback, heading tabindex cleanup and subsequent-instance cancellation.
|
||||
|
||||
A native dialog may Tab to browser chrome; this is permitted by
|
||||
[W3C H102](https://www.w3.org/WAI/WCAG22/Techniques/html/H102). Checks distinguish
|
||||
that document-unfocused state from focus reaching an underlying application
|
||||
control. This avoids adding a custom Tab trap contrary to the native pilot plan.
|
||||
|
||||
Independent source review is retained in the umbrella's
|
||||
`components/ui-theme/validation/mx-ui/native-dialog-review.md`; the subsequent
|
||||
validation visibility fix is supported by focused browser evidence. One-time-key
|
||||
handling, policies, request construction and service interfaces are unchanged.
|
||||
Human screen-reader listening and additional browser engines are not claimed.
|
||||
OEE-02 may now implement the second native pilot; shared extraction waits for G2.
|
||||
Reference in New Issue
Block a user