diff --git a/viewer/style.css b/viewer/style.css index 7c6b29f..3b07501 100644 --- a/viewer/style.css +++ b/viewer/style.css @@ -54,6 +54,11 @@ outline: 3px solid #bb773c; outline-offset: 3px; } +/* SVG groups otherwise receive a rectangular outline around their bounds. + Their keyboard focus uses the tile-shaped overlay instead. */ +.vanuatu .map-cell:focus { + outline: none; +} .vanuatu .action-dock button { background-image: linear-gradient(#ffffff38, #b9955720); box-shadow: @@ -448,6 +453,7 @@ stroke-dasharray: 8 5; } .vanuatu .cell-highlight.legal.hovered, +.vanuatu .cell-highlight.focused, .vanuatu .cell-highlight.selected { stroke: #9c692c; stroke-width: 5; diff --git a/viewer/ui.js b/viewer/ui.js index db57d8f..8dafbbb 100644 --- a/viewer/ui.js +++ b/viewer/ui.js @@ -460,6 +460,7 @@ export function mountGame(target, options = {}) { cell.removeAttribute(attribute); } } + updateMapFocus(); if (focus) play .querySelector(`[data-action="${focus}"]`) @@ -517,6 +518,7 @@ export function mountGame(target, options = {}) { // Patch in place so cached SVG tile images and focused controls survive // preference changes and incoming state updates. patch(play, `