Commit ec6b358
fix(core): improve ATFocus, Combobox, Internals, Listbox, and RovingTabIndex controllers (#2963)
* fix(core): if `relatedTarget` is toggle, let `#onClickButton` manage toggle behavior
* fix(core): ensure RTI syncs AT focus when using a combo of mouse and keyboard
* fix(core): force to always search forward for Home and backward for End key presses
* fix(core): hide listbox on Shift+Tab when moving to the toggle button
* feat(core): add optional `setItems` callback to listbox and combobox controller
* Revert "feat(core): add optional `setItems` callback to listbox and combobox controller"
This reverts commit ba6a0dc.
* feat(core): let the internals controller handle `aria-posinset` and `aria-setsize`
* fix(core): narrow host type for combobox, internals controllers
* fix(core): allow dynamically added options to receive keyboard focus
* fix(core): update host when setting listbox items
* fix(core): getAria(PosInSet/SetSize) query attributes first, fall back to EI
Attributes are user settings, internals are defaults, so we need to try
the attributes first
* fix(core): map shadow item back to light dom
* fix(core): manage state when initializing items in ComboboxController
* refactor(core): simplify arraysAreEquivalent
* fix(core): refresh items on `#show` so that dynamically added options are keyboard focusable
* fix(core): fix arrow up/down focus wrapping after initial selection has been made
* fix(select): don't steal browser focus on page load
* test(select): change test to call `focus()` vs using the `focus` method
* fix(core): add explicit extension for `ATFocusController` type import
* test(core): atFocusedItemIndex setter
* refactor(core): atFocusedItemIndex setter
refactors for readability
* refactor(core): make ATFocusController initItems internal
* docs: changesets
---------
Co-authored-by: Benny Powers <web@bennypowers.com>1 parent f43c1bc commit ec6b358
File tree
13 files changed
+529
-94
lines changed- .changeset
- core/pfe-core
- controllers
- test
- functions
- elements/pf-select
- test
13 files changed
+529
-94
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
137 | | - | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
138 | 141 | | |
139 | 142 | | |
140 | 143 | | |
| |||
150 | 153 | | |
151 | 154 | | |
152 | 155 | | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
153 | 162 | | |
154 | 163 | | |
155 | 164 | | |
| |||
159 | 168 | | |
160 | 169 | | |
161 | 170 | | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
162 | 187 | | |
163 | 188 | | |
164 | 189 | | |
| |||
195 | 220 | | |
196 | 221 | | |
197 | 222 | | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
198 | 228 | | |
199 | 229 | | |
200 | 230 | | |
| |||
214 | 244 | | |
215 | 245 | | |
216 | 246 | | |
| 247 | + | |
217 | 248 | | |
218 | 249 | | |
219 | 250 | | |
| |||
236 | 267 | | |
237 | 268 | | |
238 | 269 | | |
239 | | - | |
| 270 | + | |
| 271 | + | |
240 | 272 | | |
241 | 273 | | |
242 | 274 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
51 | | - | |
52 | | - | |
| 50 | + | |
53 | 51 | | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
73 | 81 | | |
74 | | - | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
75 | 95 | | |
76 | 96 | | |
77 | 97 | | |
| |||
106 | 126 | | |
107 | 127 | | |
108 | 128 | | |
109 | | - | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
110 | 133 | | |
111 | | - | |
| 134 | + | |
112 | 135 | | |
113 | 136 | | |
114 | 137 | | |
| |||
130 | 153 | | |
131 | 154 | | |
132 | 155 | | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
133 | 172 | | |
134 | 173 | | |
135 | 174 | | |
| |||
183 | 222 | | |
184 | 223 | | |
185 | 224 | | |
186 | | - | |
| 225 | + | |
187 | 226 | | |
188 | 227 | | |
189 | 228 | | |
190 | | - | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
191 | 232 | | |
192 | 233 | | |
193 | 234 | | |
194 | 235 | | |
195 | | - | |
| 236 | + | |
| 237 | + | |
196 | 238 | | |
197 | 239 | | |
198 | 240 | | |
199 | | - | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
200 | 244 | | |
201 | 245 | | |
202 | 246 | | |
203 | 247 | | |
| 248 | + | |
204 | 249 | | |
205 | 250 | | |
206 | 251 | | |
| |||
0 commit comments