Submitted over 2 years ago
Semantic HTML5 markup, CSS custom properties & Vanilla JavaScript
@SAAJEVES
Design comparison
SolutionDesign
Solution retrospective
Suggestions for improvement are highly welcomed
Community feedback
- @vanzasetiaPosted over 2 years ago
Hi! π
Congratulations on finishing this challenge! π
I tried to submit a valid email ([email protected]) but it says it's not a valid email. So, I recommend fixing the Regular Expression.
More suggestions from me.
- I recommend adding
max-width
to the container elements. All the elements keep growing as the browser window grows. It start looking not good when the browser window is above 1440px. So, make sure themax-width
is set with a fixed value (using eitherpx
orrem
units). - Another way to make the
form
listens to the submit is to useaddEventListener
. I prefer usingaddEventListener
because it allows me to create a separate function for the validation. It allows to name the function which makes it easier for other developers and for myself in the future to know what the function is doing (without reading the entire code).
const validateUserInputs = (event) => { // some code... } form.addEventListener("submit", validateUserInputs)
- All link elements require text content as a label. Without text content, the users of assistive technology would not know there are links. So, I recommend adding
aria-label
for each anchor tag. An example would bearia-label="Facebook"
for the Facebook link. - Avoid using JavaScript to add styling (unless you've no other option). JavaScript allows you to change the CSS code using the
style
property. But, to make debugging easier and improve code maintainability, itβs best to avoid it. Use CSS classes intead. - The logo is an important image for the site. It is a piece of information that can be used by screenreader users to know what the site or the project is called.
- To make the alert message gets pronounced by the screenreader, do the following.
- Add
aria-describedby
to theinput
element - Add an
id
to thealert
element - Add
aria-live
to thealert
element - The value for the
aria-describedby=<id>
should point to thealert
element. - Make sure the
alert
message is hidden by addinghidden
attribute - After that on JavaScript, remove the
hidden
and add the alert message to thealert
element
- Add
That's it! Hope this helps.
Marked as helpful0 - I recommend adding
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord