Skip to content

[Bug]: Cannot submit via enter from fluent-checkbox or fluent-switch #36786

Open

Description

Component

Checkbox

Package version

3.1.3

@microsoft/fast-element version

3.0.3

Environment

System:
    OS: Windows 11 10.0.26200
    CPU: (28) x64 Intel(R) Core(TM) i7-14700K
    Memory: 3.81 GB / 31.78 GB
  Browsers:
    Edge: Chromium (152.0.4191.53)
    Firefox Developer Edition: 157.0 - C:\Program Files\Firefox Developer Edition\firefox.exe

Current Behavior

FluentUI controls behave different from normal HTML input controls. It's not possible to submit a form via enter key when the current focus is on either a fluent-checkbox or fluent-switch. It might be possible that this also affects other controls as well.

I recorded a short video which demonstrates this issue.
https://github.com/user-attachments/assets/730d5022-1db3-411d-9be5-533ee5a8cb50

Expected Behavior

I expect the form to be submitted when I press enter - just like in normal HTML.

Reproduction

https://github.com/MarvinKlein1508/fluentui-submit-with-enter-issue

Steps to reproduce

  1. Clone project
  2. npm install
  3. npm run start
  4. Fill out the form via keyboard and press enter when the fluent-checkbox is in focus

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

  • 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

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions