@vanzasetia
Posted
Hi, Amit Kumar! π
I have three suggestions for this solution:
- Firstly, always specify the
type
of thebutton
. In this case, set the type of them astype="submit"
. It will prevent the button from behaving unexpectedly (reference: Checklist - The A11Y Project). - Secondly, 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 instead. - Lastly, I would recommend fixing all the accessibility issues that have been generated.
Hope this helps! π
@amit-kumar-18
Posted
@vanzasetia thank you for all the tips. I have updated the solution accordingly.
@vanzasetia
Posted
@amit-kumar-18 You're welcome! π
It's good that you fixed all the accessibility issues and used CSS classes instead of the style
property. But, I notice that the type
of the "Notify Me" button is button
. It is a submit button so type="submit"
would be the appropriate one.
@amit-kumar-18
Posted
@vanzasetia I don't know how I did that wrong even after your first suggestion. But now it's fixed.
Thanks.