From a6135f8ec1f6f9e138f147c7de871172008e67f8 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 6 Jul 2026 17:34:14 +0000 Subject: [PATCH 1/5] Initial plan From fbfeef3466a4a5e2d1035d99d1fdcabd2226570c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 6 Jul 2026 17:38:16 +0000 Subject: [PATCH 2/5] Fix disabled state for font size increase/decrease buttons at min/max --- package-lock.json | 8 -------- src/scripts/renderer.ts | 8 ++++++++ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 93b2c803..ca24206b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1162,7 +1162,6 @@ "integrity": "sha512-zORHqO/tuhxY1zWuTvMUqddRxpiFJ72xVfcNoWpqdLjs6lfPbuQBJuW4pk+49/uBMy7Ssr4bzgjiKmmDB1UbZQ==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@typescript-eslint/scope-manager": "8.59.4", "@typescript-eslint/types": "8.59.4", @@ -1406,7 +1405,6 @@ "integrity": "sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==", "dev": true, "license": "MIT", - "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -1766,7 +1764,6 @@ } ], "license": "MIT", - "peer": true, "dependencies": { "baseline-browser-mapping": "^2.10.12", "caniuse-lite": "^1.0.30001782", @@ -2580,7 +2577,6 @@ "integrity": "sha512-loXy6bWOoP3EP6JA7jo6p5jMpBJmHmsNZM5SFRHLdh1MGOPurMnNBj4ZlAbaqUAaQWbCr7jHV4P7gzAyryZWkQ==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.8.0", "@eslint-community/regexpp": "^4.12.2", @@ -3251,7 +3247,6 @@ "integrity": "sha512-PErok3DZSA5WGMd6XXV3IRNO0mlB+wW3OzhFJLEec1jSERg2j1bxJ6e5Fh6N6fn3FH2T9AP4UYNb/pYlADB9sA==", "dev": true, "license": "MIT", - "peer": true, "dependencies": { "glob-watcher": "^6.0.0", "gulp-cli": "^3.1.0", @@ -4759,7 +4754,6 @@ } ], "license": "MIT", - "peer": true, "dependencies": { "nanoid": "^3.3.12", "picocolors": "^1.1.1", @@ -5883,7 +5877,6 @@ "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==", "dev": true, "license": "MIT", - "peer": true, "engines": { "node": ">=12" }, @@ -5949,7 +5942,6 @@ "integrity": "sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==", "dev": true, "license": "Apache-2.0", - "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" diff --git a/src/scripts/renderer.ts b/src/scripts/renderer.ts index 8f0f468c..26df40a8 100644 --- a/src/scripts/renderer.ts +++ b/src/scripts/renderer.ts @@ -412,6 +412,7 @@ try { let defaultSize = parseInt(loc("WebClipper.FontSize.Preview.SansSerifDefault", "16px"), 10); if (defaultSize > 0) { articleFontSize = defaultSize; } } catch (e) { /* keep default 16 */ } +updateFontSizeButtonStates(); // Document title is set unconditionally; the page title and source URL arrive // in the loadContent port message and are populated there (no session-storage @@ -1429,6 +1430,11 @@ function applyArticleFontSize() { pDoc.body.style.fontSize = articleFontSize + "px"; } +function updateFontSizeButtonStates() { + fontDecreaseBtn.disabled = articleFontSize <= 8; + fontIncreaseBtn.disabled = articleFontSize >= 72; +} + function initHighlighter() { // Parent-window script operating on the sandboxed (allow-same-origin) preview-frame. createHighlighterInstance(); @@ -1525,12 +1531,14 @@ fontDecreaseBtn.addEventListener("click", () => { if (articleFontSize <= 8) { return; } articleFontSize -= 2; applyArticleFontSize(); + updateFontSizeButtonStates(); announceToScreenReader(strings.decreaseFontSize); }); fontIncreaseBtn.addEventListener("click", () => { if (articleFontSize >= 72) { return; } articleFontSize += 2; applyArticleFontSize(); + updateFontSizeButtonStates(); announceToScreenReader(strings.increaseFontSize); }); From 0381521b5176597b038f7a8f844d687cb1e6b154 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 6 Jul 2026 18:03:43 +0000 Subject: [PATCH 3/5] Add visual disabled state for font size buttons in CSS --- src/styles/renderer.less | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/styles/renderer.less b/src/styles/renderer.less index 6126ee4c..e83e1e29 100644 --- a/src/styles/renderer.less +++ b/src/styles/renderer.less @@ -161,8 +161,9 @@ iframe#preview-frame { color: @colorNeutralForeground1; cursor: pointer; border-radius: 4px; height: 28px; vertical-align: middle; padding: 0; transition: background 0.1s; - &:hover:not(.active) { background: @colorSubtleBackgroundHover; } + &:hover:not(.active):not(:disabled) { background: @colorSubtleBackgroundHover; } &:focus { outline: 2px solid @focusRingColor !important; outline-offset: 2px; } + &:disabled { opacity: 0.4; cursor: default; } &.active { background: @colorSubtleBackgroundHover; border-color: @colorCompoundBrandBackground; From ee97ca8ccca37d2ec5de3ed989e11480c68272bd Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 6 Jul 2026 18:18:21 +0000 Subject: [PATCH 4/5] Fix focus/narrator: use aria-disabled instead of native disabled on font size buttons --- src/scripts/renderer.ts | 4 ++-- src/styles/renderer.less | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/scripts/renderer.ts b/src/scripts/renderer.ts index 26df40a8..cbdda42e 100644 --- a/src/scripts/renderer.ts +++ b/src/scripts/renderer.ts @@ -1431,8 +1431,8 @@ function applyArticleFontSize() { } function updateFontSizeButtonStates() { - fontDecreaseBtn.disabled = articleFontSize <= 8; - fontIncreaseBtn.disabled = articleFontSize >= 72; + fontDecreaseBtn.setAttribute("aria-disabled", articleFontSize <= 8 ? "true" : "false"); + fontIncreaseBtn.setAttribute("aria-disabled", articleFontSize >= 72 ? "true" : "false"); } function initHighlighter() { diff --git a/src/styles/renderer.less b/src/styles/renderer.less index e83e1e29..b2894de7 100644 --- a/src/styles/renderer.less +++ b/src/styles/renderer.less @@ -161,9 +161,9 @@ iframe#preview-frame { color: @colorNeutralForeground1; cursor: pointer; border-radius: 4px; height: 28px; vertical-align: middle; padding: 0; transition: background 0.1s; - &:hover:not(.active):not(:disabled) { background: @colorSubtleBackgroundHover; } + &:hover:not(.active):not([aria-disabled="true"]) { background: @colorSubtleBackgroundHover; } &:focus { outline: 2px solid @focusRingColor !important; outline-offset: 2px; } - &:disabled { opacity: 0.4; cursor: default; } + &[aria-disabled="true"] { opacity: 0.4; cursor: default; } &.active { background: @colorSubtleBackgroundHover; border-color: @colorCompoundBrandBackground; From f7dab3d3349c22a71caca2aef74039887618e555 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 7 Jul 2026 05:48:47 +0000 Subject: [PATCH 5/5] Revert unintended package-lock.json changes --- package-lock.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/package-lock.json b/package-lock.json index ca24206b..93b2c803 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1162,6 +1162,7 @@ "integrity": "sha512-zORHqO/tuhxY1zWuTvMUqddRxpiFJ72xVfcNoWpqdLjs6lfPbuQBJuW4pk+49/uBMy7Ssr4bzgjiKmmDB1UbZQ==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@typescript-eslint/scope-manager": "8.59.4", "@typescript-eslint/types": "8.59.4", @@ -1405,6 +1406,7 @@ "integrity": "sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==", "dev": true, "license": "MIT", + "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -1764,6 +1766,7 @@ } ], "license": "MIT", + "peer": true, "dependencies": { "baseline-browser-mapping": "^2.10.12", "caniuse-lite": "^1.0.30001782", @@ -2577,6 +2580,7 @@ "integrity": "sha512-loXy6bWOoP3EP6JA7jo6p5jMpBJmHmsNZM5SFRHLdh1MGOPurMnNBj4ZlAbaqUAaQWbCr7jHV4P7gzAyryZWkQ==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.8.0", "@eslint-community/regexpp": "^4.12.2", @@ -3247,6 +3251,7 @@ "integrity": "sha512-PErok3DZSA5WGMd6XXV3IRNO0mlB+wW3OzhFJLEec1jSERg2j1bxJ6e5Fh6N6fn3FH2T9AP4UYNb/pYlADB9sA==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "glob-watcher": "^6.0.0", "gulp-cli": "^3.1.0", @@ -4754,6 +4759,7 @@ } ], "license": "MIT", + "peer": true, "dependencies": { "nanoid": "^3.3.12", "picocolors": "^1.1.1", @@ -5877,6 +5883,7 @@ "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": ">=12" }, @@ -5942,6 +5949,7 @@ "integrity": "sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==", "dev": true, "license": "Apache-2.0", + "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver"