Skip to content

fix(react): show TextField reveal button in Edge - #36484

Draft
AKnassa wants to merge 1 commit into
microsoft:masterfrom
AKnassa:ak-issue-35656-textfield-reveal-contrast
Draft

fix(react): show TextField reveal button in Edge#36484
AKnassa wants to merge 1 commit into
microsoft:masterfrom
AKnassa:ak-issue-35656-textfield-reveal-contrast

Conversation

@AKnassa

@AKnassa AKnassa commented Aug 1, 2026

Copy link
Copy Markdown

Previous Behavior

In Edge, the password TextField (v8) hid Fluent's own "show password" eye button and relied on Edge's built-in one. That built-in eye can't be themed, is invisible in Windows contrast themes (Dark, Aquatic, Desert), and can't be reached with the keyboard.

New Behavior

Edge users get the same Fluent eye button as Chrome, Firefox, and Safari users: it follows the theme, stays visible in Windows contrast themes, and is keyboard-focusable. Edge's built-in eye is hidden so there aren't two buttons. IE 11 is untouched (its native button can't be hidden), and password fields that never opted into canRevealPassword keep behaving exactly as before.

What changed

  • Removed the old browser check that suppressed the button on Edge (kept for IE 11).
  • Hid Edge's native eye on the input, the same way the codebase already hides IE's clear button.
  • Gave the eye icon a proper resting color in contrast themes (ButtonText).
  • Updated the prop docs, added a test that renders under an Edge user agent (it failed before the fix), and a change file. 120/120 TextField tests pass; exactly one snapshot changed, as expected.

Note: this is an intentional behavior change on Edge — the Fluent button stays toggled until clicked again, same as every other browser already gets. It also happens to help the keyboard-access issue #35657.

How to verify

Open the TextField "password with reveal button" example in Edge with a Windows contrast theme on — the eye is now visible and tabbable.

Related Issue(s)

TextField suppressed its own password reveal button on Edge via a
UA sniff (added when the feature shipped, to avoid doubling up with
Edge's native ::-ms-reveal widget). That leaves Edge users with the
native control, which cannot be themed, fails contrast in Windows
contrast themes (Dark, Aquatic, Desert), and is mouse-only.

Drop the Edge carve-out (IE 11 keeps its unhideable native button)
and hide ::-ms-reveal on the field when the custom button renders,
matching the existing ::-ms-clear idiom. Give the reveal button a
resting forced-colors color (ButtonText) so the icon stays visible
in contrast themes; hover already used Highlight.

Password fields without canRevealPassword keep Edge's native
reveal. The now-focusable button also helps microsoft#35657.

Fixes microsoft#35656
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.

[Bug] [Accessibility]: TextField component contrast issue with eye Icon in Dark, Aquatic and Desert theme

1 participant