More
Extra Work
function
handleBtnKeyPress
(e) {
// Check to see if space or enter were pressed
if ( e.keyCode === 32 || e.keyCode === 13) {
// Open modal dialog
openModal(e);
}
}
Source: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_button_role