User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36 OPR/125.0.0.0 (Edition std-1)
What do the instructions say should be inside your label element?
You should include a span element with the text * and aria-hidden set to true inside the label element for each required input, so that required fields are visually indicated.
Have a look at this label example and see how it differs from yours:
I tried switching to association but it only resulted in more problems! It even stopped recognizing the input as “text” and ignored the aria-hidden tag
Looking at your code, you have a <label> for the “Card Number” but it does not seem to be directly related to the input element. You need to use the for attribute in the <label> to link it to the corresponding input element. Change the label to removed and make sure the for attribute in the aria-hidden span matches the id of the input element.
Also, check if there is an element with the id “card-number” inside the form.
You correctly removed the input from your label, however you removed too much. Read that instruction again:
You should include a span element with the text * and aria-hidden set to trueinside the label element for each required input, so that required fields are visually indicated.
Please copy/paste your updated code into a comment here if you need to share it again. Easier to work with than a screenshot.
Ah, my mistake! I missed that you already had the for attribute in the label. Thanks for the correction, pkdvalis. I’ll be more careful about checking the code before suggesting fixes. Good luck with your project, P3dr0!