Work the design critique down: chapter format, colour law, search, strip, a11y #11
@@ -106,7 +106,12 @@ function toggleConfirmRow(key, kind) {
|
||||
// unhides: it makes the announcement deterministic, keeps tab order inside
|
||||
// the confirm instead of running on into the next card, and means the row
|
||||
// cannot be opened and scrolled past unnoticed.
|
||||
if (row && !row.hidden) row.querySelector("button").focus();
|
||||
// The reversible rows open on their affirmative; remove opens on Cancel.
|
||||
// Focusing the first button in DOM order would hand the irreversible action
|
||||
// a pre-armed Enter, which is the opposite of what a confirm gate is for.
|
||||
if (row && !row.hidden) {
|
||||
row.querySelector(row.classList.contains("calm") ? "button" : "button + button").focus();
|
||||
}
|
||||
}
|
||||
|
||||
// Esc closes whichever panel this card has open and hands focus back to the
|
||||
|
||||
Reference in New Issue
Block a user