@@ -23,6 +23,7 @@ const EnlargeActionIcon = ActionIcon.withProps({
2323 variant : "subtle" ,
2424 color : "gray" ,
2525 size : "sm" ,
26+ tabIndex : - 1 ,
2627} ) ;
2728
2829/**
@@ -35,10 +36,18 @@ const EnlargeActionIcon = ActionIcon.withProps({
3536 * the newlines already typed, and either answer (silently discard them, or keep
3637 * a value the field can no longer display) is worse than staying enlarged.
3738 *
38- * Unlike ClearButton it stays in the keyboard tab order. Clearing a field has a
39- * keyboard equivalent (select-all, delete), so #1487 could take that button out
40- * of the tab order without cost; entering multiline mode has none, so removing
41- * this one would put the feature out of reach of keyboard users entirely.
39+ * `tabIndex={-1}` keeps it clickable but out of the keyboard tab order, the same
40+ * as ClearButton (#1487) — a form's string fields each carry one, so leaving
41+ * them in doubled the tab stops between one field and the next (#2138).
42+ *
43+ * That is only affordable because the keyboard keeps its own way in: SchemaForm
44+ * binds Enter on the single-line field, which enlarges it and enters the
45+ * newline in one go. Nothing else is listening for that key there, and it is
46+ * the one a user presses trying to type the newline the field cannot hold — so
47+ * the gesture that fails is the gesture that fixes it. Do not take this button
48+ * out of the tab order anywhere that binding is absent; unlike clearing
49+ * (select-all, delete) there is no built-in equivalent, and multiline mode
50+ * would simply be unreachable by keyboard.
4251 */
4352export function EnlargeButton ( {
4453 onClick,
0 commit comments