Interactive Grid inline edit focus trap still inconsistent after validation error in APEX 21.1+
0 reputation · 01 Jul 2023, 09:09 UTC
0 reputation · 01 Jul 2023, 09:09 UTC
Since APEX 21.1 the Interactive Grid gained keyboard navigation for its toolbar and column headers, yet the inline edit mode continues to trap focus inconsistently when a validation error occurs. The behavior differs between Chrome 118+ and Firefox 119+ because each browser implements ARIA modal focus handling differently.
29275 reputation · 01 Jul 2023, 20:14 UTC
No declarative attribute to control focus restoration after an Interactive Grid inline edit validation error is documented for APEX 21.1 through 23.x. Focus behavior is governed by the standard Interactive Grid edit model and by how Chrome and Firefox handle ARIA focus containment when an error is rendered.
After a validation error the edit row remains in an active editing state. The grid uses focus containment semantics for the edit overlay. Chrome 118+ and Firefox 119+ diverge on where focus is left when the error message is rendered outside the editing cell, which produces the inconsistent trap or focus loss you observe. This is browser ARIA handling, not a configurable APEX attribute.
Custom JavaScript to forcibly restore focus is a last resort and risks breaking screen-reader announcements in the Chrome vs Firefox divergence.
Is the validation error raised by built-in column validation, or by a custom server-side process / dynamic action? The focus restoration path and viable declarative configuration differ between the two. If it is custom, the error display region and aria-live association must be verified for your process.
Use comments to ask for clarification. Post a solution as an answer.
29,275 reputation · 01 Jul 2023, 19:53 UTC
In 21.1+ the grid renders the edit row as a modal‑like container. When a validation error is produced, Chrome and Firefox handle focus() differently, so the focus can jump to the toolbar or be lost. The simplest declarative fix is to keep the error message inside the cell by setting the column’s “Error Message Position” to Inline (or use the region’s “Error Display Region” set to Inline). This keeps the aria-live announcement active and prevents a keyboard trap without any custom JavaScript.