diff --git a/.Jules/palette.md b/.Jules/palette.md index 8a5a46f6c..8e19c9994 100644 --- a/.Jules/palette.md +++ b/.Jules/palette.md @@ -8,3 +8,6 @@ ## 2024-10-24 - CSS Bar Chart Animation **Learning:** CSS animations can enhance static data visualizations without requiring JavaScript, providing visual polish and reducing perceived loading times for data. **Action:** Use CSS keyframe animations for simple visual improvements in static reports. +## 2024-11-05 - ARIA Live Region for Empty States +**Learning:** Using `role="status"` (an ARIA live region role) on empty state container elements (like a `
`) instead of standard paragraph tags ensures assistive technologies like screen readers actively announce when no data or rows are recorded, without interrupting the user's flow. +**Action:** Always use `
` for empty states instead of basic paragraphs. diff --git a/python/fast_mlsirm/report.py b/python/fast_mlsirm/report.py index 30ee4276b..86cccf5da 100644 --- a/python/fast_mlsirm/report.py +++ b/python/fast_mlsirm/report.py @@ -312,7 +312,7 @@ def _bar_chart(rows: list[dict[str, Any]], value_key: str | None) -> str: def _table(rows: list[dict[str, Any]], *, label: str, limit: int = 12) -> str: if not rows: - return '

No rows were recorded in this section.

' + return '
No rows were recorded in this section.
' columns = _columns(rows) body_rows = []