Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Required fields should set attributes aria-required="true"
or required="required"
.
e.g.:
<div class="foo">
<label for="your-id">your label<span title="This field is required." class="form-required">*</span></label>
<input type="text" name="your-id" id="your-id" size="20" required="required" />
</div>
Comment | File | Size | Author |
---|---|---|---|
#2 | html5tools-required.patch | 2.37 KB | bleen |
Comments
Comment #1
bleen CreditAttribution: bleen commentedbased on https://drupal.org/node/1174938, D8 went with required="required" so we should use that
Comment #2
bleen CreditAttribution: bleen commentedThis works ... not sure if I love the code refactor though.
Comment #2.0
bleen CreditAttribution: bleen commentedUpdated issue summary.
Comment #3
philsward CreditAttribution: philsward commentedUnless I'm missing something, I don't get
required="required"
after applying the patch. :-/I specifically want it for Ubercart however, I didn't even see it on the core user / password (/user/login) input forms.
Comment #4
philsward CreditAttribution: philsward commentedPatch in #2 does not apply cleanly "if" #2834082: Coding Standards is applied.