SiteLint documentation and guidelines

Missing attribute role=’textbox’ to identify an element that allows the input of free-form text.

Description

Rule ID: content-editable-missing-attributes

This rule verifies if elements with the attribute contenteditable have also defined the following attributes:

  1. aria-multiline
  2. aria-labelledby or aria-label

Context

When aria-multiline="true" is set, Assistive Technologies informs the user that the textbox supports multi-line input with the expectation that Enter or Return will create a line break rather than submitting the form.

aria-label here is recommended to specify a string to be used as the accessible label. Eventually, aria-labelledby can be used to specify the id of another element in the DOM as an element’s label.

How to fix it

The rule passes when all of the following cases are fulfilled:

  1. Attribute contenteditable is defined
  2. aria-label or aria-labelledby is defined. Note that the rule does not validate aria-labelledby ids if the referenced elements exist.

Techniques

Not Applicable