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>
CommentFileSizeAuthor
#2 html5tools-required.patch2.37 KBbleen
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

bleen’s picture

based on https://drupal.org/node/1174938, D8 went with required="required" so we should use that

bleen’s picture

Status: Active » Needs review
FileSize
2.37 KB

This works ... not sure if I love the code refactor though.

bleen’s picture

Issue summary: View changes

Updated issue summary.

philsward’s picture

Issue summary: View changes

Unless 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.

philsward’s picture

Status: Needs review » Needs work

Patch in #2 does not apply cleanly "if" #2834082: Coding Standards is applied.