@aurodesignsystem-dev/auro-drawer 0.0.0-pr134.0 → 0.0.0-pr136.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,766 +0,0 @@
1
- <!DOCTYPE html>
2
- <!--
3
- Audit and Document Current Keyboard Behavior
4
- TRD: https://github.com/orgs/AlaskaAirlines/discussions/624
5
-
6
- USAGE
7
- -----
8
- 1. Run: npm run build && npm run dev
9
- 2. Open: http://localhost:8000/keyboard-audit.html
10
- 3. Work through each scenario using keyboard only. Check each box as you verify.
11
- 4. Screenshot or copy the results into ADO 1491978 as the Task 1 baseline.
12
-
13
- -->
14
- <html lang="en">
15
- <head>
16
- <meta charset="UTF-8" />
17
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
18
- <title>auro-drawer · Keyboard Behavior Audit (Task 1)</title>
19
-
20
- <!-- Design tokens -->
21
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@latest/dist/legacy/auro-classic/CSSCustomProperties.css" />
22
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@latest/dist/themes/alaska/CSSCustomProperties--alaska.min.css" />
23
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/bundled/themes/alaska.global.min.css" />
24
-
25
- <!-- Auro components (CDN for dependencies, local build for the drawer itself) -->
26
- <script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-button@latest/+esm" type="module"></script>
27
- <script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem-dev/auro-formkit@0.0.0-pr1346.10/auro-input/+esm" type="module"></script>
28
-
29
- <style>
30
- :root {
31
- --audit-pass: #1a6b2a;
32
- --audit-fail: #b83232;
33
- --audit-unknown: #555;
34
- font-family: "AS CircularXX", sans-serif;
35
- }
36
-
37
- body {
38
- margin: 0;
39
- padding: 24px;
40
- background: #f5f5f5;
41
- color: #1a1a1a;
42
- }
43
-
44
- h1 {
45
- font-size: 1.5rem;
46
- margin-bottom: 4px;
47
- }
48
-
49
- .subtitle {
50
- color: #555;
51
- margin-bottom: 32px;
52
- font-size: 0.9rem;
53
- }
54
-
55
- .scenario {
56
- background: #fff;
57
- border: 1px solid #ddd;
58
- border-radius: 8px;
59
- padding: 24px;
60
- margin-bottom: 32px;
61
- }
62
-
63
- .scenario h2 {
64
- margin-top: 0;
65
- font-size: 1.1rem;
66
- border-bottom: 2px solid #eee;
67
- padding-bottom: 8px;
68
- }
69
-
70
- .scenario h2 span.badge {
71
- display: inline-block;
72
- background: #0074C8;
73
- color: #fff;
74
- font-size: 0.7rem;
75
- font-weight: 700;
76
- border-radius: 4px;
77
- padding: 2px 7px;
78
- margin-right: 8px;
79
- vertical-align: middle;
80
- text-transform: uppercase;
81
- letter-spacing: 0.04em;
82
- }
83
-
84
- .scenario h2 span.badge.repro {
85
- background: #b83232;
86
- }
87
-
88
- .description {
89
- font-size: 0.875rem;
90
- color: #444;
91
- margin-bottom: 16px;
92
- padding: 10px 14px;
93
- background: #f9f9f9;
94
- border-left: 3px solid #0074C8;
95
- border-radius: 0 4px 4px 0;
96
- }
97
-
98
- .description.repro {
99
- border-left-color: #b83232;
100
- background: #fff5f5;
101
- }
102
-
103
- .trigger-zone {
104
- margin-bottom: 20px;
105
- }
106
-
107
- .checklist {
108
- margin-top: 20px;
109
- border-top: 1px solid #eee;
110
- padding-top: 16px;
111
- }
112
-
113
- .checklist h3 {
114
- font-size: 0.85rem;
115
- text-transform: uppercase;
116
- letter-spacing: 0.08em;
117
- color: #888;
118
- margin: 0 0 12px;
119
- }
120
-
121
- .checklist label {
122
- display: flex;
123
- align-items: flex-start;
124
- gap: 10px;
125
- margin-bottom: 10px;
126
- font-size: 0.875rem;
127
- cursor: pointer;
128
- }
129
-
130
- .checklist input[type="checkbox"] {
131
- margin-top: 2px;
132
- flex-shrink: 0;
133
- width: 16px;
134
- height: 16px;
135
- accent-color: var(--audit-pass);
136
- }
137
-
138
- .checklist .behavior {
139
- font-weight: 600;
140
- }
141
-
142
- .checklist .expected {
143
- color: var(--audit-pass);
144
- }
145
-
146
- .checklist .broken {
147
- color: var(--audit-fail);
148
- font-style: italic;
149
- }
150
-
151
- select.result {
152
- margin-left: auto;
153
- font-size: 0.8rem;
154
- border: 1px solid #ccc;
155
- border-radius: 4px;
156
- padding: 2px 6px;
157
- flex-shrink: 0;
158
- }
159
-
160
- .legend {
161
- display: flex;
162
- gap: 16px;
163
- font-size: 0.8rem;
164
- margin-bottom: 24px;
165
- flex-wrap: wrap;
166
- }
167
-
168
- .legend-item {
169
- display: flex;
170
- align-items: center;
171
- gap: 6px;
172
- }
173
-
174
- .dot {
175
- width: 10px;
176
- height: 10px;
177
- border-radius: 50%;
178
- flex-shrink: 0;
179
- }
180
-
181
- .dot.pass { background: var(--audit-pass); }
182
- .dot.fail { background: var(--audit-fail); }
183
- .dot.repro { background: #b83232; }
184
- .dot.standard { background: #0074C8; }
185
-
186
- .notes-area label {
187
- font-size: 0.8rem;
188
- color: #777;
189
- display: block;
190
- margin-bottom: 4px;
191
- }
192
-
193
- .at-section {
194
- background: #fff;
195
- border: 1px solid #ddd;
196
- border-radius: 8px;
197
- padding: 24px;
198
- margin-bottom: 32px;
199
- }
200
-
201
- .at-section h2 {
202
- margin-top: 0;
203
- font-size: 1.1rem;
204
- }
205
-
206
- .at-grid {
207
- display: grid;
208
- grid-template-columns: 1fr 1fr;
209
- gap: 12px;
210
- }
211
-
212
- @media (max-width: 640px) {
213
- .at-grid { grid-template-columns: 1fr; }
214
- }
215
-
216
- .at-card {
217
- border: 1px solid #eee;
218
- border-radius: 6px;
219
- padding: 12px 16px;
220
- }
221
-
222
- .at-card h4 { margin: 0 0 8px; font-size: 0.9rem; }
223
-
224
- .instructions-box {
225
- background: #fffbea;
226
- border: 1px solid #e8d96a;
227
- border-radius: 8px;
228
- padding: 16px 20px;
229
- margin-bottom: 28px;
230
- font-size: 0.875rem;
231
- }
232
-
233
- .instructions-box ol { margin: 8px 0 0; padding-left: 20px; }
234
- .instructions-box li { margin-bottom: 6px; }
235
- code { background: #eee; border-radius: 3px; padding: 1px 5px; font-size: 0.85em; }
236
- </style>
237
- </head>
238
- <body>
239
-
240
- <h1>auro-drawer — Keyboard Behavior Audit</h1>
241
- <p class="subtitle">
242
- Task 1 · TRD #624 · Baseline before any code changes · Current date: 2026-02-27
243
- </p>
244
-
245
- <div class="instructions-box">
246
- <ol>
247
- <li>Work through each scenario using <strong>keyboard only</strong> (Tab, Shift+Tab, Escape).</li>
248
- <li>Check each passing behavior. Leave unchecked anything that's broken.</li>
249
- <li>When done, screenshot or copy results into ADO 1491978 as the Task 1 baseline.</li>
250
- </ol>
251
- </div>
252
-
253
- <div class="legend">
254
- <div class="legend-item"><div class="dot standard"></div> Standard scenario</div>
255
- <div class="legend-item"><div class="dot repro"></div> Confirmed repro scenario (expected to fail pre-fix)</div>
256
- </div>
257
-
258
-
259
- <!-- ===================================================================
260
- SCENARIO 1: Standard drawer
261
- =================================================================== -->
262
- <div class="scenario">
263
- <h2><span class="badge">1</span>Standard Drawer — close button + 2 inputs + enabled button</h2>
264
- <div class="description">
265
- Baseline happy path. All interactive elements are enabled. Tab should cycle through:
266
- close button → Input 1 → Input 2 → Submit button → (wraps back to close button).
267
- </div>
268
-
269
- <div class="trigger-zone">
270
- <auro-button id="openScenario1">Open standard drawer</auro-button>
271
- </div>
272
-
273
- <auro-drawer id="scenario1Drawer">
274
- <span slot="header">Standard Drawer</span>
275
- <div slot="content">
276
- <p>Use Tab and Shift+Tab to cycle through the elements below.</p>
277
- <auro-input id="s1input1" label="First name" required></auro-input>
278
- <auro-input id="s1input2" label="Last name" style="margin-top: 16px;"></auro-input>
279
- </div>
280
- <div slot="footer">
281
- <auro-button id="closeScenario1">Submit</auro-button>
282
- </div>
283
- </auro-drawer>
284
-
285
- <div class="checklist">
286
- <h3>Keyboard Behavior Checklist</h3>
287
-
288
- <label>
289
- <input type="checkbox" />
290
- <span><span class="behavior">Open → Initial focus</span>: Focus lands on the close button (×) immediately after the drawer opens.</span>
291
- </label>
292
- <label>
293
- <input type="checkbox" />
294
- <span><span class="behavior">Tab forward</span>: Tab moves focus through close button → Input 1 → Input 2 → Submit, in order.</span>
295
- </label>
296
- <label>
297
- <input type="checkbox" />
298
- <span><span class="behavior">Tab wraps</span>: Pressing Tab from the Submit button wraps back to the close button (stays inside drawer).</span>
299
- </label>
300
- <label>
301
- <input type="checkbox" />
302
- <span><span class="behavior">Shift+Tab backward</span>: Shift+Tab reverses order correctly through all elements.</span>
303
- </label>
304
- <label>
305
- <input type="checkbox" />
306
- <span><span class="behavior">Shift+Tab wraps</span>: Pressing Shift+Tab from the close button wraps to the Submit button (stays inside drawer).</span>
307
- </label>
308
- <label>
309
- <input type="checkbox" />
310
- <span><span class="behavior">Escape closes</span>: Pressing Escape closes the drawer.</span>
311
- </label>
312
- <label>
313
- <input type="checkbox" />
314
- <span><span class="behavior">Close button click</span>: Clicking the × button closes the drawer.</span>
315
- </label>
316
- <label>
317
- <input type="checkbox" />
318
- <span><span class="behavior">Focus returns to trigger</span>: After closing, focus returns to the "Open standard drawer" button.</span>
319
- </label>
320
- </div>
321
- </div>
322
-
323
-
324
- <!-- ===================================================================
325
- SCENARIO 2: Repro A — disabled button
326
- =================================================================== -->
327
- <div class="scenario">
328
- <h2><span class="badge repro">2</span>Repro Scenario A — 2 inputs + <strong>disabled</strong> button</h2>
329
- <div class="description repro">
330
- ⚠️ <strong>Confirmed broken (ADO 1491978).</strong> The last enabled element is Input 2.
331
- The disabled Submit button should be skipped by Tab. Focus must wrap from Input 2 back to
332
- the close button — but currently escapes the drawer. Expect Tab wrapping to fail here.
333
- </div>
334
-
335
- <div class="trigger-zone">
336
- <auro-button id="openScenario2">Open drawer (disabled button)</auro-button>
337
- </div>
338
-
339
- <auro-drawer id="scenario2Drawer">
340
- <span slot="header">Drawer With Disabled Button</span>
341
- <div slot="content">
342
- <p>The Submit button below is <strong>disabled</strong>. Tab should wrap from Input 2 back to the close button.</p>
343
- <auro-input id="s2input1" label="First name" required></auro-input>
344
- <auro-input id="s2input2" label="Last name" style="margin-top: 16px;"></auro-input>
345
- </div>
346
- <div slot="footer">
347
- <auro-button disabled id="s2submit">Submit (disabled)</auro-button>
348
- </div>
349
- </auro-drawer>
350
-
351
- <div class="checklist">
352
- <h3>Keyboard Behavior Checklist</h3>
353
-
354
- <label>
355
- <input type="checkbox" />
356
- <span><span class="behavior">Open → Initial focus</span>: Focus lands on the close button.</span>
357
- </label>
358
- <label>
359
- <input type="checkbox" />
360
- <span><span class="behavior">Tab forward</span>: Tab cycles close button → Input 1 → Input 2 (disabled Submit is skipped).</span>
361
- </label>
362
- <label>
363
- <input type="checkbox" />
364
- <span><span class="behavior">Tab wraps from Input 2</span>: Tab from Input 2 wraps back to close button (does NOT escape drawer). <span class="broken">← likely failing</span></span>
365
- </label>
366
- <label>
367
- <input type="checkbox" />
368
- <span><span class="behavior">Shift+Tab backward</span>: Shift+Tab moves Input 2 → Input 1 → close button.</span>
369
- </label>
370
- <label>
371
- <input type="checkbox" />
372
- <span><span class="behavior">Shift+Tab wraps from close button</span>: Wraps to Input 2 (skips disabled Submit). <span class="broken">← likely failing</span></span>
373
- </label>
374
- <label>
375
- <input type="checkbox" />
376
- <span><span class="behavior">Escape closes</span>: Pressing Escape closes the drawer.</span>
377
- </label>
378
- <label>
379
- <input type="checkbox" />
380
- <span><span class="behavior">Focus returns to trigger</span>: After closing, focus returns to the "Open drawer (disabled button)" button.</span>
381
- </label>
382
- </div>
383
- </div>
384
-
385
-
386
- <!-- ===================================================================
387
- SCENARIO 3: Repro B — no button
388
- =================================================================== -->
389
- <div class="scenario">
390
- <h2><span class="badge repro">3</span>Repro Scenario B — 2 inputs, <strong>no footer button</strong></h2>
391
- <div class="description repro">
392
- ⚠️ <strong>Confirmed broken.</strong> No footer button at all. The last focusable element is Input 2.
393
- Tab must wrap from Input 2 to the close button. Same root cause as Scenario 2.
394
- </div>
395
-
396
- <div class="trigger-zone">
397
- <auro-button id="openScenario3">Open drawer (no button)</auro-button>
398
- </div>
399
-
400
- <auro-drawer id="scenario3Drawer">
401
- <span slot="header">Drawer With No Footer Button</span>
402
- <div slot="content">
403
- <p>There is <strong>no footer button</strong>. Tab should wrap from Input 2 back to the close button.</p>
404
- <auro-input id="s3input1" label="First name" required></auro-input>
405
- <auro-input id="s3input2" label="Last name" style="margin-top: 16px;"></auro-input>
406
- </div>
407
- </auro-drawer>
408
-
409
- <div class="checklist">
410
- <h3>Keyboard Behavior Checklist</h3>
411
-
412
- <label>
413
- <input type="checkbox" />
414
- <span><span class="behavior">Open → Initial focus</span>: Focus lands on the close button.</span>
415
- </label>
416
- <label>
417
- <input type="checkbox" />
418
- <span><span class="behavior">Tab forward</span>: Tab cycles close button → Input 1 → Input 2.</span>
419
- </label>
420
- <label>
421
- <input type="checkbox" />
422
- <span><span class="behavior">Tab wraps from Input 2</span>: Tab from Input 2 wraps to close button (does NOT escape). <span class="broken">← likely failing</span></span>
423
- </label>
424
- <label>
425
- <input type="checkbox" />
426
- <span><span class="behavior">Shift+Tab wraps from close button</span>: Wraps to Input 2. <span class="broken">← likely failing</span></span>
427
- </label>
428
- <label>
429
- <input type="checkbox" />
430
- <span><span class="behavior">Escape closes</span>: Pressing Escape closes the drawer.</span>
431
- </label>
432
- <label>
433
- <input type="checkbox" />
434
- <span><span class="behavior">Focus returns to trigger</span>: After closing, focus returns to the "Open drawer (no button)" button.</span>
435
- </label>
436
- </div>
437
- </div>
438
-
439
-
440
- <!-- ===================================================================
441
- SCENARIO 4: Modal drawer
442
- =================================================================== -->
443
- <div class="scenario">
444
- <h2><span class="badge">4</span>Modal Drawer — Escape should be suppressed</h2>
445
- <div class="description">
446
- Modal drawers do not close on Escape. The close button is hidden. The only exit is the
447
- "I understand" button in the footer. Tab should cycle within the modal content.
448
- </div>
449
-
450
- <div class="trigger-zone">
451
- <auro-button id="openScenario4">Open modal drawer</auro-button>
452
- </div>
453
-
454
- <auro-drawer id="scenario4Drawer" modal>
455
- <span slot="header">Modal Drawer</span>
456
- <div slot="content">
457
- <p>This is a modal drawer. Escape should <strong>not</strong> close it.</p>
458
- <auro-input id="s4input1" label="Required field" required></auro-input>
459
- </div>
460
- <div slot="footer">
461
- <auro-button id="closeScenario4">I understand</auro-button>
462
- </div>
463
- </auro-drawer>
464
-
465
- <div class="checklist">
466
- <h3>Keyboard Behavior Checklist</h3>
467
-
468
- <label>
469
- <input type="checkbox" />
470
- <span><span class="behavior">Open → Initial focus</span>: Focus lands on first focusable element (Input or "I understand" button).</span>
471
- </label>
472
- <label>
473
- <input type="checkbox" />
474
- <span><span class="behavior">No close button</span>: The × button is NOT rendered (modal mode hides it).</span>
475
- </label>
476
- <label>
477
- <input type="checkbox" />
478
- <span><span class="behavior">Tab cycles within modal</span>: Tab moves between Input and "I understand" only, does not escape.</span>
479
- </label>
480
- <label>
481
- <input type="checkbox" />
482
- <span><span class="behavior">Escape is blocked</span>: Pressing Escape does NOT close the modal drawer.</span>
483
- </label>
484
- <label>
485
- <input type="checkbox" />
486
- <span><span class="behavior">Footer button closes</span>: Clicking "I understand" closes the drawer.</span>
487
- </label>
488
- <label>
489
- <input type="checkbox" />
490
- <span><span class="behavior">Focus returns to trigger</span>: After close, focus returns to "Open modal drawer" button.</span>
491
- </label>
492
- </div>
493
- </div>
494
-
495
-
496
- <!-- ===================================================================
497
- SCENARIO 5: Nested drawer
498
- =================================================================== -->
499
- <div class="scenario">
500
- <h2><span class="badge">5</span>Nested Drawer — anchored inside a positioned container</h2>
501
- <div class="description">
502
- The nested drawer renders inside its parent container (not in the top layer).
503
- Focus should be contained within the nested drawer while it is open.
504
- The nested drawer uses its own FocusTrap since it can't use <code>showModal()</code>.
505
- </div>
506
-
507
- <div style="height: 420px; position: relative; border: 2px dashed #ccc; border-radius: 8px; overflow: hidden; margin-bottom: 12px;">
508
- <div style="padding: 16px;">
509
- <auro-button id="openScenario5">Open nested drawer</auro-button>
510
- </div>
511
- <auro-drawer id="scenario5Drawer" nested>
512
- <span slot="header">Nested Drawer</span>
513
- <div slot="content">
514
- <p>Nested inside a positioned container. Focus should be trapped within this drawer.</p>
515
- <auro-input id="s5input1" label="First name"></auro-input>
516
- <auro-input id="s5input2" label="Last name" style="margin-top: 16px;"></auro-input>
517
- </div>
518
- <div slot="footer">
519
- <auro-button secondary id="closeScenario5">Close</auro-button>
520
- </div>
521
- </auro-drawer>
522
- </div>
523
-
524
- <div class="checklist">
525
- <h3>Keyboard Behavior Checklist</h3>
526
-
527
- <label>
528
- <input type="checkbox" />
529
- <span><span class="behavior">Open → Initial focus</span>: Focus lands on the close button.</span>
530
- </label>
531
- <label>
532
- <input type="checkbox" />
533
- <span><span class="behavior">Tab forward</span>: Tab cycles close button → Input 1 → Input 2 → Close (footer).</span>
534
- </label>
535
- <label>
536
- <input type="checkbox" />
537
- <span><span class="behavior">Tab wraps</span>: Tab from Close (footer) wraps back to close button.</span>
538
- </label>
539
- <label>
540
- <input type="checkbox" />
541
- <span><span class="behavior">Shift+Tab backward</span>: Reverse order, wraps correctly.</span>
542
- </label>
543
- <label>
544
- <input type="checkbox" />
545
- <span><span class="behavior">Escape closes</span>: Pressing Escape closes the nested drawer.</span>
546
- </label>
547
- <label>
548
- <input type="checkbox" />
549
- <span><span class="behavior">Focus returns to trigger</span>: After closing, focus returns to "Open nested drawer" button.</span>
550
- </label>
551
- </div>
552
- </div>
553
-
554
-
555
- <!-- ===================================================================
556
- SCENARIO 6: Unformatted drawer (no close button)
557
- =================================================================== -->
558
- <div class="scenario">
559
- <h2><span class="badge">6</span>Unformatted Drawer — no header, no close button</h2>
560
- <div class="description">
561
- The <code>unformatted</code> attribute removes the header/footer chrome including the close button.
562
- The only focusable elements are those slotted in by the consumer. Escape should still close it.
563
- </div>
564
-
565
- <div class="trigger-zone">
566
- <auro-button id="openScenario6">Open unformatted drawer</auro-button>
567
- </div>
568
-
569
- <auro-drawer id="scenario6Drawer" unformatted>
570
- <div slot="content" style="padding: 24px;">
571
- <p><strong>Unformatted drawer</strong> — no built-in close button or header.</p>
572
- <auro-input id="s6input1" label="First input"></auro-input>
573
- <auro-input id="s6input2" label="Second input" style="margin-top: 16px;"></auro-input>
574
- <div style="margin-top: 16px;">
575
- <auro-button id="closeScenario6">Done</auro-button>
576
- </div>
577
- </div>
578
- </auro-drawer>
579
-
580
- <div class="checklist">
581
- <h3>Keyboard Behavior Checklist</h3>
582
-
583
- <label>
584
- <input type="checkbox" />
585
- <span><span class="behavior">Open → Initial focus</span>: Focus lands on Input 1 (first focusable; no close button exists).</span>
586
- </label>
587
- <label>
588
- <input type="checkbox" />
589
- <span><span class="behavior">Tab forward</span>: Tab cycles Input 1 → Input 2 → Done button.</span>
590
- </label>
591
- <label>
592
- <input type="checkbox" />
593
- <span><span class="behavior">Tab wraps</span>: Tab from Done wraps back to Input 1 (stays inside drawer).</span>
594
- </label>
595
- <label>
596
- <input type="checkbox" />
597
- <span><span class="behavior">Shift+Tab wraps</span>: Shift+Tab from Input 1 wraps to Done button.</span>
598
- </label>
599
- <label>
600
- <input type="checkbox" />
601
- <span><span class="behavior">Escape closes</span>: Pressing Escape closes the drawer. (N/A if Escape is intentionally disabled in unformatted mode — note which.)</span>
602
- </label>
603
- <label>
604
- <input type="checkbox" />
605
- <span><span class="behavior">Focus returns to trigger</span>: After closing, focus returns to "Open unformatted drawer" button.</span>
606
- </label>
607
- </div>
608
- </div>
609
-
610
-
611
- <!-- ===================================================================
612
- SCENARIO 7: auro-drawer with native HTML inputs + button
613
- =================================================================== -->
614
- <div class="scenario">
615
- <h2><span class="badge">7</span>auro-drawer with <strong>native HTML</strong> inputs + button</h2>
616
- <div class="description">
617
- Same auro-drawer shell as Scenario 1, but the form elements are plain
618
- <code>&lt;input&gt;</code> and <code>&lt;button&gt;</code> — no web
619
- components inside the content. Use this to isolate whether focus-ring
620
- visibility issues are caused by auro-input/auro-button or by the drawer
621
- itself.
622
- </div>
623
-
624
- <div class="trigger-zone">
625
- <auro-button id="openScenario7">Open drawer (native inputs)</auro-button>
626
- </div>
627
-
628
- <auro-drawer id="scenario7Drawer">
629
- <span slot="header">Drawer — Native Inputs</span>
630
- <div slot="content">
631
- <p>These are plain <code>&lt;input&gt;</code> elements, not auro-input.</p>
632
- <div style="margin-bottom: 16px;">
633
- <label for="s7input1" style="display:block; margin-bottom:4px; font-size:0.875rem;">First name</label>
634
- <input id="s7input1" type="text" style="width:100%; padding:8px; font-size:1rem; box-sizing:border-box;" />
635
- </div>
636
- <div>
637
- <label for="s7input2" style="display:block; margin-bottom:4px; font-size:0.875rem;">Last name</label>
638
- <input id="s7input2" type="text" style="width:100%; padding:8px; font-size:1rem; box-sizing:border-box;" />
639
- </div>
640
- </div>
641
- <div slot="footer">
642
- <button id="closeScenario7" style="padding:8px 20px; font-size:1rem; cursor:pointer;">Submit</button>
643
- </div>
644
- </auro-drawer>
645
-
646
- <div class="checklist">
647
- <h3>Keyboard Behavior Checklist</h3>
648
- <label>
649
- <input type="checkbox" />
650
- <span><span class="behavior">Open → Initial focus</span>: Focus lands on the close button (×).</span>
651
- </label>
652
- <label>
653
- <input type="checkbox" />
654
- <span><span class="behavior">Tab forward</span>: Tab moves close button → Input 1 → Input 2 → Submit.</span>
655
- </label>
656
- <label>
657
- <input type="checkbox" />
658
- <span><span class="behavior">Tab wraps</span>: Tab from Submit wraps back to close button.</span>
659
- </label>
660
- <label>
661
- <input type="checkbox" />
662
- <span><span class="behavior">Shift+Tab backward</span>: Reverse order works correctly.</span>
663
- </label>
664
- <label>
665
- <input type="checkbox" />
666
- <span><span class="behavior">Escape closes</span>: Pressing Escape closes the drawer.</span>
667
- </label>
668
- <label>
669
- <input type="checkbox" />
670
- <span><span class="behavior">Focus returns to trigger</span>: After closing, focus returns to the trigger button.</span>
671
- </label>
672
- </div>
673
- </div>
674
-
675
-
676
- <!-- ===================================================================
677
- ASSISTIVE TECHNOLOGY
678
- =================================================================== -->
679
- <div class="at-section">
680
- <h2>Assistive Technology Testing</h2>
681
- <p style="font-size: 0.875rem; color: #555; margin-bottom: 16px;">Test with each available AT. Use Scenario 1 (standard) and Scenario 2 (repro / disabled button) at minimum.</p>
682
- <div class="at-grid">
683
- <div class="at-card">
684
- <h4>VoiceOver + Safari (macOS)</h4>
685
- <label style="display:flex; gap:8px; align-items:center; font-size:0.875rem; margin-bottom:8px;">
686
- <input type="checkbox" /> Cursor confined while drawer is open
687
- </label>
688
- <label style="display:flex; gap:8px; align-items:center; font-size:0.875rem; margin-bottom:8px;">
689
- <input type="checkbox" /> Drawer title announced on open
690
- </label>
691
- <label style="display:flex; gap:8px; align-items:center; font-size:0.875rem;">
692
- <input type="checkbox" /> "dialog" role announced
693
- </label>
694
- </div>
695
- <div class="at-card">
696
- <h4>VoiceOver + Safari (iOS)</h4>
697
- <label style="display:flex; gap:8px; align-items:center; font-size:0.875rem; margin-bottom:8px;">
698
- <input type="checkbox" /> Cursor confined while drawer is open
699
- </label>
700
- <label style="display:flex; gap:8px; align-items:center; font-size:0.875rem; margin-bottom:8px;">
701
- <input type="checkbox" /> Touch scroll inside drawer works (page doesn't scroll behind)
702
- </label>
703
- <label style="display:flex; gap:8px; align-items:center; font-size:0.875rem;">
704
- <input type="checkbox" /> Virtual keyboard doesn't jump page layout
705
- </label>
706
- </div>
707
- <div class="at-card">
708
- <h4>NVDA + Chrome (Windows)</h4>
709
- <label style="display:flex; gap:8px; align-items:center; font-size:0.875rem; margin-bottom:8px;">
710
- <input type="checkbox" /> Cursor confined while drawer is open
711
- </label>
712
- <label style="display:flex; gap:8px; align-items:center; font-size:0.875rem;">
713
- <input type="checkbox" /> Drawer title announced on open
714
- </label>
715
- </div>
716
- <div class="at-card">
717
- <h4>TalkBack + Chrome (Android)</h4>
718
- <label style="display:flex; gap:8px; align-items:center; font-size:0.875rem; margin-bottom:8px;">
719
- <input type="checkbox" /> Cursor confined while drawer is open
720
- </label>
721
- <label style="display:flex; gap:8px; align-items:center; font-size:0.875rem; margin-bottom:8px;">
722
- <input type="checkbox" /> Touch scroll inside drawer works
723
- </label>
724
- <label style="display:flex; gap:8px; align-items:center; font-size:0.875rem;">
725
- <input type="checkbox" /> Virtual keyboard doesn't jump page layout
726
- </label>
727
- </div>
728
- </div>
729
- </div>
730
-
731
-
732
- <!-- Local build of auro-drawer -->
733
- <script type="module" src="./index.min.js"></script>
734
-
735
- <script type="module">
736
- // Set triggerElement once after elements upgrade so AuroFloatingUI can
737
- // register its own click listener. Do NOT also call setAttribute('open')
738
- // here — that would fight AuroFloatingUI's toggle handler and prevent
739
- // the drawer from reopening on the second click.
740
- function wireDrawer(openBtnId, drawerId, closeBtnId) {
741
- const openBtn = document.getElementById(openBtnId);
742
- const drawer = document.getElementById(drawerId);
743
-
744
- if (!openBtn || !drawer) return;
745
-
746
- drawer.triggerElement = openBtn;
747
-
748
- if (closeBtnId) {
749
- const closeBtn = document.getElementById(closeBtnId);
750
- if (closeBtn) {
751
- closeBtn.addEventListener('click', () => drawer.removeAttribute('open'));
752
- }
753
- }
754
- }
755
-
756
- wireDrawer('openScenario1', 'scenario1Drawer', 'closeScenario1');
757
- wireDrawer('openScenario2', 'scenario2Drawer', null);
758
- wireDrawer('openScenario3', 'scenario3Drawer', null);
759
- wireDrawer('openScenario4', 'scenario4Drawer', 'closeScenario4');
760
- wireDrawer('openScenario5', 'scenario5Drawer', 'closeScenario5');
761
- wireDrawer('openScenario6', 'scenario6Drawer', 'closeScenario6');
762
- wireDrawer('openScenario7', 'scenario7Drawer', 'closeScenario7');
763
- </script>
764
-
765
- </body>
766
- </html>