ARIA buttons with different event handlers

Experimental Buttons

Click event only

Button 1

Enter key only

Button 2

Space bar only

Button 3

B key only

Button 4

B key only, in an application region

Button 4 (application mode)

No event handler

Button 5

Click, Enter, and Space

Button 6

Click and Enter

Button 7

Click and Space

Button 8

Native button: Click only

Native button: Click and Enter

Native button: Enter only

Native button: Space only

 

Results

Button 1: Click event only

Button 2: Enter key only

Button 3: Space key only

Button 4: B key only

Button 5: No event handler

Button 6: Click and Enter and Space

Button 7: Click and Enter

 

Button 8: Click and Space

Button 9: Native button: click only

Button 10: Native button: click and enter

Button 11: Native button: Enter only

Button 12: Native button: Space only

 

 

Conclusion

For minimum accessibility, a click event MUST be available AND a standard keyboard event (enter or space) MUST be available. The B key (and most other custom keys) is NOT acceptable — it is a critical blocker — because it is overriden by screen reader shortcuts. The above points are non-negotiable. It is a critical failure — a complete blocker for at least one group — if one of those is missing.

Click and enter (or click and space) provide partial functionality to sighted keyboard users, and provide full functionality to screen reader users (but only because screen readers are making up the deficit by invoking the click event INSTEAD OF the events actually in the JavaScript code; if a screen reader does NOT have this guessing behavior, the support will be incomplete, just as it is for sighted users).

The best combination is click + enter + space, because that is the universally-supported combination across devices, user agents, and assistive technologies.

Note that in none of the instances does the screen reader or browser actually have a fool-proof way of programmatically determining or setting the method of activating the button. The only way to get reliable convergence of button behavior and screen reader behavior is if the web site adheres to the conventions that the screen reader is expecting (the accessibility API of the operating system and/or browser).

With native buttons, as long as you have a click event, the browsers automatically allow enter and space to work too. You don't have to specify enter or space in the JavaScript, but you do have to specify click.