Fixed Issues with index.html, styles.css and scripts.js #41
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.