From 431e329490952f514ffcf35923ee860ea527b145 Mon Sep 17 00:00:00 2001 From: Rito Rhymes <83614463+ritorhymes@users.noreply.github.com> Date: Fri, 26 Dec 2025 05:53:38 -0500 Subject: [PATCH 1/4] enable h1-3 wrapdown to prevent long function strings from breaking page width on mobile Signed-off-by: Rito Rhymes <83614463+ritorhymes@users.noreply.github.com> --- source/stylesheets/screen.css.scss | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/stylesheets/screen.css.scss b/source/stylesheets/screen.css.scss index 7af4df7..8f166e4 100644 --- a/source/stylesheets/screen.css.scss +++ b/source/stylesheets/screen.css.scss @@ -390,6 +390,10 @@ html, body { margin-bottom: 0.8em; } + // Ensure long operation names wrap on small screens + h1, h2, h3 { + overflow-wrap: anywhere; + } h4, h5, h6 { font-size: 15px; From 5044f7bcbf9cab3ea20243c8287d7494b25269e9 Mon Sep 17 00:00:00 2001 From: Rito Rhymes <83614463+ritorhymes@users.noreply.github.com> Date: Fri, 26 Dec 2025 05:56:45 -0500 Subject: [PATCH 2/4] Add space under .highlight on mobile so it isn't directly touching content underneath it Signed-off-by: Rito Rhymes <83614463+ritorhymes@users.noreply.github.com> --- source/stylesheets/screen.css.scss | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/stylesheets/screen.css.scss b/source/stylesheets/screen.css.scss index 8f166e4..003bb64 100644 --- a/source/stylesheets/screen.css.scss +++ b/source/stylesheets/screen.css.scss @@ -613,6 +613,10 @@ html, body { %right-col + %left-col { margin-top: $main-padding; } + + .highlight { + margin-bottom: 1em; + } } .highlight .c, .highlight .cm, .highlight .c1, .highlight .cs { From dabe45e18c557848de38c848edb744cae4a0a94c Mon Sep 17 00:00:00 2001 From: Rito Rhymes <83614463+ritorhymes@users.noreply.github.com> Date: Fri, 26 Dec 2025 14:12:25 -0500 Subject: [PATCH 3/4] Improve a11y for TOC navigation Convert TOC wrapper to a semantic landmark with aria-label and a stable id for aria-controls. Keep nav button aria-expanded synced on open/close. Set aria-current='location' on the active ToC link and clear it from the previous active link. Close the ToC via Escape key when the nav toggle is visible. Signed-off-by: Rito Rhymes <83614463+ritorhymes@users.noreply.github.com> --- source/javascripts/app/_toc.js | 20 ++++++++++++++++++-- source/layouts/layout.erb | 6 +++--- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/source/javascripts/app/_toc.js b/source/javascripts/app/_toc.js index eb20fef..8f340f9 100644 --- a/source/javascripts/app/_toc.js +++ b/source/javascripts/app/_toc.js @@ -22,6 +22,8 @@ var closeToc = function() { $(".toc-wrapper").removeClass('open'); $("#nav-button").removeClass('open'); + // Ensure ARIA state is synced + $("#nav-button").attr("aria-expanded", "false"); }; function loadToc($toc, tocLinkSelector, tocListSelector, scrollOffset) { @@ -70,9 +72,9 @@ if (!$best.hasClass("active")) { // .active is applied to the ToC link we're currently on, and its parent