Skip to content

Commit

Permalink
checkpoint-1
Browse files Browse the repository at this point in the history
  • Loading branch information
Howie committed Apr 23, 2020
1 parent 5ff200e commit 0311817
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 16 deletions.
14 changes: 9 additions & 5 deletions app/components/registration-form.hbs
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
<div class="registration-form">
<div class="registration-form__info">
<h3>Sign up for Cats Weekly™️</h3>
<h2>Sign up for Cats Weekly</h2>
<p>Just fill in the information below and we'll keep you up to date with all the latest and greatest news about
cats.</p>
</div>
<div class="registration-form__fields">
<input placeholder="First Name" />
<input placeholder="Last Name" />
<input placeholder="Email Address" />
<input placeholder="How many cats do you own?" />
<label for="first-name">First Name</label>
<input id="first-name" placeholder="Henry" />
<label for="last-name">Last Name</label>
<input id="last-name" placeholder="Ford" />
<label for="email-address">Email Address</label>
<input id="email-address" placeholder="[email protected]" />
<label for="cats-owned">How many cats have you owned?</label>
<input id="cats-owned" type="number" placeholder="23" />
</div>
<div class="registration-form__actions">
<button {{on "click" (fn this.handleSubmit)}}>Sign up</button>
Expand Down
4 changes: 2 additions & 2 deletions app/index.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<!DOCTYPE html>
<html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<!-- <title>A11y Form</title> -->
<title>A11y Form</title>
<meta name="description" content="" />
<meta name="viewport" content="width=device-width, initial-scale=1" />

Expand Down
26 changes: 23 additions & 3 deletions app/styles/components/registration-form.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
$border-color: #ddd;
$button-background-color: #ff3d3d;
$button-background-color: darken(#ff3d3d, 16%);
$button-text-color: white;
$focus-ring-color: #b1c2de;
$focus-ring-color: darken(#b1c2de, 10%);

// Workshop Exercise Styles

Expand All @@ -18,6 +18,26 @@ $focus-ring-color: #b1c2de;
outline: 3px solid $focus-ring-color;
}

::-webkit-input-placeholder {
color: #767676;
opacity: 1;
}

:-moz-placeholder { /* Firefox 18- */
color: #767676;
opacity: 1;
}

::-moz-placeholder { /* Firefox 19+ */
color: #767676;
opacity: 1;
}

:-ms-input-placeholder {
color: #767676;
opacity: 1;
}

// End Workshop Exercise Styles


Expand Down Expand Up @@ -46,7 +66,7 @@ $focus-ring-color: #b1c2de;
appearance: none;
border: 1px solid $border-color;
padding: 0.375rem 0.5rem;
margin-bottom: 0.5rem;
margin-bottom: 1.25rem;
}

.registration-form__actions button {
Expand Down
8 changes: 6 additions & 2 deletions app/templates/application.hbs
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
<h1>Ember a11y Form Workshop</h1>
<RegistrationForm />
<header>
<h1>Ember a11y Form Workshop</h1>
</header>
<main>
<RegistrationForm />
</main>
4 changes: 2 additions & 2 deletions tests/acceptance/visit-registration-page-test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { module, test } from 'qunit';
import { visit, currentURL } from '@ember/test-helpers';
import { setupApplicationTest } from 'ember-qunit';
// import a11yAudit from 'ember-a11y-testing/test-support/audit';
import a11yAudit from 'ember-a11y-testing/test-support/audit';

module('Acceptance | visit registration page', function(hooks) {
setupApplicationTest(hooks);
Expand All @@ -11,6 +11,6 @@ module('Acceptance | visit registration page', function(hooks) {

assert.equal(currentURL(), '/');

// await a11yAudit();
await a11yAudit();
});
});
4 changes: 2 additions & 2 deletions tests/integration/components/registration-form-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { module, test } from 'qunit';
import { setupRenderingTest } from 'ember-qunit';
import { render } from '@ember/test-helpers';
import { hbs } from 'ember-cli-htmlbars';
// import a11yAudit from 'ember-a11y-testing/test-support/audit';
import a11yAudit from 'ember-a11y-testing/test-support/audit';

module('Integration | Component | registration-form', function (hooks) {
setupRenderingTest(hooks);
Expand All @@ -12,6 +12,6 @@ module('Integration | Component | registration-form', function (hooks) {

assert.dom(this.element).exists();

// await a11yAudit(this.element);
await a11yAudit(this.element);
});
});

0 comments on commit 0311817

Please sign in to comment.