Skip to content

Commit

Permalink
add icons+CSS to mitigate accessibility issues (red/green)
Browse files Browse the repository at this point in the history
  • Loading branch information
grantm committed May 19, 2011
1 parent 3a41580 commit 50717c9
Show file tree
Hide file tree
Showing 6 changed files with 122 additions and 4 deletions.
1 change: 1 addition & 0 deletions Changes
Expand Up @@ -4,6 +4,7 @@ Revision history for {{$dist->name}}
- POD update to clarify intent of validation
- fix Javascript to work on older versions of IE
- add Javascript option to set intial focus
- add CSS + icons to improve accessibility

1.000 2011-04-13 12:26:35 Pacific/Auckland
- Remove redundant reference to Try::Tiny
Expand Down
Binary file added html/cc_icons.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion html/index.html
Expand Up @@ -45,7 +45,7 @@ <h1>CouponCode Test Page</h1>
<p>Test Form:</p>

<form id="demo-form">
<p>Please enter your registration code:</p>
<p>Please enter your coupon code:</p>
<p><input id="registration-code" name="registration_code" />
<input type="submit" value="Continue" disabled="disabled" /></p>
</form>
Expand Down
12 changes: 11 additions & 1 deletion html/jquery.couponcode.css
Expand Up @@ -2,15 +2,25 @@
input.jq-couponcode-part {
font-family: monospace;
width: 3em;
text-align: center;
text-align: right;
padding: 2px 4px 0px 16px;
}

input.jq-couponcode-good {
background-color: #77ff77;
background-image: url(cc_icons.png);
background-position: -5px -56px;
}

input.jq-couponcode-good-nohighlight {
text-align: center;
padding: 2px 10px 2px 10px;
}

input.jq-couponcode-bad {
background-color: #ff7777;
background-image: url(cc_icons.png);
background-position: -5px -103px;
}

span.jq-couponcode-sep {
Expand Down
4 changes: 2 additions & 2 deletions html/style.css
Expand Up @@ -15,7 +15,7 @@ h1 {
}

div.container {
width: 460px;
width: 490px;
margin: 30px auto 100px auto;
border: 1px solid #cccccc;
padding: 1.0em 1.8em;
Expand All @@ -29,7 +29,7 @@ form {
}

form input {
font-size: 24px;
font-size: 22px;
}

input#registration-code {
Expand Down
107 changes: 107 additions & 0 deletions misc/cc_icons.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 50717c9

Please sign in to comment.