@aurodesignsystem-dev/auro-formkit 0.0.0-pr1488.2 → 0.0.0-pr1489.1
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.
- package/components/bibtemplate/dist/auro-bibtemplate.d.ts +7 -0
- package/components/bibtemplate/dist/index.js +9 -1
- package/components/bibtemplate/dist/registered.js +9 -1
- package/components/checkbox/demo/customize.min.js +1 -1
- package/components/checkbox/demo/getting-started.min.js +1 -1
- package/components/checkbox/demo/index.min.js +1 -1
- package/components/checkbox/demo/pages.json +1 -1
- package/components/checkbox/demo/why-checkbox.html +57 -0
- package/components/checkbox/demo/why-checkbox.md +86 -0
- package/components/checkbox/dist/index.js +1 -1
- package/components/checkbox/dist/registered.js +1 -1
- package/components/combobox/demo/customize.min.js +234 -16
- package/components/combobox/demo/getting-started.min.js +234 -16
- package/components/combobox/demo/index.min.js +234 -16
- package/components/combobox/demo/pages.json +1 -1
- package/components/combobox/demo/why-combobox.html +57 -0
- package/components/combobox/demo/why-combobox.md +113 -0
- package/components/combobox/dist/index.js +234 -16
- package/components/combobox/dist/registered.js +234 -16
- package/components/counter/demo/customize.min.js +233 -15
- package/components/counter/demo/index.min.js +233 -15
- package/components/counter/demo/keyboard-behavior.md +1 -0
- package/components/counter/demo/pages.json +1 -1
- package/components/counter/demo/why-counter.html +57 -0
- package/components/counter/demo/why-counter.md +108 -0
- package/components/counter/dist/index.js +22 -241
- package/components/counter/dist/registered.js +10 -2
- package/components/datepicker/demo/accessibility.md +51 -3
- package/components/datepicker/demo/api.md +11 -2
- package/components/datepicker/demo/customize.html +2 -0
- package/components/datepicker/demo/customize.js +19 -0
- package/components/datepicker/demo/customize.md +72 -8
- package/components/datepicker/demo/customize.min.js +26029 -0
- package/components/datepicker/demo/design.md +3 -1
- package/components/datepicker/demo/index.js +5 -1
- package/components/datepicker/demo/index.md +83 -2
- package/components/datepicker/demo/index.min.js +1564 -96
- package/components/datepicker/demo/keyboard-behavior.md +201 -2
- package/components/datepicker/demo/pages.json +1 -1
- package/components/datepicker/demo/voiceover.md +19 -12
- package/components/datepicker/demo/why-datepicker.html +57 -0
- package/components/datepicker/demo/why-datepicker.md +133 -0
- package/components/datepicker/dist/index.js +1489 -97
- package/components/datepicker/dist/registered.js +1489 -97
- package/components/datepicker/dist/src/auro-calendar-cell.d.ts +66 -1
- package/components/datepicker/dist/src/auro-calendar-month.d.ts +28 -0
- package/components/datepicker/dist/src/auro-calendar.d.ts +100 -0
- package/components/datepicker/dist/src/auro-datepicker.d.ts +88 -0
- package/components/datepicker/dist/src/datepickerKeyboardStrategy.d.ts +5 -3
- package/components/dropdown/demo/accessibility.md +11 -0
- package/components/dropdown/demo/api.md +1 -0
- package/components/dropdown/demo/customize.md +3 -0
- package/components/dropdown/demo/customize.min.js +223 -13
- package/components/dropdown/demo/getting-started.min.js +223 -13
- package/components/dropdown/demo/index.min.js +223 -13
- package/components/dropdown/demo/keyboard-behavior.md +1 -0
- package/components/dropdown/demo/pages.json +1 -1
- package/components/dropdown/demo/why-dropdown.html +57 -0
- package/components/dropdown/demo/why-dropdown.md +97 -0
- package/components/dropdown/dist/auro-dropdown.d.ts +33 -1
- package/components/dropdown/dist/index.js +223 -13
- package/components/dropdown/dist/registered.js +223 -13
- package/components/form/demo/customize.min.js +2461 -415
- package/components/form/demo/getting-started.min.js +2461 -415
- package/components/form/demo/index.min.js +2461 -415
- package/components/form/demo/pages.json +1 -1
- package/components/form/demo/registerDemoDeps.min.js +2457 -411
- package/components/form/demo/why-form.html +57 -0
- package/components/form/demo/why-form.md +101 -0
- package/components/input/demo/customize.min.js +1 -1
- package/components/input/demo/getting-started.min.js +1 -1
- package/components/input/demo/index.min.js +1 -1
- package/components/input/demo/pages.json +1 -1
- package/components/input/demo/why-input.html +57 -0
- package/components/input/demo/why-input.md +121 -0
- package/components/input/dist/index.js +1 -1
- package/components/input/dist/registered.js +1 -1
- package/components/menu/demo/pages.json +1 -1
- package/components/menu/demo/why-menu.html +57 -0
- package/components/menu/demo/why-menu.md +104 -0
- package/components/radio/demo/customize.min.js +2186 -0
- package/components/radio/demo/demo-support.min.js +55807 -0
- package/components/radio/demo/getting-started.js +1 -1
- package/components/radio/demo/getting-started.md +1 -1
- package/components/radio/demo/getting-started.min.js +2205 -0
- package/components/radio/demo/index.min.js +1 -1
- package/components/radio/demo/pages.json +1 -1
- package/components/radio/demo/why-radio.html +57 -0
- package/components/radio/demo/why-radio.md +92 -0
- package/components/radio/dist/index.js +1 -1
- package/components/radio/dist/registered.js +1 -1
- package/components/select/demo/customize.min.js +233 -15
- package/components/select/demo/getting-started.min.js +233 -15
- package/components/select/demo/index.min.js +233 -15
- package/components/select/demo/keyboard-behavior.md +1 -0
- package/components/select/demo/pages.json +1 -1
- package/components/select/demo/why-select.html +57 -0
- package/components/select/demo/why-select.md +128 -0
- package/components/select/dist/index.js +233 -15
- package/components/select/dist/registered.js +233 -15
- package/custom-elements.json +2183 -1466
- package/package.json +2 -2
|
@@ -11,9 +11,208 @@
|
|
|
11
11
|
<p>Each focusable element <em>(when shown)</em> participates in the browser window's default <code>tabindex</code> sequence.</p>
|
|
12
12
|
<p>When the component is <code>disabled</code> it is removed from the <code>tabindex</code> sequence. VoiceOver's virtual cursor <em>(swipe navigation)</em> can still encounter the component, but standard keyboard <code>Tab</code> navigation skips it.</p>
|
|
13
13
|
<div class="note">
|
|
14
|
-
<p><strong>Note:</strong> The
|
|
15
|
-
<p>The current implementation of the component <strong>DOES</strong> support using the keyboard to navigate the trigger and type dates via the keyboard. It <strong>DOES NOT</strong> support navigating the bib content and calendar via the keyboard. This functionality is scheduled to be added in the next major redesign of the component.</p>
|
|
14
|
+
<p><strong>Note:</strong> The datepicker supports full interaction via touch, click, VoiceOver, and keyboard. The trigger input accepts typed dates, and the calendar bib supports arrow-key navigation between date cells, Enter/Space to select, and Escape to close.</p>
|
|
16
15
|
</div>
|
|
16
|
+
<auro-header level="3" id="keyEventsCounterGroup">Key Events</auro-header>
|
|
17
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../docs/partials/keyEvents.md) -->
|
|
18
|
+
<!-- The below content is automatically added from ./../docs/partials/keyEvents.md -->
|
|
19
|
+
<auro-header level="3" id="keyEvents-trigger">Trigger input</auro-header>
|
|
20
|
+
<table>
|
|
21
|
+
<thead>
|
|
22
|
+
<tr>
|
|
23
|
+
<th>Key</th>
|
|
24
|
+
<th>Modifier</th>
|
|
25
|
+
<th>Current State</th>
|
|
26
|
+
<th>Focus Element</th>
|
|
27
|
+
<th>Behavior</th>
|
|
28
|
+
</tr>
|
|
29
|
+
</thead>
|
|
30
|
+
<tbody>
|
|
31
|
+
<tr>
|
|
32
|
+
<td>Enter</td>
|
|
33
|
+
<td>-</td>
|
|
34
|
+
<td>Collapsed</td>
|
|
35
|
+
<td>Trigger input, <strong>NOT</strong> the input clear button</td>
|
|
36
|
+
<td>Opens the calendar bib. Focus moves to the active date cell inside the calendar grid. The Enter key behavior overrides the inherited <code>auro-dropdown</code> key behavior outlined below.</td>
|
|
37
|
+
</tr>
|
|
38
|
+
<tr>
|
|
39
|
+
<td>Space</td>
|
|
40
|
+
<td>-</td>
|
|
41
|
+
<td>Collapsed</td>
|
|
42
|
+
<td>Trigger input, <strong>NOT</strong> the input clear button</td>
|
|
43
|
+
<td>Opens the calendar bib. Focus moves to the active date cell inside the calendar grid. The Space key behavior overrides the inherited <code>auro-dropdown</code> key behavior outlined below.</td>
|
|
44
|
+
</tr>
|
|
45
|
+
</tbody>
|
|
46
|
+
</table>
|
|
47
|
+
<auro-header level="3" id="keyEvents-calendar">Calendar</auro-header>
|
|
48
|
+
<table>
|
|
49
|
+
<thead>
|
|
50
|
+
<tr>
|
|
51
|
+
<th>Key</th>
|
|
52
|
+
<th>Modifier</th>
|
|
53
|
+
<th>Current State</th>
|
|
54
|
+
<th>Focus Element</th>
|
|
55
|
+
<th>Behavior</th>
|
|
56
|
+
</tr>
|
|
57
|
+
</thead>
|
|
58
|
+
<tbody>
|
|
59
|
+
<tr>
|
|
60
|
+
<td rowspan="3">Enter</td>
|
|
61
|
+
<td rowspan="3">-</td>
|
|
62
|
+
<td rowspan="3">Expanded</td>
|
|
63
|
+
<td>Previous Month Button</td>
|
|
64
|
+
<td>Re-renders the calendar to show the previous month</td>
|
|
65
|
+
</tr>
|
|
66
|
+
<tr>
|
|
67
|
+
<td>Next Month Button</td>
|
|
68
|
+
<td>Re-renders the calendar to show the next month</td>
|
|
69
|
+
</tr>
|
|
70
|
+
<tr>
|
|
71
|
+
<td>Done button</td>
|
|
72
|
+
<td>Collapses the bib.</td>
|
|
73
|
+
</tr>
|
|
74
|
+
<tr>
|
|
75
|
+
<td rowspan="3">Space</td>
|
|
76
|
+
<td rowspan="3">-</td>
|
|
77
|
+
<td rowspan="3">Expanded</td>
|
|
78
|
+
<td>Previous Month Button</td>
|
|
79
|
+
<td>Re-renders the calendar to show the previous month</td>
|
|
80
|
+
</tr>
|
|
81
|
+
<tr>
|
|
82
|
+
<td>Next Month Button</td>
|
|
83
|
+
<td>Re-renders the calendar to show the next month</td>
|
|
84
|
+
</tr>
|
|
85
|
+
<tr>
|
|
86
|
+
<td>Done button</td>
|
|
87
|
+
<td>Collapses the bib.</td>
|
|
88
|
+
</tr>
|
|
89
|
+
</tbody>
|
|
90
|
+
</table>
|
|
91
|
+
<auro-header level="3" id="keyEvents-calendarGrid">Calendar grid</auro-header>
|
|
92
|
+
<p>When the calendar bib is open, one date cell is the <em>active</em> cell (roving <code>tabindex="0"</code>). All other cells have <code>tabindex="-1"</code>. Arrow keys move the active cell without wrapping — when a boundary is reached the calendar navigates to the adjacent month.</p>
|
|
93
|
+
<table>
|
|
94
|
+
<thead>
|
|
95
|
+
<tr>
|
|
96
|
+
<th>Key</th>
|
|
97
|
+
<th>Modifier</th>
|
|
98
|
+
<th>Current State</th>
|
|
99
|
+
<th>Focus Element</th>
|
|
100
|
+
<th>Behavior</th>
|
|
101
|
+
</tr>
|
|
102
|
+
</thead>
|
|
103
|
+
<tbody>
|
|
104
|
+
<tr>
|
|
105
|
+
<td>ArrowRight</td>
|
|
106
|
+
<td>-</td>
|
|
107
|
+
<td>Expanded</td>
|
|
108
|
+
<td>Any date cell</td>
|
|
109
|
+
<td>Moves focus to the next day. If at the end of the month, navigates to the first focusable day of the next month.</td>
|
|
110
|
+
</tr>
|
|
111
|
+
<tr>
|
|
112
|
+
<td>ArrowLeft</td>
|
|
113
|
+
<td>-</td>
|
|
114
|
+
<td>Expanded</td>
|
|
115
|
+
<td>Any date cell</td>
|
|
116
|
+
<td>Moves focus to the previous day. If at the start of the month, navigates to the last focusable day of the previous month.</td>
|
|
117
|
+
</tr>
|
|
118
|
+
<tr>
|
|
119
|
+
<td>ArrowDown</td>
|
|
120
|
+
<td>-</td>
|
|
121
|
+
<td>Expanded</td>
|
|
122
|
+
<td>Any date cell</td>
|
|
123
|
+
<td>Moves focus to the same day of the week in the next week (+7 days). Navigates to the next month if needed.</td>
|
|
124
|
+
</tr>
|
|
125
|
+
<tr>
|
|
126
|
+
<td>ArrowUp</td>
|
|
127
|
+
<td>-</td>
|
|
128
|
+
<td>Expanded</td>
|
|
129
|
+
<td>Any date cell</td>
|
|
130
|
+
<td>Moves focus to the same day of the week in the previous week (−7 days). Navigates to the previous month if needed.</td>
|
|
131
|
+
</tr>
|
|
132
|
+
<tr>
|
|
133
|
+
<td>Enter / Space</td>
|
|
134
|
+
<td>-</td>
|
|
135
|
+
<td>Expanded</td>
|
|
136
|
+
<td>Any date cell</td>
|
|
137
|
+
<td>Selects the focused date. Blackout dates receive focus but cannot be selected.</td>
|
|
138
|
+
</tr>
|
|
139
|
+
<tr>
|
|
140
|
+
<td>Escape</td>
|
|
141
|
+
<td>-</td>
|
|
142
|
+
<td>Expanded</td>
|
|
143
|
+
<td>Any date cell</td>
|
|
144
|
+
<td>Closes the calendar bib and returns focus to the trigger input.</td>
|
|
145
|
+
</tr>
|
|
146
|
+
<tr>
|
|
147
|
+
<td>Tab</td>
|
|
148
|
+
<td>-</td>
|
|
149
|
+
<td>Expanded</td>
|
|
150
|
+
<td>Any date cell</td>
|
|
151
|
+
<td>Moves focus to the next focusable element outside the calendar grid (e.g., month navigation buttons or the close button in fullscreen mode).</td>
|
|
152
|
+
</tr>
|
|
153
|
+
</tbody>
|
|
154
|
+
</table>
|
|
155
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
156
|
+
<auro-header level="4" id="keyEventsDropdown">Key Events inherited from Auro-Dropdown</auro-header>
|
|
157
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../../dropdown/docs/partials/keyEvents.md) -->
|
|
158
|
+
<!-- The below content is automatically added from ./../../dropdown/docs/partials/keyEvents.md -->
|
|
159
|
+
<table>
|
|
160
|
+
<thead>
|
|
161
|
+
<tr>
|
|
162
|
+
<th>Key</th>
|
|
163
|
+
<th>Modifier</th>
|
|
164
|
+
<th>Current State</th>
|
|
165
|
+
<th>Focus Element</th>
|
|
166
|
+
<th>Behavior</th>
|
|
167
|
+
</tr>
|
|
168
|
+
</thead>
|
|
169
|
+
<tbody>
|
|
170
|
+
<tr>
|
|
171
|
+
<td rowspan="2">Enter</td>
|
|
172
|
+
<td>-</td>
|
|
173
|
+
<td>Collapsed</td>
|
|
174
|
+
<td>
|
|
175
|
+
Trigger or any <strong>focusable</strong> element within the trigger.
|
|
176
|
+
</td>
|
|
177
|
+
<td>Opens the bib.</td>
|
|
178
|
+
</tr>
|
|
179
|
+
<tr>
|
|
180
|
+
<td>-</td>
|
|
181
|
+
<td>Expanded</td>
|
|
182
|
+
<td>
|
|
183
|
+
Trigger or any <strong>focusable</strong> element within the trigger.
|
|
184
|
+
</td>
|
|
185
|
+
<td>Closes the bib.</td>
|
|
186
|
+
</tr>
|
|
187
|
+
<tr>
|
|
188
|
+
<td>Escape</td>
|
|
189
|
+
<td>-</td>
|
|
190
|
+
<td>Expanded</td>
|
|
191
|
+
<td>
|
|
192
|
+
Component <code>:host</code> or any <strong>focusable</strong> element within the component.
|
|
193
|
+
</td>
|
|
194
|
+
<td>Closes the bib.</td>
|
|
195
|
+
</tr>
|
|
196
|
+
<tr>
|
|
197
|
+
<td rowspan="2">Space</td>
|
|
198
|
+
<td>-</td>
|
|
199
|
+
<td>Collapsed</td>
|
|
200
|
+
<td>
|
|
201
|
+
Trigger or any <strong>focusable</strong> element within the trigger.
|
|
202
|
+
</td>
|
|
203
|
+
<td>Opens the bib.</td>
|
|
204
|
+
</tr>
|
|
205
|
+
<tr>
|
|
206
|
+
<td>-</td>
|
|
207
|
+
<td>Expanded</td>
|
|
208
|
+
<td>
|
|
209
|
+
Trigger or any <strong>focusable</strong> element within the trigger.
|
|
210
|
+
</td>
|
|
211
|
+
<td>Closes the bib.</td>
|
|
212
|
+
</tr>
|
|
213
|
+
</tbody>
|
|
214
|
+
</table>
|
|
215
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
17
216
|
</div>
|
|
18
217
|
</div>
|
|
19
218
|
</div>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
["accessibility.md","api.md","customize.md","design.md","getting-started.md","index.md","keyboard-behavior.md","voiceover.md","readme.md"]
|
|
1
|
+
["accessibility.md","api.md","customize.md","design.md","getting-started.md","index.md","keyboard-behavior.md","voiceover.md","why-datepicker.md","readme.md"]
|
|
@@ -37,12 +37,19 @@
|
|
|
37
37
|
<auro-header level="3" id="voiceOverClearButton">Clear Button</auro-header>
|
|
38
38
|
<p>When the clear button is focused, VoiceOver announces the <code>aria-label</code> from the <code>ariaLabel.input.clear</code> slot (or the default i18n text), followed by <em>"button"</em>.</p>
|
|
39
39
|
<auro-header level="3" id="voiceOverCalendarNavigation">Calendar Navigation</auro-header>
|
|
40
|
-
<p>When the calendar bib is open, users can navigate calendar cells using VoiceOver gestures (swipe left/right). Each cell announces:</p>
|
|
40
|
+
<p>When the calendar bib is open, users can navigate calendar cells using VoiceOver gestures (swipe left/right) or arrow keys. Each cell announces:</p>
|
|
41
41
|
<ul>
|
|
42
|
-
<li>The date (e.g. <em>"
|
|
43
|
-
<li>
|
|
44
|
-
<li>
|
|
45
|
-
</
|
|
42
|
+
<li>The full localized date (e.g. <em>"Thursday, May 14, 2026"</em>)</li>
|
|
43
|
+
<li>Range position when in range mode (e.g. <em>", range start"</em>, <em>", in range"</em>, <em>", before range"</em>)</li>
|
|
44
|
+
<li><em>", unavailable"</em> for blackout dates (dates within the min/max range that are explicitly disabled)</li>
|
|
45
|
+
<li><em>"current date"</em> for today's date (via <code>aria-current="date"</code>)</li>
|
|
46
|
+
<li>Selection state: <em>"selected"</em> or not (via <code>aria-selected</code>)</li>
|
|
47
|
+
</ul>
|
|
48
|
+
<p>Out-of-range cells (outside min/max bounds) are completely hidden from VoiceOver with <code>aria-hidden="true"</code>.</p>
|
|
49
|
+
<auro-header level="3" id="voiceOverDateSelection">Date Selection</auro-header>
|
|
50
|
+
<p>When a date is selected, an <code>aria-live="assertive"</code> region announces the selected date (e.g. <em>"Thursday, May 14, 2026"</em>). For range datepickers, both the start and end selections are announced.</p>
|
|
51
|
+
<auro-header level="3" id="voiceOverDialogName">Dialog Name</auro-header>
|
|
52
|
+
<p>The calendar dialog receives its accessible name from the <code>fromLabel</code> slot content. VoiceOver announces the dialog as e.g. <em>"Departure date, dialog"</em> when it opens.</p>
|
|
46
53
|
<auro-header level="3" id="voiceOverCloseGesture">Close Gesture</auro-header>
|
|
47
54
|
<p>The calendar bib may be <strong>closed</strong> using a gesture.</p>
|
|
48
55
|
<ul>
|
|
@@ -60,22 +67,22 @@
|
|
|
60
67
|
<p>Examples: large tablet, typical size or larger desktop browser window</p>
|
|
61
68
|
<ol>
|
|
62
69
|
<li><strong>Focus</strong> — Tab to the datepicker input.</li>
|
|
63
|
-
<li><strong>Type a date</strong> — Enter a date value directly or
|
|
64
|
-
<li><strong>Calendar opens</strong> —
|
|
65
|
-
<li><strong>Select a date</strong> — Activate a calendar cell to select the date. The
|
|
70
|
+
<li><strong>Type a date</strong> — Enter a date value directly, or press Enter/Space to open the calendar.</li>
|
|
71
|
+
<li><strong>Calendar opens</strong> — Focus moves to the active date cell inside the calendar grid. Navigate dates with VoiceOver gestures (swipe) or arrow keys.</li>
|
|
72
|
+
<li><strong>Select a date</strong> — Activate a calendar cell (double-tap with VoiceOver, or Enter/Space with keyboard) to select the date. The selected date is announced via a live region and populates the input. The calendar remains open; close it by pressing Escape or activating the Done button.</li>
|
|
66
73
|
</ol>
|
|
67
74
|
<auro-header level="2" id="voiceOverSmallVPAnnouncements">Small Viewport Workflow</auro-header>
|
|
68
75
|
<p>Examples: mobile phone, very small desktop browser window</p>
|
|
69
76
|
<ol>
|
|
70
77
|
<li><strong>Focus</strong> — Tab or swipe to the datepicker input.</li>
|
|
71
78
|
<li>
|
|
72
|
-
<strong>Open:</strong>
|
|
79
|
+
<strong>Open:</strong> The fullscreen modal dialog opens. VoiceOver announces the dialog name (e.g. <em>"Departure date, dialog"</em>). Focus is moved to the active date cell inside the calendar grid.
|
|
73
80
|
</li>
|
|
74
|
-
<li><strong>Navigate dates</strong> — Swipe through calendar cells.</li>
|
|
81
|
+
<li><strong>Navigate dates</strong> — Swipe through calendar cells or use arrow keys.</li>
|
|
75
82
|
<li>
|
|
76
|
-
<strong>Select a date:</strong>
|
|
83
|
+
<strong>Select a date:</strong> The selected date is announced via a live region and populates the input. The fullscreen modal remains open so additional dates can be reviewed.
|
|
77
84
|
<p>~OR~</p>
|
|
78
|
-
<strong>Close
|
|
85
|
+
<strong>Close:</strong> Activate the close button, press Escape, or use the VoiceOver scrub gesture to close the fullscreen modal dialog.
|
|
79
86
|
</li>
|
|
80
87
|
</ol>
|
|
81
88
|
<auro-header level="2" id="voiceOverStates">Impact of State</auro-header>
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
3
|
+
See LICENSE in the project root for license information.
|
|
4
|
+
|
|
5
|
+
HTML in this document is standardized and NOT to be edited.
|
|
6
|
+
All demo code should be added/edited in ./demo/why-datepicker.md
|
|
7
|
+
|
|
8
|
+
With the exception of adding custom elements if needed for the demo.
|
|
9
|
+
|
|
10
|
+
----------------------- DO NOT EDIT -----------------------------
|
|
11
|
+
|
|
12
|
+
-->
|
|
13
|
+
|
|
14
|
+
<!DOCTYPE html>
|
|
15
|
+
<html lang="en">
|
|
16
|
+
<head>
|
|
17
|
+
<meta charset="UTF-8" />
|
|
18
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
19
|
+
<title>Auro Web Component Demo | auro-datepicker | Why auro-datepicker</title>
|
|
20
|
+
|
|
21
|
+
<!-- highlight.js Stylesheet -->
|
|
22
|
+
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.9.0/build/styles/github.min.css"/>
|
|
23
|
+
|
|
24
|
+
<!-- Legacy reference is still needed to support auro-datepicker's use of legacy token values at this time -->
|
|
25
|
+
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@latest/dist/legacy/auro-classic/CSSCustomProperties.css"/>
|
|
26
|
+
|
|
27
|
+
<!-- Design Token Alaska Theme -->
|
|
28
|
+
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/design-tokens@latest/dist/themes/alaska/CSSCustomProperties--alaska.min.css"/>
|
|
29
|
+
|
|
30
|
+
<!-- Webcore Stylesheet Alaska Theme -->
|
|
31
|
+
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/bundled/themes/alaska.global.min.css" />
|
|
32
|
+
|
|
33
|
+
<!-- Demo Specific Styles -->
|
|
34
|
+
<link rel="stylesheet" type="text/css" href="./styles.min.css" />
|
|
35
|
+
<style>
|
|
36
|
+
table {
|
|
37
|
+
--ds-color-container-secondary-default: transparent;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
tr:not(:last-of-type) {
|
|
41
|
+
border-bottom: 1px solid var(--ds-color-border-tertiary-default);
|
|
42
|
+
}
|
|
43
|
+
</style>
|
|
44
|
+
</head>
|
|
45
|
+
<body class="auro-markdown">
|
|
46
|
+
<main></main>
|
|
47
|
+
|
|
48
|
+
<script type="module">
|
|
49
|
+
import { renderPage } from './demo-support.min.js';
|
|
50
|
+
await renderPage('./why-datepicker.md');
|
|
51
|
+
</script>
|
|
52
|
+
|
|
53
|
+
<!-- If additional elements are needed for the demo, add them here. -->
|
|
54
|
+
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-header@latest/+esm" type="module"></script>
|
|
55
|
+
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-hyperlink@latest/+esm" type="module"></script>
|
|
56
|
+
</body>
|
|
57
|
+
</html>
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
<auro-header level="1" id="overview">Why auro-datepicker?</auro-header>
|
|
2
|
+
<p>The native HTML <code><input type="date"></code> element provides a minimal date-picking experience, but it falls short for the needs of a complex, accessible, and branded application. <code>auro-datepicker</code> bridges those gaps with a purpose-built component designed for real-world use.</p>
|
|
3
|
+
<auro-header level="2" id="accessibility">Accessibility</auro-header>
|
|
4
|
+
<p>Native date inputs vary widely across browsers and platforms, with inconsistent screen reader announcements, keyboard behavior, and focus management.</p>
|
|
5
|
+
<p><code>auro-datepicker</code> provides:</p>
|
|
6
|
+
<ul>
|
|
7
|
+
<li><strong>Full keyboard navigation</strong> — Arrow keys move between days, months, and years. Enter and Space select a date. Escape closes the calendar. The roving <code>tabindex</code> pattern ensures only one cell is in the tab order at a time, so users can Tab past the calendar efficiently.</li>
|
|
8
|
+
<li><strong>Rich ARIA semantics</strong> — Every cell is labeled with its full date, day-of-week, and contextual state (e.g. "selected", "today", "unavailable", "range start", "in range"). Screen reader users hear meaningful announcements, not just numbers.</li>
|
|
9
|
+
<li><strong>Live region announcements</strong> — Month changes are announced via <code>aria-live</code> so assistive technology users know the visible month has changed.</li>
|
|
10
|
+
<li><strong>Reduced motion support</strong> — Scrolling and transitions respect <code>prefers-reduced-motion</code>.</li>
|
|
11
|
+
<li><strong>Focus management</strong> — Opening the calendar moves focus to the active date cell. Closing it returns focus to the trigger input. The fullscreen dialog uses <code>showModal()</code> for native inert-background behavior, while the desktop modal traps focus within the bib.</li>
|
|
12
|
+
</ul>
|
|
13
|
+
<p>By contrast, native <code><input type="date"></code> delegates all of this to the browser, and the result differs significantly between Chrome, Safari, and Firefox — often with no keyboard navigation of the calendar grid at all on some platforms.</p>
|
|
14
|
+
<auro-header level="2" id="dateRangeSelection">Date range selection</auro-header>
|
|
15
|
+
<p>HTML has no native concept of a date range picker. Building one from two <code><input type="date"></code> elements requires custom logic for coordinating values, enforcing start-before-end ordering, and providing a unified visual experience.</p>
|
|
16
|
+
<p><code>auro-datepicker</code> handles this with a single <code>range</code> attribute, providing:</p>
|
|
17
|
+
<ul>
|
|
18
|
+
<li>Two coordinated input fields with shared calendar interaction</li>
|
|
19
|
+
<li>Visual range highlighting across the calendar grid</li>
|
|
20
|
+
<li>Customizable ARIA labels for range positions (start, end, in-range, before range, after range)</li>
|
|
21
|
+
<li>Automatic value coordination between departure and return dates</li>
|
|
22
|
+
</ul>
|
|
23
|
+
<auro-header level="2" id="blackoutDates">Blackout dates</auro-header>
|
|
24
|
+
<p>Native date inputs have no mechanism to mark specific dates as unavailable. <code>minDate</code> and <code>maxDate</code> can restrict to a range, but they cannot express "these specific dates within the range are not selectable."</p>
|
|
25
|
+
<p><code>auro-datepicker</code> supports a <code>blackoutDates</code> array of ISO date strings. Blacked-out dates are:</p>
|
|
26
|
+
<ul>
|
|
27
|
+
<li>Visually styled as unavailable</li>
|
|
28
|
+
<li>Announced as unavailable (with a customizable label like "sold out") to screen readers</li>
|
|
29
|
+
<li>Focusable but not selectable via click or keyboard</li>
|
|
30
|
+
<li>Validated on typed input — entering a blackout date triggers a <code>customError</code> validity state</li>
|
|
31
|
+
</ul>
|
|
32
|
+
<auro-header level="2" id="validation">Validation</auro-header>
|
|
33
|
+
<p>Native date validation is limited to <code>required</code>, <code>min</code>, and <code>max</code>. Error messages are browser-controlled and cannot be customized.</p>
|
|
34
|
+
<p><code>auro-datepicker</code> integrates with the Auro form validation system:</p>
|
|
35
|
+
<ul>
|
|
36
|
+
<li>Supports <code>required</code>, <code>minDate</code>, <code>maxDate</code>, and blackout date constraints</li>
|
|
37
|
+
<li>Custom error messages for each validity state (<code>setCustomValidityValueMissing</code>, <code>setCustomValidityRangeOverflow</code>, <code>setCustomValidityRangeUnderflow</code>, <code>setCustomValidityCustomError</code>)</li>
|
|
38
|
+
<li>Validation runs on blur, on value change, and when constraints change (e.g. <code>blackoutDates</code> is updated)</li>
|
|
39
|
+
<li>Dispatches <code>auroFormElement-validated</code> events so parent forms can react</li>
|
|
40
|
+
<li>Displays errors inline via the help text slot</li>
|
|
41
|
+
</ul>
|
|
42
|
+
<auro-header level="2" id="responsiveLayout">Responsive layout</auro-header>
|
|
43
|
+
<p>Native date inputs render a small, browser-controlled popup that cannot be styled or repositioned.</p>
|
|
44
|
+
<p><code>auro-datepicker</code> adapts to viewport size:</p>
|
|
45
|
+
<ul>
|
|
46
|
+
<li><strong>Desktop</strong> — Calendar appears as a positioned dropdown bib, with optional modal behavior (<code>desktopModal</code>) that traps focus and makes background content inert</li>
|
|
47
|
+
<li><strong>Mobile</strong> — Calendar opens as a fullscreen dialog via <code>showModal()</code>, with a configurable breakpoint (<code>fullscreenBreakpoint</code>). The virtual keyboard stays open during the transition so users can continue typing</li>
|
|
48
|
+
<li><strong>Multi-month</strong> — Desktop viewports can display two months side-by-side for range selection</li>
|
|
49
|
+
</ul>
|
|
50
|
+
<auro-header level="2" id="localization">Localization</auro-header>
|
|
51
|
+
<p>Native <code><input type="date"></code> follows the browser's locale for display format, but offers no control over month names, labels, or ARIA text.</p>
|
|
52
|
+
<p><code>auro-datepicker</code> supports:</p>
|
|
53
|
+
<ul>
|
|
54
|
+
<li>Custom <code>monthNames</code> arrays for any language</li>
|
|
55
|
+
<li>Localizable navigation labels (<code>navLabelPrevMonth</code>, <code>navLabelNextMonth</code>)</li>
|
|
56
|
+
<li>Localizable range position labels for screen readers</li>
|
|
57
|
+
<li>Customizable <code>blackoutLabel</code> text</li>
|
|
58
|
+
<li>Configurable date display format</li>
|
|
59
|
+
</ul>
|
|
60
|
+
<auro-header level="2" id="customCellContent">Custom cell content</auro-header>
|
|
61
|
+
<p>Native date inputs render a fixed grid of numbers. There is no way to add prices, icons, or supplementary information to individual dates.</p>
|
|
62
|
+
<p><code>auro-datepicker</code> supports per-date slot content:</p>
|
|
63
|
+
<ul>
|
|
64
|
+
<li><strong>Date slots</strong> (<code>date_MM_DD_YYYY</code>) — Add custom HTML below the date number (e.g. flight prices, availability indicators)</li>
|
|
65
|
+
<li><strong>Popover slots</strong> (<code>popover_MM_DD_YYYY</code>) — Add popover content that appears on hover or focus for a specific date</li>
|
|
66
|
+
<li><strong>Reference dates</strong> — Display reference data alongside dates for decision-making</li>
|
|
67
|
+
</ul>
|
|
68
|
+
<auro-header level="2" id="designSystemIntegration">Design system integration</auro-header>
|
|
69
|
+
<p>A native <code><input type="date"></code> cannot be styled to match a design system. Shadow DOM browser controls resist CSS customization, and the calendar popup is entirely outside author control.</p>
|
|
70
|
+
<p><code>auro-datepicker</code> is built with the Alaska Airlines Auro Design System:</p>
|
|
71
|
+
<ul>
|
|
72
|
+
<li>Consistent visual language with other Auro form components</li>
|
|
73
|
+
<li>Light and dark theme support (<code>appearance="default"</code> or <code>appearance="inverse"</code>)</li>
|
|
74
|
+
<li>CSS custom properties and <code>::part()</code> selectors for targeted styling</li>
|
|
75
|
+
<li>Composed from versioned Auro sub-components (dropdown, input, button, icon) for consistency</li>
|
|
76
|
+
</ul>
|
|
77
|
+
<auro-header level="2" id="summary">Summary</auro-header>
|
|
78
|
+
<table>
|
|
79
|
+
<thead>
|
|
80
|
+
<tr>
|
|
81
|
+
<th>Capability</th>
|
|
82
|
+
<th><code><input type="date"></code></th>
|
|
83
|
+
<th><code>auro-datepicker</code></th>
|
|
84
|
+
</tr>
|
|
85
|
+
</thead>
|
|
86
|
+
<tbody>
|
|
87
|
+
<tr>
|
|
88
|
+
<td>Keyboard navigation</td>
|
|
89
|
+
<td>Browser-dependent</td>
|
|
90
|
+
<td>Full arrow-key grid navigation</td>
|
|
91
|
+
</tr>
|
|
92
|
+
<tr>
|
|
93
|
+
<td>Screen reader support</td>
|
|
94
|
+
<td>Inconsistent</td>
|
|
95
|
+
<td>Rich ARIA labels and live regions</td>
|
|
96
|
+
</tr>
|
|
97
|
+
<tr>
|
|
98
|
+
<td>Date range</td>
|
|
99
|
+
<td>Not supported</td>
|
|
100
|
+
<td>Built-in with <code>range</code> attribute</td>
|
|
101
|
+
</tr>
|
|
102
|
+
<tr>
|
|
103
|
+
<td>Blackout dates</td>
|
|
104
|
+
<td>Not supported</td>
|
|
105
|
+
<td><code>blackoutDates</code> array with validation</td>
|
|
106
|
+
</tr>
|
|
107
|
+
<tr>
|
|
108
|
+
<td>Custom validation messages</td>
|
|
109
|
+
<td>Not supported</td>
|
|
110
|
+
<td>Per-constraint custom messages</td>
|
|
111
|
+
</tr>
|
|
112
|
+
<tr>
|
|
113
|
+
<td>Responsive layout</td>
|
|
114
|
+
<td>Fixed popup</td>
|
|
115
|
+
<td>Desktop dropdown / mobile fullscreen</td>
|
|
116
|
+
</tr>
|
|
117
|
+
<tr>
|
|
118
|
+
<td>Custom cell content</td>
|
|
119
|
+
<td>Not supported</td>
|
|
120
|
+
<td>Per-date slots and popovers</td>
|
|
121
|
+
</tr>
|
|
122
|
+
<tr>
|
|
123
|
+
<td>Localization</td>
|
|
124
|
+
<td>Browser locale only</td>
|
|
125
|
+
<td>Fully configurable labels and names</td>
|
|
126
|
+
</tr>
|
|
127
|
+
<tr>
|
|
128
|
+
<td>Theming</td>
|
|
129
|
+
<td>Minimal / browser-dependent</td>
|
|
130
|
+
<td>Full design system integration</td>
|
|
131
|
+
</tr>
|
|
132
|
+
</tbody>
|
|
133
|
+
</table>
|