GDSC-SIT-2024 / HacktoberFest-Session24

4 stars 38 forks source link

Fixed Issues with index.html, styles.css and scripts.js #41

Open Bhagy3sh opened 1 month ago

Bhagy3sh commented 1 month ago

To resolve the issues identified in the index.html file, we added an appropriate action attribute to the

element, ensuring it submits payment information correctly. We also grouped the input fields for the card number under a single label to enhance accessibility for screen readers. Additionally, we updated the placeholders for the card number inputs to clarify that users should enter four groups of four digits instead of a single group. For the script.js file, we corrected the card expiration month index calculation to accurately reflect zero-based indexing, preventing incorrect expiration dates. We removed the duplicated event handler for the #card-holder input field, streamlining the code and reducing unnecessary processing. The previously commented-out function getCreditCardType() was implemented to better classify card types, and we ensured that the #card-ccv element is present in the HTML to match the script's functionality. In the styles.css file, we completed the &::after pseudo-element definition for the .btn class to prevent layout issues. We also added visible focus outlines to the form fieldsets, improving accessibility for keyboard users. Lastly, we ensured the SCSS syntax was correctly compiled into CSS to guarantee that styles apply as intended across all elements.