@aurodesignsystem-dev/auro-formkit 0.0.0-pr1448.0 → 0.0.0-pr1451.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/checkbox/demo/api.md +201 -221
- package/components/checkbox/demo/api.min.js +1 -1
- package/components/checkbox/demo/index.md +21 -23
- package/components/checkbox/demo/index.min.js +1 -1
- package/components/checkbox/demo/keyboard-behavior.md +39 -0
- package/components/checkbox/demo/readme.md +23 -35
- package/components/checkbox/dist/auro-checkbox-group.d.ts +6 -6
- package/components/checkbox/dist/auro-checkbox.d.ts +8 -8
- package/components/checkbox/dist/index.js +1 -1
- package/components/checkbox/dist/registered.js +1 -1
- package/components/combobox/README.md +13 -3
- package/components/combobox/demo/accessibility.html +57 -0
- package/components/combobox/demo/accessibility.md +77 -0
- package/components/combobox/demo/api.html +24 -0
- package/components/combobox/demo/api.md +1613 -1685
- package/components/combobox/demo/api.min.js +15 -21
- package/components/combobox/demo/design.html +83 -0
- package/components/combobox/demo/design.md +283 -0
- package/components/combobox/demo/index.html +49 -16
- package/components/combobox/demo/index.js +3 -2
- package/components/combobox/demo/index.md +861 -185
- package/components/combobox/demo/index.min.js +41 -22
- package/components/combobox/demo/install.html +84 -0
- package/components/combobox/demo/install.js +24 -0
- package/components/combobox/demo/install.md +100 -0
- package/components/combobox/demo/install.min.js +17991 -0
- package/components/combobox/demo/{keyboardBehavior.html → keyboard-behavior.html} +2 -1
- package/components/combobox/demo/keyboard-behavior.md +276 -0
- package/components/combobox/demo/layout.md +112 -0
- package/components/combobox/demo/readme.html +25 -1
- package/components/combobox/demo/readme.md +50 -52
- package/components/combobox/demo/styles.css +141 -0
- package/components/combobox/demo/voiceover.html +66 -0
- package/components/combobox/demo/voiceover.md +118 -0
- package/components/combobox/dist/auro-combobox.d.ts +36 -36
- package/components/combobox/dist/index.js +12 -17
- package/components/combobox/dist/registered.js +12 -17
- package/components/counter/demo/api.md +751 -819
- package/components/counter/demo/api.min.js +2 -2
- package/components/counter/demo/index.md +35 -39
- package/components/counter/demo/index.min.js +2 -2
- package/components/counter/demo/keyboard-behavior.md +127 -0
- package/components/counter/demo/readme.md +39 -51
- package/components/counter/dist/auro-counter-group.d.ts +2 -2
- package/components/counter/dist/auro-counter.d.ts +10 -10
- package/components/counter/dist/index.js +2 -2
- package/components/counter/dist/registered.js +2 -2
- package/components/datepicker/demo/api.md +827 -931
- package/components/datepicker/demo/api.min.js +4 -4
- package/components/datepicker/demo/index.md +79 -87
- package/components/datepicker/demo/index.min.js +4 -4
- package/components/datepicker/demo/keyboard-behavior.md +19 -0
- package/components/datepicker/demo/readme.md +19 -31
- package/components/datepicker/dist/index.js +4 -4
- package/components/datepicker/dist/registered.js +4 -4
- package/components/datepicker/dist/{auro-calendar-cell.d.ts → src/auro-calendar-cell.d.ts} +2 -2
- package/components/datepicker/dist/{auro-datepicker.d.ts → src/auro-datepicker.d.ts} +13 -13
- package/components/datepicker/dist/{utilities.d.ts → src/utilities.d.ts} +4 -4
- package/components/datepicker/dist/{utilitiesCalendar.d.ts → src/utilitiesCalendar.d.ts} +3 -3
- package/components/datepicker/dist/{vendor → src/vendor}/wc-range-datepicker/range-datepicker-calendar.d.ts +2 -2
- package/components/datepicker/dist/{vendor → src/vendor}/wc-range-datepicker/range-datepicker.d.ts +1 -1
- package/components/dropdown/demo/api.md +795 -851
- package/components/dropdown/demo/api.min.js +1 -1
- package/components/dropdown/demo/index.md +145 -155
- package/components/dropdown/demo/index.min.js +1 -1
- package/components/dropdown/demo/keyboard-behavior.md +72 -0
- package/components/dropdown/demo/readme.md +39 -51
- package/components/dropdown/dist/auro-dropdown.d.ts +22 -22
- package/components/dropdown/dist/auro-dropdownBib.d.ts +3 -3
- package/components/dropdown/dist/dropdownBibKeyboardStrategy.d.ts +1 -1
- package/components/dropdown/dist/index.js +1 -1
- package/components/dropdown/dist/registered.js +1 -1
- package/components/form/demo/api.md +173 -179
- package/components/form/demo/api.min.js +27 -33
- package/components/form/demo/index.md +27 -33
- package/components/form/demo/index.min.js +27 -33
- package/components/form/demo/keyboard-behavior.md +38 -0
- package/components/form/demo/readme.md +14 -28
- package/components/input/demo/api.md +572 -664
- package/components/input/demo/api.min.js +2 -2
- package/components/input/demo/index.md +93 -99
- package/components/input/demo/index.min.js +2 -2
- package/components/input/demo/keyboard-behavior.md +25 -0
- package/components/input/demo/readme.md +17 -29
- package/components/input/dist/auro-input.d.ts +1 -1
- package/components/input/dist/base-input.d.ts +29 -29
- package/components/input/dist/index.js +2 -2
- package/components/input/dist/registered.js +2 -2
- package/components/menu/demo/api.md +745 -789
- package/components/menu/demo/api.min.js +3 -4
- package/components/menu/demo/index.md +35 -37
- package/components/menu/demo/index.min.js +3 -4
- package/components/menu/demo/keyboard-behavior.md +18 -0
- package/components/menu/demo/readme.md +23 -35
- package/components/menu/dist/auro-menu-utils.d.ts +1 -1
- package/components/menu/dist/auro-menu.context.d.ts +3 -3
- package/components/menu/dist/auro-menu.d.ts +5 -5
- package/components/menu/dist/auro-menuoption.d.ts +6 -6
- package/components/menu/dist/index.js +3 -4
- package/components/menu/dist/registered.js +3 -4
- package/components/radio/demo/api.md +318 -350
- package/components/radio/demo/api.min.js +1 -1
- package/components/radio/demo/index.md +25 -29
- package/components/radio/demo/index.min.js +1 -1
- package/components/radio/demo/keyboard-behavior.md +72 -0
- package/components/radio/demo/readme.md +21 -33
- package/components/radio/dist/auro-radio-group.d.ts +9 -9
- package/components/radio/dist/auro-radio.d.ts +8 -8
- package/components/radio/dist/index.js +1 -1
- package/components/radio/dist/registered.js +1 -1
- package/components/select/README.md +12 -1
- package/components/select/demo/accessibility.html +65 -0
- package/components/select/demo/accessibility.md +76 -0
- package/components/select/demo/api.md +1713 -1793
- package/components/select/demo/api.min.js +5 -6
- package/components/select/demo/index.html +247 -37
- package/components/select/demo/index.md +225 -345
- package/components/select/demo/index.min.js +5 -6
- package/components/select/demo/keyboard-behavior.md +39 -0
- package/components/select/demo/layout.html +59 -0
- package/components/select/demo/layout.md +299 -0
- package/components/select/demo/readme.md +45 -46
- package/components/select/demo/voiceover.html +65 -0
- package/components/select/demo/voiceover.md +183 -0
- package/components/select/dist/auro-select.d.ts +11 -11
- package/components/select/dist/index.js +2 -2
- package/components/select/dist/registered.js +2 -2
- package/custom-elements.json +13 -11
- package/package.json +26 -26
- package/components/checkbox/demo/keyboardBehavior.md +0 -0
- package/components/combobox/demo/keyboardBehavior.md +0 -281
- package/components/counter/demo/keyboardBehavior.md +0 -127
- package/components/datepicker/demo/keyboardBehavior.md +0 -19
- package/components/dropdown/demo/keyboardBehavior.md +0 -77
- package/components/form/demo/keyboardBehavior.md +0 -0
- package/components/input/demo/keyboardBehavior.md +0 -0
- package/components/menu/demo/keyboardBehavior.md +0 -0
- package/components/radio/demo/keyboardBehavior.md +0 -0
- package/components/select/demo/keyboardBehavior.md +0 -245
- /package/components/datepicker/dist/{auro-calendar-month.d.ts → src/auro-calendar-month.d.ts} +0 -0
- /package/components/datepicker/dist/{auro-calendar.d.ts → src/auro-calendar.d.ts} +0 -0
- /package/components/datepicker/dist/{buttonVersion.d.ts → src/buttonVersion.d.ts} +0 -0
- /package/components/datepicker/dist/{datepickerKeyboardStrategy.d.ts → src/datepickerKeyboardStrategy.d.ts} +0 -0
- /package/components/datepicker/dist/{iconVersion.d.ts → src/iconVersion.d.ts} +0 -0
- /package/components/datepicker/dist/{index.d.ts → src/index.d.ts} +0 -0
- /package/components/datepicker/dist/{popoverVersion.d.ts → src/popoverVersion.d.ts} +0 -0
- /package/components/datepicker/dist/{styles → src/styles}/classic/color-css.d.ts +0 -0
- /package/components/datepicker/dist/{styles → src/styles}/classic/style-css.d.ts +0 -0
- /package/components/datepicker/dist/{styles → src/styles}/color-calendar-css.d.ts +0 -0
- /package/components/datepicker/dist/{styles → src/styles}/color-cell-css.d.ts +0 -0
- /package/components/datepicker/dist/{styles → src/styles}/color-css.d.ts +0 -0
- /package/components/datepicker/dist/{styles → src/styles}/color-month-css.d.ts +0 -0
- /package/components/datepicker/dist/{styles → src/styles}/shapeSize-css.d.ts +0 -0
- /package/components/datepicker/dist/{styles → src/styles}/snowflake/color-css.d.ts +0 -0
- /package/components/datepicker/dist/{styles → src/styles}/snowflake/style-css.d.ts +0 -0
- /package/components/datepicker/dist/{styles → src/styles}/style-auro-calendar-cell-css.d.ts +0 -0
- /package/components/datepicker/dist/{styles → src/styles}/style-auro-calendar-css.d.ts +0 -0
- /package/components/datepicker/dist/{styles → src/styles}/style-auro-calendar-month-css.d.ts +0 -0
- /package/components/datepicker/dist/{styles → src/styles}/style-css.d.ts +0 -0
- /package/components/datepicker/dist/{styles → src/styles}/tokens-css.d.ts +0 -0
- /package/components/datepicker/dist/{utilitiesCalendarRender.d.ts → src/utilitiesCalendarRender.d.ts} +0 -0
- /package/components/datepicker/dist/{vendor → src/vendor}/wc-range-datepicker/day.d.ts +0 -0
- /package/components/datepicker/dist/{vendor → src/vendor}/wc-range-datepicker/range-datepicker-cell.d.ts +0 -0
|
@@ -1645,7 +1645,7 @@ class AuroHelpText extends i$2 {
|
|
|
1645
1645
|
}
|
|
1646
1646
|
}
|
|
1647
1647
|
|
|
1648
|
-
var formkitVersion = '
|
|
1648
|
+
var formkitVersion = '202604232250';
|
|
1649
1649
|
|
|
1650
1650
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
1651
1651
|
// See LICENSE in the project root for license information.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
THIS PAGE'S CONTENT SHOULD BE KEPT MINIMAL.
|
|
3
|
+
ONLY ADD EXAMPLES THAT ARE TRULY NECESSARY FOR THE INDEX PAGE — THE BASIC EXAMPLE IS USUALLY ENOUGH.
|
|
4
|
+
ALL OTHER EXAMPLES SHOULD GO IN THE API DOCUMENTATION.
|
|
5
5
|
-->
|
|
6
6
|
|
|
7
7
|
# Radio
|
|
@@ -27,47 +27,43 @@ The following examples illustrate fully functional `<auro-radio>` elements wrapp
|
|
|
27
27
|
### Basic Radio
|
|
28
28
|
|
|
29
29
|
<div class="exampleWrapper">
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/basic-standalone.html) -->
|
|
31
|
+
<!-- The below content is automatically added from ./../apiExamples/basic-standalone.html -->
|
|
32
|
+
<auro-radio id="basicRadio1" label="Yes" name="radioDemo" value="yes"></auro-radio>
|
|
33
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
34
34
|
</div>
|
|
35
35
|
<auro-accordion alignRight>
|
|
36
|
-
|
|
36
|
+
<span slot="trigger">See code</span>
|
|
37
37
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/basic-standalone.html) -->
|
|
38
38
|
<!-- The below code snippet is automatically added from ./../apiExamples/basic-standalone.html -->
|
|
39
39
|
|
|
40
|
-
|
|
41
|
-
<auro-radio id="basicRadio1" label="Yes" name="radioDemo" value="yes"></auro-radio>
|
|
42
|
-
```
|
|
40
|
+
<pre class="language-html"><code class="language-html"><auro-radio id="basicRadio1" label="Yes" name="radioDemo" value="yes"></auro-radio></code></pre>
|
|
43
41
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
44
42
|
</auro-accordion>
|
|
45
43
|
|
|
46
44
|
### Basic Radio Group
|
|
47
45
|
|
|
48
46
|
<div class="exampleWrapper">
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
47
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/basic.html) -->
|
|
48
|
+
<!-- The below content is automatically added from ./../apiExamples/basic.html -->
|
|
49
|
+
<auro-radio-group>
|
|
50
|
+
<span slot="legend">Form label goes here</span>
|
|
51
|
+
<auro-radio id="basicGroupRadio1" label="Yes" name="radioDemo" value="yes"></auro-radio>
|
|
52
|
+
<auro-radio id="basicGroupRadio2" label="No" name="radioDemo" value="no"></auro-radio>
|
|
53
|
+
<auro-radio id="basicGroupRadio3" label="Maybe" name="radioDemo" value="maybe"></auro-radio>
|
|
54
|
+
</auro-radio-group>
|
|
55
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
58
56
|
</div>
|
|
59
57
|
<auro-accordion alignRight>
|
|
60
|
-
|
|
58
|
+
<span slot="trigger">See code</span>
|
|
61
59
|
<!-- AURO-GENERATED-CONTENT:START (CODE:src=./../apiExamples/basic.html) -->
|
|
62
60
|
<!-- The below code snippet is automatically added from ./../apiExamples/basic.html -->
|
|
63
61
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
</auro-radio-group>
|
|
71
|
-
```
|
|
62
|
+
<pre class="language-html"><code class="language-html"><auro-radio-group>
|
|
63
|
+
<span slot="legend">Form label goes here</span>
|
|
64
|
+
<auro-radio id="basicGroupRadio1" label="Yes" name="radioDemo" value="yes"></auro-radio>
|
|
65
|
+
<auro-radio id="basicGroupRadio2" label="No" name="radioDemo" value="no"></auro-radio>
|
|
66
|
+
<auro-radio id="basicGroupRadio3" label="Maybe" name="radioDemo" value="maybe"></auro-radio>
|
|
67
|
+
</auro-radio-group></code></pre>
|
|
72
68
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
73
69
|
</auro-accordion>
|
|
@@ -1620,7 +1620,7 @@ class AuroHelpText extends i$2 {
|
|
|
1620
1620
|
}
|
|
1621
1621
|
}
|
|
1622
1622
|
|
|
1623
|
-
var formkitVersion = '
|
|
1623
|
+
var formkitVersion = '202604232250';
|
|
1624
1624
|
|
|
1625
1625
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
1626
1626
|
// See LICENSE in the project root for license information.
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
<auro-header level="1" id="overview">Radio - Keyboard Behavior</auro-header>
|
|
2
|
+
<div class="contentWrapper">
|
|
3
|
+
<div class="mainContent">
|
|
4
|
+
<div class="scrollWrapper">
|
|
5
|
+
<auro-header level="2" id="tabBehavior">Tab Behavior</auro-header>
|
|
6
|
+
<p>Within an <code><auro-radio-group></code>, the currently selected radio (or the first enabled radio if none is selected) participates in the browser's default <code>tabindex</code> sequence. Arrow keys move focus and selection between radios within the group.</p>
|
|
7
|
+
<p>When the component is <code>disabled</code> it is removed from the <code>tabindex</code> sequence.</p>
|
|
8
|
+
<auro-header level="2" id="keyEvents">Key Events</auro-header>
|
|
9
|
+
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./../docs/partials/keyEvents.md) -->
|
|
10
|
+
<!-- The below content is automatically added from ./../docs/partials/keyEvents.md -->
|
|
11
|
+
<table>
|
|
12
|
+
<thead>
|
|
13
|
+
<tr>
|
|
14
|
+
<th>Key</th>
|
|
15
|
+
<th>Modifier</th>
|
|
16
|
+
<th>Current State</th>
|
|
17
|
+
<th>Focus Element</th>
|
|
18
|
+
<th>Behavior</th>
|
|
19
|
+
</tr>
|
|
20
|
+
</thead>
|
|
21
|
+
<tbody>
|
|
22
|
+
<tr>
|
|
23
|
+
<td>Space</td>
|
|
24
|
+
<td>-</td>
|
|
25
|
+
<td>Not disabled</td>
|
|
26
|
+
<td>Radio element</td>
|
|
27
|
+
<td>
|
|
28
|
+
Selects the radio at the current focus index.
|
|
29
|
+
</td>
|
|
30
|
+
</tr>
|
|
31
|
+
<tr>
|
|
32
|
+
<td>ArrowDown</td>
|
|
33
|
+
<td>-</td>
|
|
34
|
+
<td>Focus within the radio group</td>
|
|
35
|
+
<td>Any radio in the group</td>
|
|
36
|
+
<td>
|
|
37
|
+
Selects and focuses the next enabled radio. Wraps from last to first. Skips disabled items. Calls <code>preventDefault()</code>.
|
|
38
|
+
</td>
|
|
39
|
+
</tr>
|
|
40
|
+
<tr>
|
|
41
|
+
<td>ArrowRight</td>
|
|
42
|
+
<td>-</td>
|
|
43
|
+
<td>Focus within the radio group</td>
|
|
44
|
+
<td>Any radio in the group</td>
|
|
45
|
+
<td>
|
|
46
|
+
Same as ArrowDown.
|
|
47
|
+
</td>
|
|
48
|
+
</tr>
|
|
49
|
+
<tr>
|
|
50
|
+
<td>ArrowUp</td>
|
|
51
|
+
<td>-</td>
|
|
52
|
+
<td>Focus within the radio group</td>
|
|
53
|
+
<td>Any radio in the group</td>
|
|
54
|
+
<td>
|
|
55
|
+
Selects and focuses the previous enabled radio. Wraps from first to last. Skips disabled items. Calls <code>preventDefault()</code>.
|
|
56
|
+
</td>
|
|
57
|
+
</tr>
|
|
58
|
+
<tr>
|
|
59
|
+
<td>ArrowLeft</td>
|
|
60
|
+
<td>-</td>
|
|
61
|
+
<td>Focus within the radio group</td>
|
|
62
|
+
<td>Any radio in the group</td>
|
|
63
|
+
<td>
|
|
64
|
+
Same as ArrowUp.
|
|
65
|
+
</td>
|
|
66
|
+
</tr>
|
|
67
|
+
</tbody>
|
|
68
|
+
</table>
|
|
69
|
+
<!-- AURO-GENERATED-CONTENT:END -->
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|
|
@@ -46,9 +46,7 @@ The following examples illustrate fully functional `<auro-radio>` elements wrapp
|
|
|
46
46
|
|
|
47
47
|
#### NPM Installation
|
|
48
48
|
|
|
49
|
-
|
|
50
|
-
$ npm i @aurodesignsystem/auro-formkit
|
|
51
|
-
```
|
|
49
|
+
<pre class="language-shell"><code class="language-shell">$ npm i @aurodesignsystem/auro-formkit</code></pre>
|
|
52
50
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
53
51
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=../../docs/templates/gettingStarted.md) -->
|
|
54
52
|
<!-- The below content is automatically added from ../../docs/templates/gettingStarted.md -->
|
|
@@ -57,13 +55,11 @@ $ npm i @aurodesignsystem/auro-formkit
|
|
|
57
55
|
|
|
58
56
|
When using TypeScript set `moduleResolution` to `bundler`, add the following to your `tsconfig.json`:
|
|
59
57
|
|
|
60
|
-
|
|
61
|
-
{
|
|
58
|
+
<pre class="language-json"><code class="language-json">{
|
|
62
59
|
"compilerOptions": {
|
|
63
60
|
"moduleResolution": "bundler"
|
|
64
61
|
}
|
|
65
|
-
}
|
|
66
|
-
```
|
|
62
|
+
}</code></pre>
|
|
67
63
|
|
|
68
64
|
This configuration enables proper module resolution for the component's TypeScript files.
|
|
69
65
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
@@ -74,9 +70,7 @@ This configuration enables proper module resolution for the component's TypeScri
|
|
|
74
70
|
<!-- The below content is automatically added from ../../docs/templates/bundleInstallDescription.md -->
|
|
75
71
|
In cases where the project is not able to process JS assets, there are pre-processed assets available for use. Legacy browsers such as IE11 are no longer supported.
|
|
76
72
|
|
|
77
|
-
|
|
78
|
-
<script type="module" src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@latest/auro-radio/+esm"></script>
|
|
79
|
-
```
|
|
73
|
+
<pre class="language-html"><code class="language-html"><script type="module" src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-formkit@latest/auro-radio/+esm"></script></code></pre>
|
|
80
74
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
81
75
|
|
|
82
76
|
## Formkit Development
|
|
@@ -90,9 +84,7 @@ Running the `dev` command will open a `localhost` development server for all com
|
|
|
90
84
|
|
|
91
85
|
To only develop a single component, use the `--filter` flag:
|
|
92
86
|
|
|
93
|
-
|
|
94
|
-
npx turbo dev --filter=@aurodesignsystem/auro-input
|
|
95
|
-
```
|
|
87
|
+
<pre class="language-shell"><code class="language-shell">npx turbo dev --filter=@aurodesignsystem/auro-input</code></pre>
|
|
96
88
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
97
89
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/customRegistration.md) -->
|
|
98
90
|
<!-- The below content is automatically added from ./docs/partials/customRegistration.md -->
|
|
@@ -107,35 +99,31 @@ However, if you need to load multiple versions of the same component on a single
|
|
|
107
99
|
|
|
108
100
|
You can do this by importing only the component class and using the `register(name)` method with a unique name:
|
|
109
101
|
|
|
110
|
-
|
|
111
|
-
// Import the class only
|
|
102
|
+
<pre class="language-js"><code class="language-js">// Import the class only
|
|
112
103
|
import { AuroRadio, AuroRadioGroup } from '@aurodesignsystem/auro-formkit/auro-radio/class';
|
|
113
|
-
|
|
104
|
+
|
|
114
105
|
// Register with a custom name if desired
|
|
115
106
|
AuroRadio.register('custom-radio');
|
|
116
|
-
AuroRadioGroup.register('custom-radio-group')
|
|
117
|
-
```
|
|
107
|
+
AuroRadioGroup.register('custom-radio-group');</code></pre>
|
|
118
108
|
|
|
119
109
|
This will create a new custom element `<custom-radio>` and `<custom-radio-group>` that behaves exactly like `<auro-radio>` and `<auro-radio-group>`, allowing both to coexist on the same page without interfering with each other.
|
|
120
110
|
|
|
121
111
|
<div class="exampleWrapper exampleWrapper--flex">
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
112
|
+
<custom-radio-group>
|
|
113
|
+
<span slot="legend">Form label goes here</span>
|
|
114
|
+
<custom-radio id="customRadio1" label="Yes" name="radioDemo" value="yes"></custom-radio>
|
|
115
|
+
<custom-radio id="customRadio2" label="No" name="radioDemo" value="no"></custom-radio>
|
|
116
|
+
<custom-radio id="customRadio3" label="Maybe" name="radioDemo" value="maybe"></custom-radio>
|
|
117
|
+
</custom-radio-group>
|
|
128
118
|
</div>
|
|
129
119
|
<auro-accordion alignRight>
|
|
130
|
-
|
|
120
|
+
<span slot="trigger">See code</span>
|
|
131
121
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
</custom-radio-group>
|
|
139
|
-
```
|
|
122
|
+
<pre class="language-html"><code class="language-html"><custom-radio-group>
|
|
123
|
+
<span slot="legend">Form label goes here</span>
|
|
124
|
+
<custom-radio id="customRadio1" label="Yes" name="radioDemo" value="yes"></custom-radio>
|
|
125
|
+
<custom-radio id="customRadio2" label="No" name="radioDemo" value="no"></custom-radio>
|
|
126
|
+
<custom-radio id="customRadio3" label="Maybe" name="radioDemo" value="maybe"></custom-radio>
|
|
127
|
+
</custom-radio-group></code></pre>
|
|
140
128
|
</auro-accordion>
|
|
141
129
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
@@ -125,16 +125,16 @@ export class AuroRadioGroup extends LitElement {
|
|
|
125
125
|
*/
|
|
126
126
|
static register(name?: string): void;
|
|
127
127
|
_initializeDefaults(): void;
|
|
128
|
-
appearance: string;
|
|
129
|
-
disabled: boolean;
|
|
130
|
-
horizontal: boolean;
|
|
131
|
-
required: boolean;
|
|
128
|
+
appearance: string | undefined;
|
|
129
|
+
disabled: boolean | undefined;
|
|
130
|
+
horizontal: boolean | undefined;
|
|
131
|
+
required: boolean | undefined;
|
|
132
132
|
validity: any;
|
|
133
133
|
value: any;
|
|
134
|
-
optionSelected: EventTarget;
|
|
135
|
-
onDark: boolean;
|
|
136
|
-
touched: boolean;
|
|
137
|
-
hasLegend: boolean;
|
|
134
|
+
optionSelected: EventTarget | null | undefined;
|
|
135
|
+
onDark: boolean | undefined;
|
|
136
|
+
touched: boolean | undefined;
|
|
137
|
+
hasLegend: boolean | undefined;
|
|
138
138
|
/**
|
|
139
139
|
* @private
|
|
140
140
|
*/
|
|
@@ -197,7 +197,7 @@ export class AuroRadioGroup extends LitElement {
|
|
|
197
197
|
* @returns {void}
|
|
198
198
|
*/
|
|
199
199
|
private handleItems;
|
|
200
|
-
items: Element[];
|
|
200
|
+
items: Element[] | undefined;
|
|
201
201
|
/**
|
|
202
202
|
* Method for handling slot content changes.
|
|
203
203
|
* @private
|
|
@@ -120,13 +120,13 @@ export class AuroRadio extends LitElement {
|
|
|
120
120
|
*/
|
|
121
121
|
static register(name?: string): void;
|
|
122
122
|
_initializeDefaults(): void;
|
|
123
|
-
appearance: string;
|
|
123
|
+
appearance: string | undefined;
|
|
124
124
|
checked: any;
|
|
125
|
-
disabled: boolean;
|
|
126
|
-
required: boolean;
|
|
127
|
-
error: boolean;
|
|
128
|
-
onDark: boolean;
|
|
129
|
-
touched: boolean;
|
|
125
|
+
disabled: boolean | undefined;
|
|
126
|
+
required: boolean | undefined;
|
|
127
|
+
error: boolean | undefined;
|
|
128
|
+
onDark: boolean | undefined;
|
|
129
|
+
touched: boolean | undefined;
|
|
130
130
|
/**
|
|
131
131
|
* @private
|
|
132
132
|
*/
|
|
@@ -173,8 +173,8 @@ export class AuroRadio extends LitElement {
|
|
|
173
173
|
*/
|
|
174
174
|
private isRequired;
|
|
175
175
|
firstUpdated(): void;
|
|
176
|
-
input: HTMLInputElement;
|
|
177
|
-
inputId: string;
|
|
176
|
+
input: HTMLInputElement | null | undefined;
|
|
177
|
+
inputId: string | undefined;
|
|
178
178
|
render(): import("lit-html").TemplateResult<1>;
|
|
179
179
|
}
|
|
180
180
|
import { LitElement } from "lit";
|
|
@@ -1573,7 +1573,7 @@ class AuroHelpText extends LitElement {
|
|
|
1573
1573
|
}
|
|
1574
1574
|
}
|
|
1575
1575
|
|
|
1576
|
-
var formkitVersion = '
|
|
1576
|
+
var formkitVersion = '202604232250';
|
|
1577
1577
|
|
|
1578
1578
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
1579
1579
|
// See LICENSE in the project root for license information.
|
|
@@ -1573,7 +1573,7 @@ class AuroHelpText extends LitElement {
|
|
|
1573
1573
|
}
|
|
1574
1574
|
}
|
|
1575
1575
|
|
|
1576
|
-
var formkitVersion = '
|
|
1576
|
+
var formkitVersion = '202604232250';
|
|
1577
1577
|
|
|
1578
1578
|
// Copyright (c) Alaska Air. All right reserved. Licensed under the Apache-2.0 license
|
|
1579
1579
|
// See LICENSE in the project root for license information.
|
|
@@ -21,7 +21,18 @@ The following sections are editable by making changes to the following files:
|
|
|
21
21
|
|
|
22
22
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/description.md) -->
|
|
23
23
|
<!-- The below content is automatically added from ./docs/partials/description.md -->
|
|
24
|
-
|
|
24
|
+
<p>The component is a combination <auro-hyperlink href="https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements">HTML custom elements</auro-hyperlink> that consists of a pre-defined trigger element, <code><auro-menu></code> for the panel content. The <code><auro-select></code> element presents a menu of options. The options within the menu are represented by <code><auro-menu></code> and <code><auro-menuoption></code> elements. You can pre-select options for the user with the `selected` attribute as part of the <code><auro-menuoption></code> API.</p>
|
|
25
|
+
<p>The component is used to create a drop-down list for user input within a form. It acts as a container for options.</p>
|
|
26
|
+
<p>Key features:</p>
|
|
27
|
+
<ul>
|
|
28
|
+
<li>Preset values</li>
|
|
29
|
+
<li>Mark as required when in a form</li>
|
|
30
|
+
<li>Disable individual options or the entire component</li>
|
|
31
|
+
<li>Enable multi-select</li>
|
|
32
|
+
<li>Separate options into groups with dividers</li>
|
|
33
|
+
<li>Group options into nested levels</li>
|
|
34
|
+
<li>Autocomplete</li>
|
|
35
|
+
</ul>
|
|
25
36
|
<!-- AURO-GENERATED-CONTENT:END -->
|
|
26
37
|
<!-- AURO-GENERATED-CONTENT:START (FILE:src=./docs/partials/readmeAddlInfo.md) -->
|
|
27
38
|
<!-- The below content is automatically added from ./docs/partials/readmeAddlInfo.md -->
|
|
@@ -0,0 +1,65 @@
|
|
|
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/accessibility.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-select | Accessibility</title>
|
|
20
|
+
|
|
21
|
+
<!-- Prism.js Stylesheet -->
|
|
22
|
+
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/prismjs@1.24.1/themes/prism.css"/>
|
|
23
|
+
|
|
24
|
+
<!-- Legacy reference is still needed to support auro-select'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="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/demoWrapper.css" />
|
|
35
|
+
<link rel="stylesheet" type="text/css" href="https://cdn.jsdelivr.net/npm/@aurodesignsystem/webcorestylesheets@latest/dist/elementDemoStyles.css" />
|
|
36
|
+
<style>
|
|
37
|
+
table {
|
|
38
|
+
--ds-color-container-secondary-default: transparent;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
tr:not(:last-of-type) {
|
|
42
|
+
border-bottom: 1px solid var(--ds-color-border-tertiary-default);
|
|
43
|
+
}
|
|
44
|
+
</style>
|
|
45
|
+
</head>
|
|
46
|
+
<body class="auro-markdown">
|
|
47
|
+
<main></main>
|
|
48
|
+
|
|
49
|
+
<script type="module">
|
|
50
|
+
import 'https://cdn.jsdelivr.net/npm/marked@latest/marked.min.js';
|
|
51
|
+
import 'https://cdn.jsdelivr.net/npm/prismjs@latest/prism.js';
|
|
52
|
+
fetch('./accessibility.md')
|
|
53
|
+
.then((response) => response.text())
|
|
54
|
+
.then((text) => {
|
|
55
|
+
const rawHtml = marked.parse(text);
|
|
56
|
+
document.querySelector('main').innerHTML = rawHtml;
|
|
57
|
+
Prism.highlightAll();
|
|
58
|
+
});
|
|
59
|
+
</script>
|
|
60
|
+
|
|
61
|
+
<!-- If additional elements are needed for the demo, add them here. -->
|
|
62
|
+
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-header@latest/+esm" type="module"></script>
|
|
63
|
+
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-hyperlink@latest/+esm" type="module"></script>
|
|
64
|
+
</body>
|
|
65
|
+
</html>
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
<auro-header level="1" id="overview">Select - Accessibility</auro-header>
|
|
2
|
+
<div class="contentWrapper">
|
|
3
|
+
<div class="mainContent">
|
|
4
|
+
<div class="scrollWrapper">
|
|
5
|
+
The `auro-select` component follows the <a href="https://www.w3.org/WAI/ARIA/apg/patterns/combobox/examples/combobox-select-only/" target="_blank">W3C APG Select-Only Combobox</a> pattern. This page documents the ARIA semantics, screen reader announcements, and other accessibility behaviors built into the component.
|
|
6
|
+
|
|
7
|
+
For keyboard interaction details, see the <a href="./keyboardBehavior.html">Keyboard Behavior</a> page.
|
|
8
|
+
|
|
9
|
+
<auro-header level="2" id="ariaRolesAndAttributes">ARIA Roles and Attributes</auro-header>
|
|
10
|
+
<auro-header level="3" id="trigger">Trigger</auro-header>
|
|
11
|
+
The trigger element exposes the following ARIA attributes:
|
|
12
|
+
|
|
13
|
+
| Attribute | Value | Description |
|
|
14
|
+
|---|---|---|
|
|
15
|
+
| `role` | `combobox` | Identifies the trigger as a combobox control. |
|
|
16
|
+
| `aria-expanded` | `true` / `false` | Reflects whether the bib (listbox) is currently open. |
|
|
17
|
+
| `aria-controls` | `{bib-id}` | References the bib element that the trigger controls. |
|
|
18
|
+
| `aria-labelledby` | `{label-id}` | Associates the trigger with its visible label text. |
|
|
19
|
+
| `aria-activedescendant` | `{option-id}` | Points to the currently highlighted option when the bib is open. Cleared when the bib closes. |
|
|
20
|
+
|
|
21
|
+
<auro-header level="3" id="menuOptions">Menu Options</auro-header>
|
|
22
|
+
Each menu option exposes the following ARIA attributes:
|
|
23
|
+
|
|
24
|
+
| Attribute | Value | Description |
|
|
25
|
+
|---|---|---|
|
|
26
|
+
| `role` | `option` | Identifies each item as a selectable option. |
|
|
27
|
+
| `aria-selected` | `true` / `false` | Indicates whether the option is currently selected. |
|
|
28
|
+
| `aria-setsize` | `{count}` | Total number of options available, so screen readers can announce "option X of Y." |
|
|
29
|
+
| `aria-posinset` | `{index}` | The 1-based position of the option within the set. |
|
|
30
|
+
|
|
31
|
+
<auro-header level="3" id="helpTextAndErrors">Help Text and Errors</auro-header>
|
|
32
|
+
- Help text is associated with the component so screen readers can announce contextual guidance.
|
|
33
|
+
- When validation fails, the error message is rendered with `role="alert"` and `aria-live="assertive"` to ensure it is announced immediately.
|
|
34
|
+
|
|
35
|
+
<auro-header level="2" id="activeDescendant">Active Descendant</auro-header>
|
|
36
|
+
Focus management in `auro-select` follows the **active descendant** pattern rather than moving DOM focus between options:
|
|
37
|
+
|
|
38
|
+
1. When the bib opens, focus remains on the **trigger** element.
|
|
39
|
+
2. Arrow keys update `aria-activedescendant` on the trigger to reference the currently highlighted option.
|
|
40
|
+
3. This allows screen readers to announce each option as the user navigates without moving focus away from the trigger.
|
|
41
|
+
|
|
42
|
+
When the bib closes, `aria-activedescendant` is cleared so stale references are not announced.
|
|
43
|
+
|
|
44
|
+
<auro-header level="2" id="screenReaderAnnouncements">Screen Reader Announcements</auro-header>
|
|
45
|
+
The component uses a visually hidden live region (`aria-live="polite"`) to announce state changes:
|
|
46
|
+
|
|
47
|
+
- **Option highlighted** — When an option becomes active (via arrow keys or type-ahead), the live region announces the option text along with its selected state (e.g. "Apples, not selected").
|
|
48
|
+
- **Option selected** — After an option is selected, the live region announces the selected value (e.g. "Apples, selected"). This announcement is slightly delayed to avoid being overridden by the bib's collapse announcement.
|
|
49
|
+
|
|
50
|
+
<auro-header level="2" id="accessibleLabels">Accessible Labels</auro-header>
|
|
51
|
+
- The `label` slot content is used as the accessible name for both the trigger (via `aria-labelledby`) and the menu (via `aria-label`).
|
|
52
|
+
- A label is required. Without it, assistive technology users will not have context for what the select controls.
|
|
53
|
+
- The `(optional)` label is automatically appended when the `required` attribute is not set.
|
|
54
|
+
|
|
55
|
+
<auro-header level="2" id="fullscreenBehavior">Fullscreen (Modal) Behavior</auro-header>
|
|
56
|
+
On smaller viewports, the bib opens as a fullscreen modal dialog:
|
|
57
|
+
|
|
58
|
+
- The dialog is opened with `showModal()`, which provides **native focus trapping** — only elements inside the dialog are reachable via Tab.
|
|
59
|
+
- Content outside the dialog is automatically made **inert** by the browser, preventing interaction with the page behind it.
|
|
60
|
+
- The dialog receives an accessible label derived from the component's `label` slot text via `aria-labelledby`.
|
|
61
|
+
- A close button inside the dialog is focused when the modal opens, giving screen reader users an immediate action to dismiss it.
|
|
62
|
+
- Touch scrolling on the page behind the dialog is blocked to prevent the background from scrolling into view.
|
|
63
|
+
|
|
64
|
+
<auro-header level="2" id="reducedMotion">Reduced Motion</auro-header>
|
|
65
|
+
The component respects the `prefers-reduced-motion` media query. When the user has requested reduced motion, scroll animations (e.g. scrolling the selected or active option into view) use instant scrolling instead of smooth scrolling.
|
|
66
|
+
|
|
67
|
+
<auro-header level="2" id="formParticipation">Form Participation</auro-header>
|
|
68
|
+
A hidden native `<select>` element is rendered alongside the custom component with `aria-hidden="true"`. This element:
|
|
69
|
+
|
|
70
|
+
- Participates in HTML form submissions, ensuring the selected value is included in form data.
|
|
71
|
+
- Supports the `required` and `disabled` attributes.
|
|
72
|
+
- Is invisible and unreachable by assistive technology — all user interaction goes through the custom component.
|
|
73
|
+
|
|
74
|
+
</div>
|
|
75
|
+
</div>
|
|
76
|
+
</div>
|