W3C Validator errors caused by form_build_id hidden field having autocomplete attribute

Created on 6 June 2025, 1 day ago

Problem/Motivation

I think that since the resolution of the issue https://www.drupal.org/project/drupal/issues/3495881 🐛 Form cache causes issues with media library widget Active , this other fixed issue becomes invalid: https://www.drupal.org/project/drupal/issues/3320467 🐛 form_build_id is a hidden input field and therefore should not have the autocomplete attribute Needs work

This gives me an error during W3C validation, just to remind you:

<input autocomplete="off" data-drupal-selector="form-v8temxqitapn2hablkw4gfmqyls0f5pmiy9tcd3p5gy" type="hidden" name="form_build_id" value="form-V8tEmXQITAPn2hAblkW4gfMQYls0F5pmiy9tCd3P5GY" />

This is invalid HTML, as confirmed by the W3 HTML Validator:
An input element with a type attribute whose value is hidden must not have an autocomplete attribute whose value is on or off.

🐛 Bug report
Status

Active

Version

11.1 🔥

Component

forms system

Created by

🇫🇷France rmpereira

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024