diff --git a/.jules/palette.md b/.jules/palette.md index ee48ab0ea..1463b6968 100644 --- a/.jules/palette.md +++ b/.jules/palette.md @@ -47,3 +47,7 @@ ## 2025-02-12 - Exposing Unrounded Numeric Representations for Formatted Floats **Learning:** In data-heavy HTML reports, formatting floats to a fixed number of significant digits can obscure the original Python float representation. A native `title` tooltip can help pointer users inspect that unrounded representation, but it is not a reliable keyboard, touch, or assistive-technology disclosure mechanism. **Action:** Add the unrounded Python float representation as a supplemental native `title` tooltip on formatted values. Preserve the report's accessible exact-value disclosure and JSON/CSV exports as the authoritative non-hover paths; never claim that `title` alone provides accessibility. + +## 2025-02-13 - Empty States ARIA Live Regions +**Learning:** In HTML reports, simply using generic tags like `
` for empty states (such as an empty list of triggers) fails to proactively announce the absence of data to screen reader users navigating dynamically. +**Action:** Always use `
{escape(empty_message)}
' + return f'{escape(identifier)}{escape(_VALIDITY_NOTICE)}
', - 'The complete deterministic evidence payload is available below for audit reconstruction.
', + "The complete deterministic evidence payload is available below for audit reconstruction.
", '',
_canonical_json(report),
"",
@@ -236,9 +235,7 @@ def render_essay_validation_evidence_report_html(
if output.suffix.lower() != ".html":
raise ValueError("essay validation evidence output path must end with .html")
if title is not None and (not isinstance(title, str) or not title.strip()):
- raise ValueError(
- "essay validation evidence title must be a non-empty string"
- )
+ raise ValueError("essay validation evidence title must be a non-empty string")
resolved_title = _DEFAULT_TITLE if title is None else title
output.parent.mkdir(parents=True, exist_ok=True)
output.write_text(_render_html(validated, resolved_title), encoding="utf-8")
diff --git a/tests/test_scoring_essay_validation_report_html.py b/tests/test_scoring_essay_validation_report_html.py
index 27a5739c2..97e12ac88 100644
--- a/tests/test_scoring_essay_validation_report_html.py
+++ b/tests/test_scoring_essay_validation_report_html.py
@@ -80,18 +80,24 @@ def test_custom_title_and_identifiers_are_escaped(tmp_path: Path) -> None:
assert "<img src=x onerror="alert(1)">" in html
assert "review_<unsafe>review_<unsafe>No boundary is available.
' + assert ( + validation_report_html._identifier_list( + (), + empty_message="No boundary is available.", + ) + == '