Skip to content

Instantly share code, notes, and snippets.

@jesseangell
Last active March 7, 2017 12:53
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jesseangell/d7912ca8d4f8a0fc092f to your computer and use it in GitHub Desktop.
Save jesseangell/d7912ca8d4f8a0fc092f to your computer and use it in GitHub Desktop.
cardscan-form
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Credit Card Form</title>
</head>
<body>
<form>
<fieldset>
<label for="ccName">Name on card</label>
<input id="ccName" name="ccName" type="text">
<label for="cc_number">Credit Card Number</label>
<input id="cc_number" name="cc_number" type="text" >
<label for="cardExpirationMonth">Expiration Month</label>
<input id="cardExpirationMonth" name="cardExpirationMonth" type="text">
<label for="cardExpirationYear">Expiration Year</label>
<input id="cardExpirationYear" name="cardExpirationYear" type="text">
<input type="submit" value="Charge">
</fieldset>
</form>
</body>
</html>
@7mary4
Copy link

7mary4 commented Jan 14, 2015

Thank you for creating an example that is accessible. However, the fieldset should have a legend.

<legend>Credit Card Information</legend>

This has been a very helpful article, I know how difficult it can be to track down documentation on iOS features. Sometimes you only get a sentence that references a function.

@mathiasbynens
Copy link

Please do the following:

If Apple cared about web standards they would just use those attribute values as heuristics for their Card Scan feature. (Maybe they already do — I haven’t tested this.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment