You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's expected behaviour with span, as if you are not using button, then there is need to handle explicitly focus and keys behaviour.
However, we already support span, which was't support until this and it adds tabIndex and role="button", but without control of the keys.
It’s possible that explicit handling for Enter and Space wasn't implemented intentionally, or perhaps it was overlooked. @khmakoto, do you recall the reasoning behind not adding this support?
Component
Link
Package version
9.42.0
React version
16.14.0
Environment
OS: Windows 11 10.0.22631 CPU: (20) x64 Intel(R) Core(TM) i9-10900 CPU @ 2.80GHz Memory: 12.70 GB / 63.71 GB Browsers: Edge: Chromium (127.0.2651.98) Internet Explorer: 11.0.22621.3527 npmPackages: @fluentui/react-components: 9.42.0 => 9.42.0
Current Behavior
Link component when used as span (which is what is needed to make sure it wraps well). Enter key or space bar does not call the onclick handler.
https://react.fluentui.dev/?path=/docs/components-link--docs
Expected Behavior
Enter key or space bar would call the onclick handler.
Reproduction
https://stackblitz.com/edit/slflnjho?file=src%2Fexample.tsx
Steps to reproduce
Use the Link component as span.
Include a click handler.
Try Enter key or space bar to activate.
Are you reporting an Accessibility issue?
yes
Suggested severity
Urgent - No workaround and Products/sites are affected
Products/sites affected
No response
Are you willing to submit a PR to fix?
no
Validations
The text was updated successfully, but these errors were encountered: