Skip to content

Commit 5466051

Browse files
committed
Merge branch 'feature/wireframe_new' of https://github.com/DamianDL/Module-Onboarding into feature/wireframe
2 parents 3ea8be6 + 7254063 commit 5466051

3 files changed

Lines changed: 83 additions & 5 deletions

File tree

Form-Controls/README.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Form Controls
2+
3+
## Learning Objectives
4+
5+
<!--{{<objectives>}}>-->
6+
7+
- [ ] Interpret requirements and check against a list of criteria
8+
- [ ] Write a valid form
9+
- [ ] Test with Devtools
10+
- [ ] Refactor using Devtools
11+
<!--{{<objectives>}}>-->
12+
13+
## Task
14+
15+
We are selling t-shirts. Write a form to collect the following data:
16+
17+
Our customers already have accounts, so we know their addresses and charging details already. We don't need to collect that data. We want to confirm they are the right person, then get them to choose a colour and size.
18+
19+
Writing that out as a series of questions to ask yourself:
20+
21+
1. What is the customer's name? I must collect this data, and validate it. But what is a valid name? I must decide something.
22+
2. What is the customer's email? I must make sure the email is valid. Email addresses have a consistent pattern.
23+
3. What colour should this t-shirt be? I must give 3 options. How will I make sure they don't pick other colours?
24+
4. What size does the customer want? I must give the following 6 options: XS, S, M, L, XL, XXL
25+
26+
All fields are required.
27+
Do not write a form action for this project.
28+
29+
## Developers must test their work.
30+
31+
Let's write out our testable criteria. Check each one off as you complete it.
32+
33+
- [ ] I have used HTML only.
34+
- [x] I have not used any CSS or JavaScript.
35+
36+
### HTML
37+
38+
- [ ] My form is semantic html.
39+
- [ ] All inputs have associated labels.
40+
- [ ] My Lighthouse Accessibility score is 100.
41+
- [ ] I require a valid name. I have defined a valid name as a text string of two characters or more.
42+
- [ ] I require a valid email.
43+
- [ ] I require one colour from a defined set of 3 colours.
44+
- [ ] I require one size from a defined set of 6 sizes.
45+
46+
## Resources
47+
48+
- [MDN: Form controls](https://developer.mozilla.org/en-US/docs/Learn/Forms)
49+
- [MDN: Form validation](https://developer.mozilla.org/en-US/docs/Learn/Forms/Form_validation)
50+
- [Lighthouse](https://developers.google.com/web/tools/lighthouse)
51+
- [Lighthouse Guide](https://programming.codeyourfuture.io/guides/testing/lighthouse)

Form-Controls/index.html

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
6+
<title>My form exercise</title>
7+
<meta name="description" content="" />
8+
<meta name="viewport" content="width=device-width, initial-scale=1" />
9+
</head>
10+
<body>
11+
<header>
12+
<h1>Product Pick</h1>
13+
</header>
14+
<main>
15+
<form>
16+
<!-- write your html here-->
17+
<!--
18+
try writing out the requirements first as comments
19+
this will also help you fill in your PR message later-->
20+
</form>
21+
</main>
22+
<footer>
23+
<!-- change to your name-->
24+
<h2>By HOMEWORK SOLUTION</h2>
25+
</footer>
26+
</body>
27+
</html>

Wireframe/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ There are some provided HTML and CSS files you can use to get started. You can u
1414

1515
<!--{{<objectives>}}>-->
1616

17-
- [ ] Use semantic HTML tags to structure the webpage
18-
- [ ] Create three articles, each including a title, summary, and a link
19-
- [ ] Check a webpage against a wireframe layout
20-
- [ ] Test web code using [Lighthouse](https://programming.codeyourfuture.io/guides/testing/lighthouse)
21-
- [ ] Use version control by committing often and pushing regularly to GitHub
17+
- [x] Use semantic HTML tags to structure the webpage
18+
- [x] Create three articles, each including a title, summary, and a link
19+
- [x] Check a webpage against a wireframe layout
20+
- [x] Test web code using [Lighthouse](https://programming.codeyourfuture.io/guides/testing/lighthouse)
21+
- [x] Use version control by committing often and pushing regularly to GitHub
2222
<!--{{</objectives>}}>-->
2323

2424
## Acceptance Criteria

0 commit comments

Comments
 (0)