diff --git a/.jules/palette.md b/.jules/palette.md index 74cddb7ad..90198e8bc 100644 --- a/.jules/palette.md +++ b/.jules/palette.md @@ -19,3 +19,7 @@ ## 2024-07-13 - CLI Debugging Stack Traces **Learning:** Adding a `FAST_MLSIRM_DEBUG` bypass to user-friendly `try/except` blocks is crucial for DX. Otherwise, unexpected runtime errors during development will be swallowed into generic stderr messages, hiding the stack trace needed to actually fix the bug. **Action:** When adding `try-except` blocks to Python CLI subcommands to improve Developer Experience (DX) by preventing raw tracebacks for users, include a debug bypass (e.g., `if os.environ.get("FAST_MLSIRM_DEBUG"): raise`) in *all* catch blocks (including `RuntimeError` and `Exception`) to ensure tracebacks aren't swallowed during local development and debugging. + +## 2024-07-20 - Skip-to-Content Link Target Focus Outline +**Learning:** We learned that adding `outline: none` to the skip-to-content target element (`
`) correctly hides the outline for mouse interactions, but it entirely breaks keyboard navigation accessibility because users using the `tab` key will have no visual indicator of where their focus is. +**Action:** When overriding the default focus outline on a target container (like `
`) with `outline: none;` to prevent it from showing on mouse clicks, always provide a `main:focus-visible` rule (e.g., `outline: 3px solid #0f766e;`) so keyboard users still get a visible focus indicator. diff --git a/python/fast_mlsirm/report.py b/python/fast_mlsirm/report.py index 30ee4276b..6f41764e3 100644 --- a/python/fast_mlsirm/report.py +++ b/python/fast_mlsirm/report.py @@ -498,6 +498,11 @@ def _css() -> str: outline: none; } +main:focus-visible { + outline: 3px solid #0f766e; + outline-offset: 3px; +} + .hero { min-height: 172px; display: flex;