R I S K M O N I T O R

Loading

Intelligent Cybersecurity Check for vulnerabilities now

Ensuring Valid Autocomplete Attributes in Form Fields

Rule ID: autocomplete-valid
Ruleset: axe-core 4.10
User Impact: Serious
Guidelines: WCAG 2.1 (AA), WCAG 2.2 (AA), EN 301 549


How to Fix the Problem

To ensure compliance and accessibility, follow these steps for all form fields that collect personal data:

  1. Identify Relevant Fields
    Look through your form to identify any input fields collecting personal information — such as name, email address, phone number, street address, credit card info, and more.

  2. Reference the WCAG Input Purposes List
    Refer to the official WCAG 2.1 Section 7: Input Purposes for User Interface Components. It outlines 53 recognized input purposes (e.g., name, email, postal-code, cc-number, etc.).

  3. Apply the autocomplete Attribute Correctly
    Each relevant <input> or <select> element should include a valid autocomplete attribute that matches the intended input purpose.
    Example:

    html
    <input type="email" name="user_email" autocomplete="email">
    <input type="tel" name="user_phone" autocomplete="tel">
    <input type="name" name="full_name" autocomplete="name">
  4. Use Only Valid Values
    Ensure that the autocomplete attribute values are exact matches from the WCAG list. Invalid or unsupported values will not help screen readers or browsers autofill the data.

  5. Test for Compatibility
    Verify with assistive technology tools and browsers that the form behaves as expected — both for accessibility and autofill convenience.


Why it Matters

Proper use of the autocomplete attribute ensures a better experience for users with disabilities:

  • Screen Readers: When autocomplete values are missing or incorrect, screen readers fail to convey the intended use of each field, making navigation and form completion frustrating or even impossible.

  • User Experience: Accurate autocomplete values allow browsers to autofill personal data, reducing input time and the likelihood of user error.

  • Compliance: This rule supports WCAG 2.1 Level AA success criterion 1.3.5, which is critical for legal compliance in many regions.

Neglecting these attributes undermines both usability and accessibility, and increases the risk of failing accessibility audits.


Rule Description

This rule ensures that input fields collecting personal information define their purpose programmatically. Valid autocomplete values from the recognized WCAG list are required so that assistive technologies can accurately identify and communicate the field’s intent to users.


The Algorithm (in simple terms)

To pass this rule:

  1. Check each input field that collects personal data.

  2. If the field matches one of the 53 types in WCAG’s list:

    • Confirm that it includes the correct autocomplete attribute with a valid value.

  3. Ensure the technology used (HTML5, for example) supports this attribute.

If these conditions are met, the field is accessible and compliant.

Leave A Comment