Skip to content
SilktideHelp

Programmatic field purpose

Silktide checks that form fields collecting personal information, such as a name, email address, or phone number, declare their purpose in code. This lets browsers and assistive tools fill the field in automatically and present it in ways each person understands.

The purpose is declared with the autocomplete attribute in , set to a standard value describing what the field collects:

<!-- The purpose is machine-readable: this collects a first name -->
<label for="name">First name</label>
<input id="name" type="text" autocomplete="given-name">

Why this matters

When a field declares its purpose, the browser can fill it in from information the visitor has saved. That helps everyone, but it matters most for people with motor impairments, for whom typing is slow or painful, and people with cognitive disabilities, who may struggle to recall details on demand. Assistive tools can also use the declared purpose to add familiar icons or symbols to fields, making forms easier to recognize and complete.

How to fix it

  1. Add an autocomplete attribute with the appropriate standard value to each field that collects information about the visitor - for example name, email, tel, street-address, or postal-code. See the full list of values (MDN).
  2. Note that autocomplete="on" is not enough - the value must name the specific purpose.
  3. If a specific field genuinely should not autocomplete, for example for security reasons, or ignore the finding for that field.

How Silktide tests this

  1. Find the input fields on each page, skipping types that never collect personal information (buttons, checkboxes, radio buttons, file pickers, search boxes, and similar), and fields injected by known third-party widgets, such as the hidden forms that tracking and translation scripts add for their own use.
  2. Work out each field's label from its , falling back to its placeholder text.
  3. Where the label suggests personal information - words like "name", "email", "phone", "address", "postcode", "date of birth" - expect a specific autocomplete value.
  4. Report each such field whose autocomplete attribute is missing, or set only to on or off. Any specific value passes; Silktide does not judge whether it is the right one for the field.

Troubleshooting

A field is flagged that shouldn't be

Silktide infers the field's purpose from its label. If the label is missing, Silktide cannot rule the field out and may flag it - fixing the label (see Field labels) usually resolves this. If the field really has no autocomplete purpose, ignore the finding for that field.

A field with the wrong autocomplete value passes

This check verifies that a specific purpose is declared, not that the declared purpose is correct. Review your values against the standard list when adding them.

Learn more

Last updated

Was this page helpful?