London | 26-Jan | Gloria Mankrado | Sprint 2 | form control updated#1090
London | 26-Jan | Gloria Mankrado | Sprint 2 | form control updated#1090gloriamanks wants to merge 3 commits intoCodeYourFuture:mainfrom
Conversation
✅ Deploy Preview for cyf-onboarding-module ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This comment has been minimized.
This comment has been minimized.
Form-Controls/index.html
Outdated
|
|
||
| <div> | ||
| <label for="name">Name</label> | ||
| <input type="text" name="name" id="name" placeholder="username" minlength="2" required/> |
There was a problem hiding this comment.
Currently a user can enter a name consisting of only space characters (e.g., " "). Can you enforce a stricter validation rule using the pattern attribute to disallow any name that contains only space characters?
Form-Controls/index.html
Outdated
| <label for="red">Red</label> | ||
| <input type="radio" name="colour" id="red" value="red" required /> |
There was a problem hiding this comment.
Can consider wrapping the input element inside the label tags:
<label>
Red
<input type="radio" name="colour" value="red" required />
</label>
This way, we don't need to use the id and for attributes.
There was a problem hiding this comment.
Hi @cjyuan ,
Below are the changes i have made according to the feedback given:
- I’ve wrapped the colour inputs inside their labels
- I’ve also added additional requirements to the name field to prevent the issue " " referred.
Regarding the remaining Lighthouse warning, without using CSS it isn’t possible to increase the physical size of form controls, so I’ve applied the best possible HTML-only solution. According to the bot, however, this scores 100 on Accessibility

There was a problem hiding this comment.
Netlify may be using a different version of Lighthouse or different settings when calculating the accessibility score. I think the browser's score is more reliable.
The no-CSS requirement is unusual in practice, but the fix is not difficult (and a bit silly). Just think of it as a puzzle.
Can you try any of the following options to reach a browser's Lighthouse accessibility score of 100?
- Use CSS (I will accept the use of CSS), or
- Ask ChatGPT "How to overcome the 'Touch targets do not have sufficient size or spacing' problem without using CSS".
|
Hi @cjyuan ,
|
|
You forgot to change label. |
|
All good |


Learners, PR Template
Self checklist
Changelist
##FEEDBACK UPDATES
I’ve wrapped the colour radio inputs inside their labels to improve accessibility and increased the clickable area. I’ve also added a pattern attribute to the name field to prevent space-only input.
Regarding the remaining Lighthouse warning, without using CSS it isn’t possible to increase the physical size of form controls, so I’ve applied the best possible HTML-only solution.
Questions
I have none at the moment.