Skip to content

Commit 049784b

Browse files
committed
Apply lighthouse fixes
1 parent 61dcc8b commit 049784b

2 files changed

Lines changed: 21 additions & 20 deletions

File tree

Form-Controls/README.md

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44

55
<!--{{<objectives>}}>-->
66

7-
- [ ] Interpret requirements and check against a list of criteria
8-
- [ ] Write a valid form
9-
- [ ] Test with Devtools
10-
- [ ] Refactor using Devtools
11-
- [ ] Use version control by committing often and pushing regularly to GitHub
12-
- [ ] Develop the habit of writing clean, well-structured, and error-free code
7+
- [x] Interpret requirements and check against a list of criteria
8+
- [x] Write a valid form
9+
- [x] Test with Devtools
10+
- [x] Refactor using Devtools
11+
- [x] Use version control by committing often and pushing regularly to GitHub
12+
- [x] Develop the habit of writing clean, well-structured, and error-free code
1313
<!--{{<objectives>}}>-->
1414

1515
## Task
@@ -29,7 +29,7 @@ All fields are required.
2929
Do not write a form action for this project.
3030

3131
> [!TIP]
32-
> To check whether the customer's name contains at least two non-space characters you may need to use a **regular expression** (or **regex** for short), which is a tool used to match patterns in text. If you wish to learn more about regular expressions there are plenty of resources on the web including the [official MDN documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_expressions), but for this task you can use this regex that we have pre-written for you: `.*\S.*\S.*`.
32+
> To check whether the customer's name contains at least two non-space characters you may need to use a **regular expression** (or **regex** for short), which is a tool used to match patterns in text. If you wish to learn more about regular expressions there are plenty of resources on the web including the [official MDN documentation](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_expressions), but for this task you can use this regex that we have pre-written for you: `.*\S.*\S.*`.
3333
>
3434
> Now you have the regular expression, it's up to you to figure out how to use it in the context of an HTML form!
3535
@@ -39,18 +39,18 @@ Do not write a form action for this project.
3939

4040
Let's write out our testable criteria. Check each one off as you complete it.
4141

42-
- [ ] I have only used HTML and CSS.
43-
- [ ] I have not used any JavaScript.
42+
- [x] I have only used HTML and CSS.
43+
- [x] I have not used any JavaScript.
4444

4545
### HTML
4646

47-
- [ ] My form is semantic HTML.
48-
- [ ] All inputs have associated labels.
49-
- [ ] My Lighthouse Accessibility score is 100.
50-
- [ ] I require a valid name.
51-
- [ ] I require a valid email.
52-
- [ ] I require one colour from a defined set of 3 colours.
53-
- [ ] I require one size from a defined set of 6 sizes.
47+
- [x] My form is semantic HTML.
48+
- [x] All inputs have associated labels.
49+
- [x] My Lighthouse Accessibility score is 100.
50+
- [x] I require a valid name.
51+
- [x] I require a valid email.
52+
- [x] I require one colour from a defined set of 3 colours.
53+
- [x] I require one size from a defined set of 6 sizes.
5454

5555
### Developers must adhere to professional standards.
5656

@@ -65,6 +65,7 @@ They ensure your code is reliable, maintainable, and presents a polished, credib
6565
- [ ] I commit often and push regularly to GitHub
6666

6767
## Resources
68+
6869
- [MDN: Form controls](https://developer.mozilla.org/en-US/docs/Learn/Forms)
6970
- [MDN: Form validation](https://developer.mozilla.org/en-US/docs/Learn/Forms/Form_validation)
7071
- [Lighthouse](https://developers.google.com/web/tools/lighthouse)

Form-Controls/index.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ <h1>Product Pick</h1>
2424
<br /><br />
2525

2626
<label for="colour"> Colour: </label>
27-
<select name="colour" id="coloud" required>
28-
<option value="" selected disabled>Select</option>
27+
<select name="colour" id="colour" required>
28+
<option value="select" selected disabled>Select</option>
2929
<option value="red">Red</option>
3030
<option value="green">Green</option>
3131
<option value="red">Red</option>
@@ -52,11 +52,11 @@ <h1>Product Pick</h1>
5252
<input type="radio" name="size" id="L" value="L" />
5353
<br /><br />
5454

55-
<label for="XS">XL</label>
55+
<label for="XL">XL</label>
5656
<input type="radio" name="size" id="XL" value="XL" />
5757
<br /><br />
5858

59-
<label for="XS">XXL</label>
59+
<label for="XXL">XXL</label>
6060
<input type="radio" name="size" id="XXL" value="XXL" />
6161
<br /><br />
6262
</fieldset>

0 commit comments

Comments
 (0)