-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: do not use outlineStyle: none in createCustomFocusIndicatorStyle #26089
Conversation
…nstead of outlineStyle: none to avoid removing HCM focus visibility
Asset size changesSize Auditor did not detect a change in bundle size for any component! Baseline commit: a59a1056a6110af48fd7a7ab189ced2a6a9567d1 (build) |
📊 Bundle size reportUnchanged fixtures
|
Perf Analysis (
|
Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
---|---|---|---|---|---|
InfoButton | mount | 18 | 22 | 5000 | Possible regression |
All results
Scenario | Render type | Master Ticks | PR Ticks | Iterations | Status |
---|---|---|---|---|---|
Avatar | mount | 688 | 700 | 5000 | |
Button | mount | 375 | 383 | 5000 | |
Field | mount | 1261 | 1250 | 5000 | |
FluentProvider | mount | 904 | 905 | 5000 | |
FluentProviderWithTheme | mount | 114 | 117 | 10 | |
FluentProviderWithTheme | virtual-rerender | 98 | 97 | 10 | |
FluentProviderWithTheme | virtual-rerender-with-unmount | 102 | 105 | 10 | |
InfoButton | mount | 18 | 22 | 5000 | Possible regression |
MakeStyles | mount | 1103 | 1106 | 50000 | |
Persona | mount | 2030 | 1935 | 5000 | |
SpinButton | mount | 1570 | 1568 | 5000 |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 7bc671c:
|
packages/react-components/react-button/src/components/Button/useButtonStyles.ts
Outdated
Show resolved
Hide resolved
packages/react-components/react-tabster/src/focus/createCustomFocusIndicatorStyle.ts
Outdated
Show resolved
Hide resolved
… to createFocusOutlineStyle
packages/react-components/react-tabster/src/focus/createCustomFocusIndicatorStyle.ts
Show resolved
Hide resolved
packages/react-components/react-tabster/src/focus/createFocusOutlineStyle.ts
Show resolved
Hide resolved
updated |
change/@fluentui-react-tabster-febe226f-524c-446a-a2b1-769b8ba7180f.json
Show resolved
Hide resolved
packages/react-components/react-tabster/src/focus/createCustomFocusIndicatorStyle.ts
Show resolved
Hide resolved
🎉 Handy links: |
🎉 Handy links: |
* master: (29 commits) feat(react-drawer): create DrawerBody component (microsoft#27581) feat(react-tree): TreeItem itemType restructure (microsoft#27799) feat: Implement state management for toasts (microsoft#27800) bugfix: fix VisibleFlatTreeItemGenerator omitting visible items (microsoft#27802) fix: overflowManager should always dispatch initial state (microsoft#27756) fix(react-badge): Remove white border around presence badge when on a dark background (microsoft#27780) react-tags: rename dismissable to dismissible (microsoft#27798) chore: update ownership of react-tags (microsoft#27795) applying package updates feat(react-tags): Replace `avatar` prop with `media`; polish styles for spacing (microsoft#27725) RFC appearance migration (microsoft#24181) chore(react-skeleton): Release react-skeleton to stable (microsoft#27767) fix(Coachmark): Remove positioning regression and update bounds on resize (microsoft#27782) applying package updates fix(v8): explicitly publish dist folder after node 16 upgrade (microsoft#27769) applying package updates fix: do not use outlineStyle: none in createCustomFocusIndicatorStyle (microsoft#26089) fix: Scale pulse animation with percentages and flip wave animation's direction (microsoft#27654) Publish dist folder that got removed due to node 16 upgrade (microsoft#27764) fix(scripts-update-release-notes): properly handle git for-each-ref cmd call to not fail release notes update (microsoft#27757) ...
🎉 Handy links: |
🎉 Handy links: |
🎉 Handy links: |
🎉 Handy links: |
Previous Behavior
When
createCustomFocusIndicatorStyle
is called twice within a component's styles hook, the second call creates:focus
/:focus-visible
outline styles that override any styles in the first call of the hook, based on the order in which classes are applied to the component.An example is when the first call does this:
and the second call does this:
The second call overrides the
outlineStyle
defined in the first call, because the second className is applied after the first. An example of this is inuseButtonStyles
, where the base style callscreateCustomFocusIndicatorStyle
once, and size and appearance variants call it again style adjustments.This issue shows how using a large button broke the high contrast mode focus indicator: #26079
New Behavior
This PR removes
outlineStyle: none
fromcreateCustomFocusIndicatorStyle
and moves it tocreateFocusOutlineStyle
, where the::after
style is created and is visible in high contrast mode.Related Issue(s)
Fixes #26079, #26077, #26062