Commit 0c19bf5
[ES|QL] Index editor- Improve accessibility (elastic#240462)
Part of elastic#235730
## Summary
Provides a more consistent keyboard accessibility experience for the
index editor.
* `Tab` moves the focus to the next element in the page (The Close X
button).
* `Arrows` allow to move between cells and headers.
* `Enter` on cells trigger the edit mode.
* `Enter` on headers opens the header actions (Edit or Delete).
* `Enter` on the input edit mode, saves the changes and focus the
cell/header.
* `Esc` goes out of the edit mode without saving, keeps focus on the
cell/header.
### Before
* Focus was lost from the flyout after saving a column name or hitting
`Esc`.
* 2 enters were required to edit a column name, after the first enter,
this was shown:
<img width="321" height="56" alt="image"
src="https://github.com/user-attachments/assets/c3056fcb-bc13-443d-ac94-893c4d05b503"
/>

### After
* Focus remains set to column header cell after exiting the name input,
allowing to continue to do editions without using the mouse.
* Editing the column name is now a header action.
<img width="317" height="187" alt="image"
src="https://github.com/user-attachments/assets/1f7ba575-a91d-49fd-84cf-a72297a09ba3"
/>
* You can still access the edition mode by clicking the name with the
mouse.
* For editing using the keyboard, you need to hit enter, and then select
the edit action.
**Why is this needed?**
The datagrid wont let us handle correctly the focus if there are other
actions available in the header, in our case we have `Delete columns and
values`, this has a good accessibility reason as this action will become
inaccessible if we open the edition mode straight away.
* Hitting tab while editing the next column, now moves to the first
column of the next row.
1 parent 78660ac commit 0c19bf5
File tree
3 files changed
+153
-69
lines changed- src/platform/packages/private/kbn-index-editor/src/components
- grid_custom_renderers
3 files changed
+153
-69
lines changedLines changed: 34 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| |||
67 | 68 | | |
68 | 69 | | |
69 | 70 | | |
| 71 | + | |
| 72 | + | |
70 | 73 | | |
71 | 74 | | |
72 | 75 | | |
| |||
164 | 167 | | |
165 | 168 | | |
166 | 169 | | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
183 | 201 | | |
184 | 202 | | |
185 | 203 | | |
| |||
Lines changed: 106 additions & 50 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | | - | |
14 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
15 | 23 | | |
| 24 | + | |
16 | 25 | | |
17 | 26 | | |
18 | 27 | | |
19 | 28 | | |
20 | 29 | | |
| 30 | + | |
| 31 | + | |
21 | 32 | | |
22 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
23 | 37 | | |
24 | 38 | | |
25 | 39 | | |
26 | 40 | | |
27 | 41 | | |
28 | 42 | | |
29 | 43 | | |
| 44 | + | |
| 45 | + | |
30 | 46 | | |
31 | | - | |
| 47 | + | |
32 | 48 | | |
33 | 49 | | |
34 | 50 | | |
| 51 | + | |
35 | 52 | | |
36 | 53 | | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
37 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
38 | 73 | | |
39 | 74 | | |
40 | 75 | | |
| |||
55 | 90 | | |
56 | 91 | | |
57 | 92 | | |
| 93 | + | |
| 94 | + | |
58 | 95 | | |
59 | | - | |
| 96 | + | |
60 | 97 | | |
61 | 98 | | |
62 | 99 | | |
63 | | - | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
64 | 107 | | |
65 | 108 | | |
66 | 109 | | |
67 | 110 | | |
68 | | - | |
69 | | - | |
70 | 111 | | |
71 | 112 | | |
72 | 113 | | |
73 | 114 | | |
74 | 115 | | |
75 | 116 | | |
76 | | - | |
77 | | - | |
| 117 | + | |
| 118 | + | |
78 | 119 | | |
79 | 120 | | |
80 | 121 | | |
81 | 122 | | |
82 | 123 | | |
83 | 124 | | |
84 | 125 | | |
| 126 | + | |
85 | 127 | | |
86 | | - | |
87 | 128 | | |
88 | 129 | | |
89 | 130 | | |
90 | 131 | | |
91 | 132 | | |
92 | 133 | | |
93 | 134 | | |
94 | | - | |
| 135 | + | |
95 | 136 | | |
96 | 137 | | |
97 | 138 | | |
| |||
110 | 151 | | |
111 | 152 | | |
112 | 153 | | |
113 | | - | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
114 | 167 | | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
144 | 203 | | |
145 | 204 | | |
146 | 205 | | |
147 | 206 | | |
148 | 207 | | |
149 | 208 | | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
150 | 212 | | |
151 | 213 | | |
152 | 214 | | |
153 | 215 | | |
154 | 216 | | |
| 217 | + | |
155 | 218 | | |
156 | 219 | | |
157 | 220 | | |
158 | 221 | | |
159 | 222 | | |
160 | 223 | | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
| 224 | + | |
169 | 225 | | |
170 | 226 | | |
171 | 227 | | |
| |||
Lines changed: 13 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
87 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
88 | 98 | | |
89 | | - | |
| 99 | + | |
90 | 100 | | |
91 | 101 | | |
92 | 102 | | |
| |||
0 commit comments