From d3b9f7af14cdb6c8aa2d6984329afa16ad1a91be Mon Sep 17 00:00:00 2001 From: Jarvis Jr Hermes Date: Sun, 4 Oct 2026 11:43:00 +0000 Subject: [PATCH] fix: use cross-only fullscreen diagram close control --- scripts/portal.test.mjs | 10 ++++++++++ src/components/ArchifyDiagram/index.tsx | 2 +- src/css/custom.css | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/scripts/portal.test.mjs b/scripts/portal.test.mjs index db8db31..111b01c 100644 --- a/scripts/portal.test.mjs +++ b/scripts/portal.test.mjs @@ -65,6 +65,16 @@ test('Archify is pinned, licensed and rebuilt, not a remote embed', () => { assert(wrapper.includes('aria-hidden="true"')); assert(read('src/css/custom.css').includes('justify-content: flex-end')); }); +test('full-screen close is cross-only with an accessible name and square touch target', () => { + const wrapper = read('src/components/ArchifyDiagram/index.tsx'); + const button = wrapper.match(/]*aria-label="Close full-screen diagram"[^>]*>(.*?)<\/button>/s); + assert(button, 'close button retains its accessible name'); + assert.equal(button[1], ''); + assert(button[0].includes('autoFocus') && button[0].includes('onClick={close}')); + const styles = read('src/css/custom.css').match(/\.archify-modal-toolbar button \{([^}]+)\}/)[1]; + assert(styles.includes('width: 44px') && styles.includes('height: 44px')); + assert(styles.includes('padding: 0') && styles.includes('flex-shrink: 0')); +}); test('Product owns two teams and Technology owns five separate teams', () => { const spec = JSON.parse(read('diagrams/organization-structure.architecture.json')); const page = read('docs/organization/structure.mdx'); diff --git a/src/components/ArchifyDiagram/index.tsx b/src/components/ArchifyDiagram/index.tsx index 8c6467a..656e1b7 100644 --- a/src/components/ArchifyDiagram/index.tsx +++ b/src/components/ArchifyDiagram/index.tsx @@ -20,7 +20,7 @@ export default function ArchifyDiagram({name, title, compact = false}: {name: st