Skip to content

Keep the carousel flipper's background on focus and hover when its background option is undefined - #6085

Open
Eugene (OEvgeny) wants to merge 2 commits into
mainfrom
OEvgeny/fix-flipper-hover-background
Open

Eugene (OEvgeny) wants to merge 2 commits into
mainfrom
OEvgeny/fix-flipper-hover-background

Conversation

@OEvgeny

@OEvgeny Eugene (OEvgeny) commented Nov 24, 2026 •

Copy link
Copy Markdown
Collaborator

An explicitly undefined transcriptOverlayButtonBackgroundOnFocus or transcriptOverlayButtonBackgroundOnHover makes the focused or hovered carousel flipper transparent.

Changelog Entry

Fixed

  • Fixed carousel flippers turning transparent on focus or hover with an undefined background option, in PR #6085, by @OEvgeny

Description

Since #5668, the flipper's focus and hover rules read their custom property without a fallback, so an undefined option made the background transparent, where the previous style set kept the base background. They now fall back to transcriptOverlayButtonBackground, as the scroll to end button does.

Design

  • Fallback in the rules, as for the hover and focus colors, not the base value in the custom property: the scroll to end button needs unset there to fall back to its hover background.
  • No :focus:hover rule as in the scroll to end button: flippers blur on click, so they are rarely focused and hovered at once.

Specific Changes

  • CarouselLayout.module.css: fall back to the base background in the focus and hover rules
  • carousel/flipperButton.undefinedBackground.html: snapshots 1–2, the focused and the hovered "Next" flipper keep their navy base background (on main: transparent, the arrow over the card)
  • I have added tests and executed them locally
  • I have added .changelog/<PR#>-<slug>.md
  • I have updated documentation

Review Checklist

This section is for contributors to review your work.

  • Accessibility reviewed (tab order, content readability, alt text, color contrast)
  • Browser and platform compatibilities reviewed
  • CSS styles reviewed (minimal rules, no z-index)
  • Documents reviewed (docs, samples, live demo)
  • Internationalization reviewed (strings, unit formatting)
  • package.json and package-lock.json reviewed
  • Security reviewed (no data URIs, check for nonce leak)
  • Tests reviewed (coverage, legitimacy)

Eugene Olonov added 2 commits November 24, 2026 07:22
…nd is undefined

An explicitly undefined `transcriptOverlayButtonBackgroundOnFocus` or
`transcriptOverlayButtonBackgroundOnHover` made the focused or hovered flipper
transparent since the move to CSS Modules. The flipper now falls back to
`transcriptOverlayButtonBackground`, as the scroll to end button does.

Copilot AI 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.

🟢 Approval recommended

The carousel flipper background fallback change has no active review issues.

No open issues 🎉

What changed in this PR

Restores the carousel flippers’ base background on focus and hover when the corresponding style option is explicitly undefined, fixing a regression from the CSS Modules conversion.

Changes:

  • Adds base-background fallbacks to the flippers’ focus and hover rules.
  • Adds a visual regression test for keyboard focus and pointer hover.
  • Records the fix in the changelog.
File Description
packages/​component/​src/​Activity/​CarouselLayout.module.css Falls back to the base background on focus and hover.
.changelog/​6085-fix-flipper-hover-background.md Documents the transparency fix.
__tests__/​html2/​carousel/​flipperButton.undefinedBackground.html Adds snapshots covering undefined focus and hover backgrounds.

Review effort: Balanced

This branch has not been deployed

No deployments
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.

2 participants