This request is derived from Natively support the HTML5 #required FAPI property issue, comment > #45.

- Makes states.js required-aware, dynamically add/delete html5 'required' and 'aria-required' attribute to form elements.
- Also adds a visible trigger to make elements dependable on visibility of other elements.

Set to "won't fix" as html5 required and aria-required attributes, and required marker in label, were added in #2101427-35: Follow-up: Browser validation error with Chrome on hidden required fields, even on forms that don't allow client-side validation

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rfay’s picture

Component: ajax system » javascript
Jacine’s picture

Issue tags: +html5

Tagging

nod_’s picture

Status: Needs review » Needs work

this needs a reroll, states.js changed quite a lot lately.

Jacine’s picture

nod_’s picture

Assigned: theborg » Unassigned

Should be split in two issues. One for the visible callback and one for the required attributes.

Looks good for the required part of the patch.

evilehk’s picture

Status: Needs work » Needs review
FileSize
1.13 KB

Rerolling patch.

evilehk’s picture

fixes a spacing issue to match standards, renamed to patchname suggestion

evilehk’s picture

Issue summary: View changes
Status: Needs review » Closed (won't fix)

This issue has been made obsolete by the changes committed in issue #2101427-35: Follow-up: Browser validation error with Chrome on hidden required fields, even on forms that don't allow client-side validation, which implements this change and some others to states.js.

There is the potential that issue #2101427 may be rolled back assuming Chrome fixes a formnovalidate bug (https://code.google.com/p/chromium/issues/detail?id=303707). In which case, this issue should probably be re-opened.

evilehk’s picture

Issue summary: View changes