This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 15229 - How to use @required on dependent elements with no-Javascript clients
Summary: How to use @required on dependent elements with no-Javascript clients
Status: RESOLVED LATER
Alias: None
Product: HTML.next
Classification: Unclassified
Component: default (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: This bug has no owner yet - up for the taking
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-16 14:07 UTC by Everett Zufelt
Modified: 2012-09-14 12:13 UTC (History)
7 users (show)

See Also:


Attachments

Description Everett Zufelt 2011-12-16 14:07:03 UTC
When building forms with required dependent elements, there is no way to modify @required on dependent elements without Javascript.

Example:

<form>
<label><input type="checkbox" />Use shipping address for billing</label>
<!-- elements dependent on checkbox not being checked for server-side validation -->
<label>Billing address 1:<input type="text" required /></label>
<label>Billing address 2:<input type="text" required /></label>
...
</form>

In a Javascript implementation the billing address fields would be hidden (display:none) and could be set to @disabled, making them imutable and therefore not failing the @required constraint validation.

Other than dramatically altering server-side processing mechanisms, and UIs, how can @required be applied to dependent elements in no-JS clients?


See Drupal implementation comments starting at comment #45 at http://drupal.org/node/1174938#comment-5366572/node/1174938
Comment 1 Ian 'Hixie' Hickson 2012-01-28 22:09:26 UTC
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Partially Accepted
Change Description: none yet
Rationale: Yeah, this is a known limitation. It's on the list of things to consider adding once browsers have implemented what we have so far.