Skip to content
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(react-link): support Enter and Space keys interaction, if rendered as span #33587

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

mainframev
Copy link
Contributor

@mainframev mainframev commented Jan 8, 2025

Previous Behavior

Currently keyboard interaction via Enter and Space is not possible, when Link is rendered as span.

New Behavior

Added explicit handling of Enter and Space 🧢

Related Issue(s)

Copy link

github-actions bot commented Jan 8, 2025

📊 Bundle size report

Package & Exports Baseline (minified/GZIP) PR Change
react-components
react-components: entire library
1.164 MB
291.232 kB
1.164 MB
291.269 kB
120 B
37 B
react-link
Link
17.326 kB
7.032 kB
17.498 kB
7.097 kB
172 B
65 B
Unchanged fixtures
Package & Exports Size (minified/GZIP)
react-breadcrumb
@fluentui/react-breadcrumb - package
114.291 kB
31.695 kB
react-components
react-components: Button, FluentProvider & webLightTheme
69.21 kB
20.174 kB
react-components
react-components: Accordion, Button, FluentProvider, Image, Menu, Popover
222.703 kB
64.42 kB
react-components
react-components: FluentProvider & webLightTheme
44.447 kB
14.59 kB
react-message-bar
MessageBar (all components)
24.825 kB
9.267 kB
react-portal-compat
PortalCompatProvider
8.39 kB
2.64 kB
react-timepicker-compat
TimePicker
108.525 kB
36.087 kB
🤖 This report was generated against 6473e08086509d7dab294243777a2066c75b62aa

Copy link

github-actions bot commented Jan 8, 2025

Pull request demo site: URL

@@ -0,0 +1,7 @@
{
Copy link
Collaborator

@fabricteam fabricteam Jan 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🕵🏾‍♀️ visual regressions to review in the fluentuiv9 Visual Regression Report

Avatar Converged 2 screenshots
Image Name Diff(in Pixels) Image Type
Avatar Converged.Badge Mask RTL.chromium.png 19 Changed
Avatar Converged.badgeMask.chromium.png 3 Changed
Drawer 2 screenshots
Image Name Diff(in Pixels) Image Type
Drawer.Full Overlay High Contrast.chromium.png 2247 Changed
Drawer.Full Overlay RTL.chromium.png 1167 Changed

@mainframev mainframev marked this pull request as ready for review January 8, 2025 19:36
@mainframev mainframev requested a review from a team as a code owner January 8, 2025 19:36
}
};
state.root.onKeyDown = mergeCallbacks(
state.root.onKeyDown,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wont this break current behaviour when disabled ? this merging callback will invoke provided onKeyDown then the custom function ( only the custom function contains disabling resolution behaviours )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Enter key or space bar does not call the onclick handler on Link component when used as span
3 participants