@kenreibman
Posted
I forgot to add on... for your JavaScript,
instead of changing the innerHTML, I would create a class that reveals the error text like,
.show-error
with display properties,
and add the show-error
class to the element with .classList.add('show-error')
changing the innerHTML
is not the most correct way to do it, as well as setting the opacity
to 1 and 0 does not hide it for people with screen readers so they will still get an error message regardless of if you can see it on the screen or not.
You can take a look at my code here as well.
Marked as helpful
@misiucodes
Posted
@kenreibman Ken, this was AMAZING feedback! Thank you so much for taking the time to provide a detailed response on things I could change to make my code better. I learned so much just from this feedback and from looking at your code. Sending so much love from a newbie developer!!