Skip to content

Conversation

@mohammadaldali
Copy link

@mohammadaldali mohammadaldali commented May 14, 2025

Learners, PR Template

Self checklist

  • I have committed my files one by one, on purpose, and for a reason
  • I have titled my PR with REGION | COHORT_NAME | FIRST_NAME LAST_NAME | PROJ_NAME
  • I have tested my changes
  • My changes follow the style guide
  • My changes meet the requirements of this task

Changelist

  • Created a semantic HTML form for collecting t-shirt order info.
  • Validated user name and email inputs.
  • Restricted color selection to red, green, and blue.
  • Restricted size selection to XS, S, M, L, XL, XXL.
  • Removed CSS as per the spec.
  • Removed unnecessary aria-label to clear W3C validation warning.
  • Improved consistency in values.

Questions

Ask any questions you have for your reviewer.

@netlify
Copy link

netlify bot commented May 14, 2025

Deploy Preview for cyf-onboarding-module ready!

Name Link
🔨 Latest commit 5540d7b
🔍 Latest deploy log https://app.netlify.com/projects/cyf-onboarding-module/deploys/683ddc426f45f6000828b6ea
😎 Deploy Preview https://deploy-preview-475--cyf-onboarding-module.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
2 paths audited
Performance: 100 (no change from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 86 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@mohammadaldali mohammadaldali changed the title add autocomplete attributes and fix form structure london | may2025 | mohammad | aldali | form-controls May 14, 2025
@mohammadaldali mohammadaldali added 👀 Review Requirements Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. and removed 👀 Review Requirements labels May 19, 2025
Copy link
Contributor

@cjyuan cjyuan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A well-prepared PR makes it easier for reviewers to approve it with minimal back-and-forth.

The "PR Essentials" file on the Canvas in the #cyf-code-review channel has some helpful tips to make your PRs more robust and ready for review.

Can you take a few minutes to check against the essentials, including how to prepare PR description? Doing so can help speed up the review process.

And as a practice to get better at using AI tools, try running your code by ChatGPT. You can ask ChatGPT

review HTML code:
...        <--- paste your HTML code here

Then take a look at the suggestions it gives you, and pick out the ones that actually make sense for your project. It's a great way to learn and improve your work.

Once you've finished making changes, please leave a comment on this PR so I’ll get notified. Thanks!

@cjyuan cjyuan added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels May 22, 2025
@mohammadaldali
Copy link
Author

hi #cjyuan
Thanks for the helpful suggestions!

I've reviewed the code with ChatGPT, cleaned up the structure, and added proper validations. Looking forward to your feedback!

@mohammadaldali mohammadaldali added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. and removed Reviewed Volunteer to add when completing a review with trainee action still to take. labels May 25, 2025
Copy link
Contributor

@cjyuan cjyuan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are off to a solid start.

Can you address the following issues and the comments I left with the code to further improve your implementation?

  1. While there is no error, W3C Markup Validation Service shows some warnings in your code. Can you address those warnings?

  2. The Lighthouse accessibility score is high but not yet 100. Can you improve the score to 100?

  3. In your PR description, in the "Changelist" section, can you briefly describe what you have implemented in this PR branch?

Comment on lines 26 to 28
<label for="password">Password:</label>
<span aria-label="required"><strong>*</strong></span>
<input type="password" id="password" name="password" placeholder="Enter your password" minlength="8" required>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It’s important to ensure the implementation adheres to the specifications outlined in the README.md to maintain consistency and avoid unexpected behavior. If you’d like to introduce new features you believe are useful, it’s best to request pre-approval first to ensure alignment with project goals.

Comment on lines 31 to 32
<section>
<h2>Choose your T-shirt</h2>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For forms, using <fieldset> with <legend> are specifically designed for grouping form controls and labeling them. As such, they are more semantic than using <section> with <h2>.


<section>
<h2>Choose your T-shirt</h2>
<p>Please fill all required information</p>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why place this instruction in the middle of the form when all fields are required?

<section>
<label for="name">Your name:</label>
<span aria-label="required"><strong> * </strong></span>
<input type="text" id="name" name="user-name" placeholder="Enter your name" required>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

@cjyuan cjyuan added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels May 25, 2025
@mohammadaldali
Copy link
Author

Thanks for the feedback!

I removed the password field as it wasn’t required.
I also added a pattern to the name input to only allow letters and one space between names — no spaces at the beginning or end.

I cleaned up the HTML using only semantic elements like fieldset and legend.
I also checked that there are no W3C validation warnings.

Let me know if anything else needs fixing.

@mohammadaldali mohammadaldali added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. and removed Reviewed Volunteer to add when completing a review with trainee action still to take. labels May 25, 2025
@mohammadaldali mohammadaldali requested a review from cjyuan May 25, 2025 15:30
Copy link
Contributor

@cjyuan cjyuan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code are greatly improved! Well done!

Can you address the following issues to further improve your implementations?

  1. The Lighthouse accessibility score is 95. The spec asks for 100. Can you improve this score to 100?

  2. Can you also address the warning indicated by the W3C Markup Validation Service?

  3. To follow best practices, make sure to

    • Check the items in the Self-Checklist to confirm your pull request meets the guidelines (which you have done! Good!)
    • Provide a brief description (under the "Changelist" section) summarizing the purpose of the PR and the changes you’ve made

@cjyuan cjyuan added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels May 25, 2025
… requirements:

- Removed unnecessary ARIA attributes to avoid validation issues.
- Added proper `<label>` elements for all inputs and selects.
- Adjusted the input, select, and button sizes to meet the required touch target size (min 44px height).
- Updated the "Choose your size" label and fixed the placeholder text.
- Re-tested with Lighthouse and now the accessibility score is 100%.

Let me know if anything else needs updating. Thanks!
@mohammadaldali mohammadaldali removed the Reviewed Volunteer to add when completing a review with trainee action still to take. label May 27, 2025
@mohammadaldali
Copy link
Author

the warning shown in the W3C Validator is not related to the HTML code I wrote.
It appears to come from the original repository or external assets being loaded automatically.
Specifically, the warning is about a element, which my code does not include at all.
I have not made any changes to the core str
ucture that could cause this issue.
‏لقطة الشاشة 2025-05-31 في 10 59 52

@mohammadaldali mohammadaldali added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. and removed Reviewed Volunteer to add when completing a review with trainee action still to take. labels May 31, 2025
@cjyuan
Copy link
Contributor

cjyuan commented May 31, 2025

@cjyuan cjyuan added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels May 31, 2025
@mohammadaldali
Copy link
Author

I’ve removed the stray
tags inside the elements, which were causing HTML validation errors. I also cleaned up some unnecessary line breaks to improve the structure and readability of the

@mohammadaldali mohammadaldali requested a review from cjyuan June 2, 2025 16:30
@mohammadaldali mohammadaldali added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. and removed Reviewed Volunteer to add when completing a review with trainee action still to take. labels Jun 2, 2025
Copy link
Contributor

@cjyuan cjyuan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to https://validator.w3.org/, there is still an error in your code. Can you fix it?

You can use the above website to check for errors yourself.


</select>
<hr>
<label for="size" >choose your size: </label>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you make these labels more consistent in terms of wording and letter case?

image

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've done ,
could you chek please?

@cjyuan cjyuan added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Jun 2, 2025
@mohammadaldali mohammadaldali added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. and removed Reviewed Volunteer to add when completing a review with trainee action still to take. labels Jun 2, 2025
@cjyuan
Copy link
Contributor

cjyuan commented Jun 2, 2025

Code is error free now. Good job.

As for the label, I would have just used "Color:" and "Size:" because the legend of the field set already mentions "T-shirt".
image

@cjyuan cjyuan added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Jun 2, 2025
@mohammadaldali
Copy link
Author

I'VE DONE

@mohammadaldali mohammadaldali added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. and removed Reviewed Volunteer to add when completing a review with trainee action still to take. labels Jun 2, 2025
@cjyuan
Copy link
Contributor

cjyuan commented Jun 2, 2025

Changes look good.

@cjyuan cjyuan added Complete Volunteer to add when work is complete and all review comments have been addressed. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Jun 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Complete Volunteer to add when work is complete and all review comments have been addressed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants