< Back to Demos | Learn more at PaulJAdam.com >

HTML <button> vs ARIA role="button" vs <a href="#" role="button">

W3C ARIA Documentation

http://www.w3.org/TR/wai-aria-practices-1.1/#button

http://www.w3.org/TR/wai-aria-1.1/#button

http://www.w3.org/TR/wai-aria-practices-1.1/examples/button/button.html

<button>

role="button"

custom ARIA

custom ARIA preventDefault

<a href="#" role="button">

a href role

a href role preventDefault

aria-pressed

aria-pressed role="button"

AX: aria-pressed state not correctly conveyed to VoiceOver iOS on <button> unless role=button added

aria-expanded

disabled

aria-disabled

custom aria-disabled on activation

custom aria-disabled on activation preventDefault

Whitespace for testing .preventDefault()

 

 

 

 

 

 

 

 

 

 

 

<a href="#" role="button">

a href role

Whitespace for testing .preventDefault()

 

 

 

 

 

 

 

 

 

 

 

Deque.com