This is a series of scenarios to test the keyboard accessibility of Cypress commands. Cypress uses synthetic events and therefore can only fire untrusted events. See W3C Trusted Events for more details.
This button should work by clicking, pressing the space bar key, or pressing the enter key.
This button has an explicit keydown handler to click the button with the keydown handler calling `event.preventDefault()`. The end result is still the desired behavior.
This anchor should work by clicking, or by pressing the space bar key.
My anchorThis anchor has an explicit keydown handler to click the anchor with the keydown handler calling `event.preventDefault()`. The end result is still the desired behavior.
My anchor
This is a a with a parent that has a keydown event handler
that uses event.preventDefault(). This will prevent the
enter and space bar keys from triggering the "click" event as a default
action.
This checkbox should work by clicking or by pressing the space bar key.
This checkbox has an explicit keydown handler to click the checkbox with the keydown handler calling `event.preventDefault()`. The end result is still the desired behavior.
This checkbox has an explicit keydown handler to click the checkbox with the keydown handler calling `event.preventDefault()`. The end result is still the desired behavior.
This is a checkbox with a parent that has a keydown event
handler that uses event.preventDefault(). This will prevent
the enter and space bar keys from triggering the "click" event as a
default action.
This radio should work by clicking or by pressing the space bar key.
This radio has an explicit keydown handler to click the radio with the keydown handler calling `event.preventDefault()`. The end result is still the desired behavior.
This is a radio with a parent that has a keydown event
handler that uses event.preventDefault(). This will prevent
the enter and space bar keys from triggering the "click" event as a
default action.