Skip to content

🎨 Palette: [UX improvement] Improve focus styles for main content - #978

Closed
seonghobae wants to merge 3 commits into
mainfrom
palette/improve-main-focus-styling-1487165751651455508
Closed

🎨 Palette: [UX improvement] Improve focus styles for main content#978
seonghobae wants to merge 3 commits into
mainfrom
palette/improve-main-focus-styling-1487165751651455508

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

💡 What: Modified the main:focus { outline: none; } CSS rule in python/fast_mlsirm/report.py to main:focus:not(:focus-visible) { outline: none; }.

🎯 Why: When users use a "skip to main content" link (which targets <main tabindex="-1">), the previous outline: none; rule completely removed the focus ring, leaving keyboard users without a visual indicator of where their focus landed.

Accessibility: This change perfectly preserves the visual UX for mouse/touch users (who won't see a massive focus ring if they happen to click the main area) while correctly restoring the browser's focus indicator for keyboard users navigating via skip links. This brings the generic report CSS into alignment with the explicit accessibility rules already implemented in the essay scoring sub-reports.


PR created automatically by Jules for task 1487165751651455508 started by @seonghobae

Summary by CodeRabbit

  • Accessibility

    • Improved keyboard focus visibility for scrollable tables and main content areas.
    • Pointer-triggered outlines are suppressed while keyboard focus indicators remain visible.
  • Bug Fixes

    • Corrected report styling so keyboard users retain the intended teal focus outline and offset.
  • Tests

    • Added coverage to verify accessible focus behavior in rendered reports.

Modifies the `:focus` rule on `<main>` to `:not(:focus-visible)` in `report.py` to ensure keyboard focus rings appear while suppressing mouse click rings.
@google-labs-jules

Copy link
Copy Markdown

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@cursor

cursor Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@coderabbitai

coderabbitai Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 5cfa82e6-b390-4616-855b-2286d9b7ad3c

📥 Commits

Reviewing files that changed from the base of the PR and between 04d0bc2 and cb398e3.

📒 Files selected for processing (3)
  • .Jules/palette.md
  • python/fast_mlsirm/report.py
  • tests/test_report_numeric_motion_css.py

Included review availability: Your plan includes up to 1 review per rolling hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The report CSS now suppresses pointer-triggered outlines on <main> while preserving keyboard focus indicators. Accessibility guidance covers focus-visible usage. A regression test verifies the rendered CSS. Several validation exceptions were reformatted without behavior changes.

Changes

Accessibility focus handling

Layer / File(s) Summary
Report focus CSS and regression coverage
python/fast_mlsirm/report.py, tests/test_report_numeric_motion_css.py, .Jules/palette.md
The report uses main:focus:not(:focus-visible) to suppress non-visible outlines and retains the teal main:focus-visible outline. The test verifies both selectors. Guidance covers scrollable tables and <main tabindex="-1">.
Validation statement formatting
python/fast_mlsirm/report.py
Metrics, row, and cell limit ValueError statements were reformatted without changing their conditions or messages.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to cb398

This localized accessibility improvement restores visible focus styling for keyboard users while preserving the existing experience for mouse and touch users; no actionable merge-blocking risk remains after normal checks and review.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change to improve focus styles for main content.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch palette/improve-main-focus-styling-1487165751651455508

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@seonghobae
seonghobae enabled auto-merge (squash) August 17, 2026 19:20

Copy link
Copy Markdown
Contributor Author

@opencode-agent Please review exact head cb398e3fc44033a30e7177f7d561da14d2742dc6 for the focused accessibility change. The intended contract is narrow: suppress the main-content outline only for non-:focus-visible focus, preserving a keyboard-visible focus indicator for skip-link navigation. Please evaluate the current head and submit formal review evidence against this SHA.

@seonghobae

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

OpenCode cannot approve yet because required coverage evidence did not pass.

Review outcome

1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence

  • Problem: The required coverage-evidence job result was failure, so OpenCode cannot establish approval sufficiency for this head.

  • Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.

  • Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports success with required evidence or explicit no-source not-applicable evidence.

  • Regression test: Keep the approval branch checking needs.coverage-evidence.result == success before posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present.

  • Result: REQUEST_CHANGES

  • Reason: coverage-evidence result was failure, so required test/docstring evidence was not proven for current head cb398e3fc44033a30e7177f7d561da14d2742dc6.

  • Head SHA: cb398e3fc44033a30e7177f7d561da14d2742dc6

  • Workflow run: 32124679471

  • Workflow attempt: 1

Coverage evidence

Coverage evidence job did not run or did not publish coverage evidence.

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Changed file (2 files)"]
  S1 --> I1["repository behavior"]
  I1 --> R1["Review risk: Changed file (2 files)"]
  R1 --> V1["required checks"]
  Evidence --> S2["Test: test_report_numeric_motion_css.py"]
  S2 --> I2["regression suite"]
  I2 --> R2["Review risk: Test: test_report_numeric_motion_css.py"]
  R2 --> V2["targeted test run"]
Loading

@opencode-agent

Copy link
Copy Markdown
Contributor

OpenCode Review Overview

  • Head SHA: cb398e3fc44033a30e7177f7d561da14d2742dc6
  • Workflow run: 32124679471
  • Workflow attempt: 1
  • Gate result: REQUEST_CHANGES (approval step)

Pull request overview

OpenCode cannot approve yet because required coverage evidence did not pass.

Review outcome

1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence

  • Problem: The required coverage-evidence job result was failure, so OpenCode cannot establish approval sufficiency for this head.

  • Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.

  • Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports success with required evidence or explicit no-source not-applicable evidence.

  • Regression test: Keep the approval branch checking needs.coverage-evidence.result == success before posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present.

  • Result: REQUEST_CHANGES

  • Reason: coverage-evidence result was failure, so required test/docstring evidence was not proven for current head cb398e3fc44033a30e7177f7d561da14d2742dc6.

  • Head SHA: cb398e3fc44033a30e7177f7d561da14d2742dc6

  • Workflow run: 32124679471

  • Workflow attempt: 1

Coverage evidence

Coverage evidence job did not run or did not publish coverage evidence.

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Changed file (2 files)"]
  S1 --> I1["repository behavior"]
  I1 --> R1["Review risk: Changed file (2 files)"]
  R1 --> V1["required checks"]
  Evidence --> S2["Test: test_report_numeric_motion_css.py"]
  S2 --> I2["regression suite"]
  I2 --> R2["Review risk: Test: test_report_numeric_motion_css.py"]
  R2 --> V2["targeted test run"]
Loading

@opencode-agent
opencode-agent Bot disabled auto-merge August 18, 2026 10:58

Copy link
Copy Markdown
Contributor Author

@opencode-agent Please re-review unchanged exact head cb398e3fc44033a30e7177f7d561da14d2742dc6 against the current central coverage implementation. Repository CI, Security Scan, CodeQL, and Semgrep are terminal-success on this SHA, and CodeRabbit reports no actionable current-head findings. The existing formal CHANGES_REQUESTED maps to central run 32124679471, which predates .github main b71a02a310e77f70c1e59f4719f6857cb33ca886 and its trusted-uv/flat-lock correction. Please generate fresh same-head formal evidence rather than carrying forward the superseded central tooling failure.

Copy link
Copy Markdown
Contributor Author

@opencode-agent Please re-review unchanged exact head cb398e3fc44033a30e7177f7d561da14d2742dc6 with the current central workflow. Repository CI, Security Scan, CodeQL, and Semgrep are terminal-success; the only formal REQUEST_CHANGES is the prior coverage-evidence infrastructure failure. Reassess the :focus:not(:focus-visible) accessibility fix and current same-head coverage evidence without transferring that superseded tooling verdict.

Copy link
Copy Markdown
Contributor Author

Superseded by #1002. The successor preserves this exact accessibility behavior and focused regression, removes only the bot-local .Jules/palette.md artifact, and creates a fresh pull-request event so current central coverage/OpenCode workflows evaluate the unchanged product tree. The dependent title-boundary PR #1000 has been retargeted to #1002 and reconciled without force-push. Closing this predecessor unmerged avoids two landing vehicles for the same report.py focus change.

@seonghobae seonghobae closed this Aug 19, 2026
@google-labs-jules

Copy link
Copy Markdown

Superseded by #1002. The successor preserves this exact accessibility behavior and focused regression, removes only the bot-local .Jules/palette.md artifact, and creates a fresh pull-request event so current central coverage/OpenCode workflows evaluate the unchanged product tree. The dependent title-boundary PR #1000 has been retargeted to #1002 and reconciled without force-push. Closing this predecessor unmerged avoids two landing vehicles for the same report.py focus change.

Understood. Acknowledging that this work is now obsolete and stopping work on this task.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant