Web Historical Disclaimer:

This is a historical page and is no longer maintained. Read our Web history statement for more information.

Skip to Main ContentThe University of Texas at Austin
Accessibility Institute
Making the Web more usable for everyone
 

Home

Consulting

Resources

Research

About Us

Site Map

How-Tos and Demos

Accessible Forms

Example: Buttons Using <input> elements of type="button" and <button> elements

Here are two visually identical buttons that might be used to submit a form (such as a search). Screen readers will identify both of them as "Go" buttons. The first one was created using the <input> element, and the second uses the <button> element.

 

How to do it

Code example for buttons using <input> elements of type="button" and <button> elements Opens a new window

 

Rationale

Buttons created with the <input> element have implicit text labels that are taken from their value attribute. Screen readers will speak this text, and therefore no additional mark-up is needed. Text labels for the <button> element come from the text between the start and end tags (or from the alt attribute of an image element used as a button.

Forms should not include graphical links created with the <a> element. Technically speaking, such graphical links are not true form controls, so some screen readers (including JAWS) will skip over these elements when people use the screen reader's forms commands. In addition, using <input> and <button> elements allows greater control over visual presentation through the use of style sheets.

 

 

How it sounds with the JAWS screen reader

Listen to JAWS reading this form Opens a new window

 

JAWS transcript

[Go button]

 

Applicable Accessibility Standards and Guidelines

 
Last Modified: 2008 September 28