From 6bbb66e7d6148b3f8fc01e12c2a3954d28c8e6c0 Mon Sep 17 00:00:00 2001 From: seonghobae <8172694+seonghobae@users.noreply.github.com> Date: Sun, 23 Aug 2026 19:04:52 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Palette:=20=ED=82=A4=EB=B3=B4?= =?UTF-8?q?=EB=93=9C=20=EC=82=AC=EC=9A=A9=EC=84=B1=20=ED=96=A5=EC=83=81?= =?UTF-8?q?=EC=9D=84=20=EC=9C=84=ED=95=9C=20=ED=85=8C=EC=9D=B4=EB=B8=94=20?= =?UTF-8?q?=EB=B0=8F=20=EC=BD=94=EB=93=9C=20=EC=BB=A8=ED=85=8C=EC=9D=B4?= =?UTF-8?q?=EB=84=88=20=ED=8F=AC=EC=BB=A4=EC=8A=A4=20=EC=8A=A4=ED=83=80?= =?UTF-8?q?=EC=9D=BC=EB=A7=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit updates the CSS in `fast_mlsirm/scoring/essay/report_html.py` to suppress default browser focus outlines on pointer interactions for scrollable elements (`.table-scroll` and `pre`). It preserves focus outlines for keyboard navigation via `:focus-visible`. Corresponding tests in `test_scoring_essay_report_html.py` and `test_scoring_essay_report_pointer_focus.py` were updated to reflect these changes. --- python/fast_mlsirm/scoring/essay/report_html.py | 1 + tests/test_scoring_essay_report_html.py | 1 + tests/test_scoring_essay_report_pointer_focus.py | 5 +++++ 3 files changed, 7 insertions(+) diff --git a/python/fast_mlsirm/scoring/essay/report_html.py b/python/fast_mlsirm/scoring/essay/report_html.py index ed53f3b16..370c11d34 100644 --- a/python/fast_mlsirm/scoring/essay/report_html.py +++ b/python/fast_mlsirm/scoring/essay/report_html.py @@ -220,6 +220,7 @@ def _css() -> str: .details-grid dt { font-weight: 700; } .details-grid dd { margin: 0; overflow-wrap: anywhere; } .table-scroll { overflow-x: auto; } +.table-scroll:focus:not(:focus-visible), pre:focus:not(:focus-visible) { outline: none; } .table-scroll:focus-visible, pre:focus-visible { outline: 3px solid Highlight; outline-offset: 3px; } table { width: 100%; border-collapse: collapse; } caption { text-align: left; font-weight: 700; margin-bottom: 8px; } diff --git a/tests/test_scoring_essay_report_html.py b/tests/test_scoring_essay_report_html.py index f3ece1fed..703216863 100644 --- a/tests/test_scoring_essay_report_html.py +++ b/tests/test_scoring_essay_report_html.py @@ -110,6 +110,7 @@ def test_clean_report_renders_deterministic_accessible_exact_values( ) in first assert "main:focus-visible" in first assert "main:focus:not(:focus-visible) { outline: none; }" in first + assert ".table-scroll:focus:not(:focus-visible), pre:focus:not(:focus-visible) { outline: none; }" in first assert "font-variant-numeric: tabular-nums;" in first assert "@media (prefers-reduced-motion: reduce)" in first assert "transition-duration: 0.01ms !important;" in first diff --git a/tests/test_scoring_essay_report_pointer_focus.py b/tests/test_scoring_essay_report_pointer_focus.py index 04a12c170..bffe036d0 100644 --- a/tests/test_scoring_essay_report_pointer_focus.py +++ b/tests/test_scoring_essay_report_pointer_focus.py @@ -11,3 +11,8 @@ def test_main_pointer_focus_suppresses_default_outline_without_hiding_keyboard_f assert "main:focus:not(:focus-visible) { outline: none; }" in css assert "main:focus { outline: none; }" not in css assert "main:focus-visible { outline: 3px solid Highlight; outline-offset: 3px; }" in css + + assert ".table-scroll:focus:not(:focus-visible), pre:focus:not(:focus-visible) { outline: none; }" in css + assert ".table-scroll:focus { outline: none; }" not in css + assert "pre:focus { outline: none; }" not in css + assert ".table-scroll:focus-visible, pre:focus-visible { outline: 3px solid Highlight; outline-offset: 3px; }" in css