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
Comment | File | Size | Author |
---|---|---|---|
#7 | drupal8.javascript.1372374-7.patch | 1.13 KB | evilehk |
#6 | states_js_html5.patch | 1.13 KB | evilehk |
states_js_html5.patch | 1.34 KB | theborg | |
Comments
Comment #1
rfayComment #2
JacineTagging
Comment #3
nod_this needs a reroll, states.js changed quite a lot lately.
Comment #4
JacineRelated issue: #1182820: Use hidden attribute on elements that are made invisible by #states
Comment #5
nod_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.
Comment #6
evilehk CreditAttribution: evilehk commentedRerolling patch.
Comment #7
evilehk CreditAttribution: evilehk commentedfixes a spacing issue to match standards, renamed to patchname suggestion
Comment #8
evilehk CreditAttribution: evilehk commentedThis 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.
Comment #9
evilehk CreditAttribution: evilehk commented