Two Dropdown and One Label

I have a credit card payment form which currently have one input box where the user can enter a credit card expiration date.

Knowing how end users can screw up just about anything, it seems like I should convert things to two dropdown lists.

The problem with this is that I will have two fields (i.e. Expiration Month, Expiration Year) but I only want one label which reads “Expiration Date”.

What would be the best way to do the HTML markup so it follows standards, including accessibility? :wonky:



If you want to avoid user confusion I would say do label both inputs.
But to group two or more inputs in a named group you would use a fieldset with a legend.

There is a month input type which takes a month and year value, but it does not have full browser support.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.