Give Bills' Next up strip a focus ring and one padding scale
Merged
GA
2mo ago+18+18+01234567890123456789-5-5-0123456789
Problem
On the Bills overview, the month pulse card's "Next up" strip had three problems:
- Keyboard focus: tabbing through the items or the "View calendar" link showed the browser's default outline, not the DS focus ring. On an item, that outline ran over the next item.
- Bleed: each item had a
-mx-2bleed. In the phone scroll strip, that clipped the first item's hover tint and made the hover areas of neighbouring items overlap. - Two hover cues: the items showed both a tint and an underline on hover.
The pulse card (p-5) and the awaiting-review banner (px-4 py-3) also used different padding from the other bg-container section cards.
Change
- Next up items and the "View calendar" link use
focus-ring. On the items the ring is inset (-outline-offset-2), because on phones the strip isoverflow-x-autoand would clip an outline drawn outside the item. - The items drop
-mx-2and keeppx-2, so each item's text stays inset within its own tint. The text now sits 8px in from the "Next up" label. - The tint is the only hover cue.
group-hover:underlineon the name is gone. - The pulse card and the awaiting-review banner use
p-4. Inset row groups (p-1) and inset notes (p-3) are unchanged.
Screenshots
Before on the left, after on the right.
Keyboard focus on the first Next up item (desktop, light)

Pulse card, desktop (light / dark)

Pulse card, 375px (light / dark)

Awaiting-review banner, desktop (light / dark)

Awaiting-review banner, 375px (light / dark)

The screenshots come from a throwaway system test with fixture bills and the clock set to mid-month.
Validation
bin/rails test: 10329 runs, 0 failures, 0 errors.test/controllers/bills_controller_test.rb: the month pulse test now assertsfocus-ringon the Next up items and the calendar link, and that-mx-2andgroup-hover:underlineare gone. It fails on main.- Bills system tests (
bills_mobile,find_my_bills,declare_and_pay_bill): all pass exceptdeclare_and_pay_bill_test's "declare rent…" test, which raises the same date-dependentRecordNotFoundon main's views. - erb_lint and rubocop on the touched files: clean. Brakeman: no warnings. No JS changed, so Biome doesn't apply.
Checked the open bills PRs (#3664, #3666, #3663, #3624, #3751): none touch these two views.
Summary by CodeRabbit
- Accessibility
- Added visible focus indicators to the calendar and bill links in the monthly “Next up” section, making keyboard navigation easier.
- Bill names no longer gain an underline when their link is hovered.
- Style
- Adjusted spacing in the monthly pulse section and the awaiting-review banner for a more consistent layout.