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
You want to define an emit keydown but emit a click event, and @click calls click instead of onClick?
You are entirely correct, I am terribly sorry!
I updated the repro to fix the issue and added a test case to test the general functionality works (so that I can assure you it's in the correct state now)
Thanks for the updated repro.
OOC, have you tried with the attachTo option?
VTU doesn't do anything to support this use-case I think. And I don't know how this is supposed to work if the event is triggered via JS. Maybe for that kind of use case you should rely on another type like component testing or e2e testing.
Describe the bug
Triggering the keydown event on a button for space or enter will not trigger the click event (which it does in an actual browser)
To Reproduce
https://stackblitz.com/edit/github-bbenms-4fnuwh?file=src%2FButton.vue&view=editor
Expected behavior
The click event should be triggered to accurately test keyboard navigation for accessibility
Related information:
Additional context
The text was updated successfully, but these errors were encountered: