GDSC-SIT-2024 / HacktoberFest-Session24

4 stars 38 forks source link

issues in index.html #45

Open anshumangahlot opened 1 month ago

anshumangahlot commented 1 month ago

Issues :

1.  Accessibility concerns:
•   The label elements for form fields should have a for attribute that matches the id of the input field, but some label elements don’t have matching ids (e.g., for="card-holder" in the card preview).
•   Missing aria-label or appropriate accessibility attributes for screen readers.
2.  Input validation:
•   There is no explicit client-side validation for the credit card number, expiration date, or CCV. Adding pattern attributes or JavaScript validation would improve the UX.
•   No proper input formatting (e.g., automatic switching between credit card number fields when 4 digits are entered).
3.  Input design improvement:
•   The four separate fields for the card number could be combined into one field with automatic formatting (e.g., adding spaces between every four digits) for ease of input.
4.  Placeholder content:
•   The placeholders (e.g., “XXXX”) in the credit card number fields should be replaced with a better UX (e.g., showing 0000 0000 0000 0000 as the format).
5.  Select dropdown UX:
•   The expiration date dropdowns for month and year could be improved by setting default values or using a calendar picker to avoid invalid combinations.
6.  Novalidate attribute:
•   The form has the novalidate attribute, which disables HTML5 form validation. If it’s not necessary, it should be removed, or proper validation should be added.
7.  Security issue:
•   Although this is frontend code, sensitive information like the credit card number and CCV should be handled carefully with proper encryption and security mechanisms on the backend.
8.  Semantic and consistency improvements:
•   Some of the div elements could be changed to span elements for inline content, which improves the semantic structure.