Skip to content

[Bug]: Link doesn't work with BackgroundAppearanceProvider #34911

@njsokol

Description

@njsokol

Component

Link

Package version

9.64.1

React version

17.0.2

Environment

System:
    OS: Linux 6.6 Ubuntu 22.04.3 LTS 22.04.3 LTS (Jammy Jellyfish)
    CPU: (12) x64 12th Gen Intel(R) Core(TM) i7-1265U
    Memory: 12.60 GB / 15.53 GB
    Container: Yes
    Shell: 5.8.1 - /usr/bin/zsh
  npmPackages:
    @fluentui/react-components: 9.64.1 => 9.64.1 
    @fluentui/react-context-selector: 9.1.76 => 9.1.76 
    @fluentui/react-icons: 2.0.279 => 2.0.279 
    @fluentui/react-jsx-runtime: 9.0.54 => 9.0.54 
    @fluentui/react-motion: 9.7.2 => 9.7.2 
    @fluentui/react-motion-components-preview: 0.4.3 => 0.4.3 
    @fluentui/react-shared-contexts: 9.23.1 => 9.23.1 
    @fluentui/react-utilities: 9.19.0 => 9.19.0 
    @types/react: 17.0.83 => 17.0.83 
    @types/react-dom: 17.0.25 => 17.0.25 
    react: 17.0.2 => 17.0.2 
    react-dom: 17.0.2 => 17.0.2

Current Behavior

Trying to use the Link on a darker background, so I wanted to use the with it's value set to "inverted". The BackgroundAppearanceProvider is rendering the right value, but for some reason, the Link component doesn't seem to be reading it in that the colors need to be Inverted.

Expected Behavior

The Link should be able to render the inverted colors.

Reproduction

https://stackblitz.com/edit/bwkmfsq7?file=src%2Fexample.tsx

Steps to reproduce

Run the stackblitz.

In the current repo, I pulled up storybook locally and implemented a new story replicating the stackblitz and things worked. But I cannot get the actually production packages to behave in the same way.

Are you reporting an Accessibility issue?

None

Suggested severity

Medium - Has workaround

Products/sites affected

No response

Are you willing to submit a PR to fix?

yes

Validations

  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • The provided reproduction is a minimal reproducible example of the bug.

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions