WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: <input type="submit"> vs <button> element

for

From: Moore,Michael (Accessibility) (HHSC)
Date: Dec 12, 2016 3:59PM


Why would you need <button aria-role="button"> the native semantics of <button> do not need to be overridden. Now if you had this <span role="button">Submit</span> then you would need the aria-role. You would also not be allowing the native semantics of button to work for you and would not be following best practices.

The checker is possibly complaining because you are using <button> instead of <submit> but the native handling of the <submit> element by the browser may not be what is desired in this case, which is why your developers may have used the more generic <button> element.

Mike Moore
Accessibility Coordinator
Texas Health and Human Services Commission
Civil Rights Office
(512) 438-3431 (Office)