> For the complete documentation index, see [llms.txt](https://douglasfugazi.gitbook.io/testing-web-accessibility/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://douglasfugazi.gitbook.io/testing-web-accessibility/introduccion/5.-forms.md).

# 5. Forms

Forms are constantly being used to collect user information: signing up for something, buying something, asking a question, or contacting someone. Since forms are so commonly used, it is imperative to make forms accessible to all users.

Here are some accessibility guidelines related to forms:

* **No form fields have multiple labels** Form fields with multiple labels can be confusingly announced by assistive technologies like screen readers which use either the first, the last, or all of the labels. [Learn more](https://web.dev/form-field-multiple-labels/)
* **Form elements have associated labels** Labels ensure that form controls are appropriately announced by assistive technologies, like screen readers. [Learn more](https://web.dev/label/).

### Alternate Text <a href="#alt-text" id="alt-text"></a>

Alternative text is a textual substitute for non-text content in web pages.

**Alternative text serves several functions:**

* Screen readers announce alternative text in place of images, helping users with visual or certain cognitive disabilities perceive the content and function of the images.
* If an image fails to load or the user has blocked images, the browser will present the alternative text visually in place of the image.
* Search engines use alternative text and factor it into their assessment of the page purpose and content.

**Here are some accessibility guidelines related to alternate text:**

* **Image elements have `[alt]` attributes** Informative elements should aim for short, descriptive alternate text. Decorative elements can be ignored with an empty alt attribute. [Learn more](https://web.dev/image-alt/)
* **`<input type="image">` elements have `[alt]` text** When an image is being used as an `<input>` button, providing alternative text can help screen reader users understand the purpose of the button. [Learn more](https://web.dev/input-image-alt/)
* **`<object>` elements have `[alt]` text** Screen readers cannot translate non-text content. Adding alt text to `<object>` elements helps screen readers convey meaning to users. [Learn more](https://web.dev/object-alt/)
* **Links have a discernible name** Link text (and alternate text for images, when used as links) that is discernible, unique, and focusable improves the navigation experience for screen reader users. [Learn more](https://web.dev/link-name/)
