What keyboard functions need to be compatible with a button?
Yes, buttons should be operable by the spacebar. If you use a <button> element, it will natively support both return/enter and spacebar activation. If you create a button another way (such as with a <div>), you will need to do additional work to ensure the spacebar can be used.
The Keyboard Interaction section of the Button ARIA design pattern also has requirements for focus management, depending on the function of the button.
Free Tools to Continue Learning
Accessible Web RAMP
Monitor your website and manage your progress towards WCAG conformance.
Accessible Web Academy
Career specific courses to help power up your accessibility knowledge.