diff --git a/.Jules/palette.md b/.Jules/palette.md index d8f0c25d5..7bd5fb8a5 100644 --- a/.Jules/palette.md +++ b/.Jules/palette.md @@ -23,3 +23,6 @@ ## 2026-08-04 - Status Semantics and Numeric Alignment for Reports **Learning:** Explicit status semantics can make conditionally rendered empty states easier to discover with assistive technology, while tabular numerals improve visual comparison of metric columns. Focus-reveal behavior must not depend only on `:focus-visible`, and hover styling must not reduce the contrast of unrelated rows. **Action:** Use `role="status"` for genuine conditionally rendered status messages, apply `font-variant-numeric: tabular-nums` to numeric report tables, reveal skip links on `:focus`, retain a visible `:focus-visible` indicator, and avoid opacity-based dimming of non-hovered content. +## 2025-05-18 - Prevent Mouse Focus Rings on Summary Elements +**Learning:** Native `` elements receive focus when clicked, causing browsers to display default focus rings that can be visually jarring for mouse users. +**Action:** Apply `outline: none` to the `:focus` state of `` elements while retaining custom, high-visibility outlines on their `:focus-visible` state to ensure both mouse and keyboard users receive appropriate feedback. diff --git a/python/fast_mlsirm/report.py b/python/fast_mlsirm/report.py index b8627f83d..f988e1434 100644 --- a/python/fast_mlsirm/report.py +++ b/python/fast_mlsirm/report.py @@ -217,9 +217,7 @@ def _render_dimensionality_report(payload: dict[str, Any]) -> list[str]: def _metric_section(heading: str, metrics: dict[str, Any]) -> str | None: """Render a labelled metric-card grid, or ``None`` when there are no metrics.""" if len(metrics) > MAX_REPORT_METRICS: - raise ValueError( - f"report metrics exceed the {MAX_REPORT_METRICS}-entry limit" - ) + raise ValueError(f"report metrics exceed the {MAX_REPORT_METRICS}-entry limit") cards = [] for key, value in metrics.items(): @@ -443,13 +441,9 @@ def _rows_from_columnar(section: Any) -> list[dict[str, Any]]: if row_count == 0: return [] if row_count > MAX_REPORT_ROWS: - raise ValueError( - f"report table rows exceed the {MAX_REPORT_ROWS}-row limit" - ) + raise ValueError(f"report table rows exceed the {MAX_REPORT_ROWS}-row limit") if row_count * len(columns) > MAX_REPORT_CELLS: - raise ValueError( - f"report table cells exceed the {MAX_REPORT_CELLS}-cell limit" - ) + raise ValueError(f"report table cells exceed the {MAX_REPORT_CELLS}-cell limit") rows = [] for index in range(row_count): @@ -463,9 +457,7 @@ def _rows_from_columnar(section: Any) -> list[dict[str, Any]]: def _validate_report_rows(rows: list[dict[str, Any]]) -> None: """Reject row-oriented diagnostics that exceed report rendering budgets.""" if len(rows) > MAX_REPORT_ROWS: - raise ValueError( - f"report table rows exceed the {MAX_REPORT_ROWS}-row limit" - ) + raise ValueError(f"report table rows exceed the {MAX_REPORT_ROWS}-row limit") columns: set[str] = set() cell_count = 0 @@ -925,6 +917,11 @@ def _css() -> str: color: var(--teal); } +.exact-values > summary:focus, +.export-block > summary:focus { + outline: none; +} + .exact-values > summary:focus-visible, .export-block > summary:focus-visible { outline: 3px solid var(--teal);