diff --git a/turnstone/console/static/governance.js b/turnstone/console/static/governance.js index 976a14cc..0c5b0868 100644 --- a/turnstone/console/static/governance.js +++ b/turnstone/console/static/governance.js @@ -1527,8 +1527,15 @@ function showEditTemplateModal(tmplId) { ); // Focus management — only on the initial open. Re-renders preserve // wherever focus was so a screen reader doesn't get a transition. + // For readonly skills, prefer the lock button so keyboard users land + // on the unlock affordance instead of having to Tab past every + // disabled spec field to reach it. Cancel is still one Shift-Tab away. if (isReadonly) { - if (cancelBtn) cancelBtn.focus(); + if (lockBtn && lockBtn.style.display !== "none") { + lockBtn.focus(); + } else if (cancelBtn) { + cancelBtn.focus(); + } } else { document.getElementById("etm-name").focus(); } diff --git a/turnstone/console/static/index.html b/turnstone/console/static/index.html index fcd67ee0..bd7a4f4a 100644 --- a/turnstone/console/static/index.html +++ b/turnstone/console/static/index.html @@ -3307,7 +3307,7 @@ aria-label="Customize skill (detach from upstream and unlock editing)" title="Customize — detach from upstream and unlock editing" > - +