From 4f0a0f39691096676cdffb725b8ac633ae210a43 Mon Sep 17 00:00:00 2001 From: Lee Cattarin Date: Thu, 14 May 2026 08:45:31 -0700 Subject: [PATCH] move tabindex setting to modal controls --- _includes/layouts/post.njk | 2 +- js/modal.js | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/_includes/layouts/post.njk b/_includes/layouts/post.njk index 288d5b97..d361b65c 100644 --- a/_includes/layouts/post.njk +++ b/_includes/layouts/post.njk @@ -36,7 +36,7 @@ layout: base.njk {{ image.alt }} - {{ image.alt }} + {{ image.alt }} {% endif %} {{ content | safe }} diff --git a/js/modal.js b/js/modal.js index 430d5bc8..c2abe3e6 100644 --- a/js/modal.js +++ b/js/modal.js @@ -4,6 +4,8 @@ if (window.innerWidth > 650) { const closeButton = document.querySelector(".close-dialog"); const hero = document.querySelector(".hero"); + hero.tabIndex = 0; + hero.addEventListener("click", (e) => dialog.showModal()); hero.addEventListener("keydown", (e) => { if (e.key === "Enter" || e.key === " ") {