Accessibility - Survey Form HTML


I was wondering if someone could have a look at my html for the Survey Form challenge before I add the styling. I’m particularly interested in the accessibility part of it. Could you please let me know if this is generally the right approach?

Also, how do we make a dropdown menu accessible?
Should we have a label for each of the options or only a label for the dropdown itself?

Thank you!!

There is nothing special you need to do for a <select>, it is accessible by default as is.

Your form’s accessibility is fine except for one thing, you should be using a <fieldset> and <legend> for the book genres (just like you did with the radio button grouping) instead of adding a tabindex to a <p>.

Never add a tabindex greater than -1 to a non-functional element. Elements should only be in the keyboard focus order if they do something (i.e. you can click on them to activate some sort of functionality).

Ahh yes I understand now!
And adding a <fieldset> to the book genres group, would it be because they are all related?

Thank you for your help!

Yes, that’s the purpose of <fieldset>, to group related form controls, just like you are doing with the radio buttons.

Perfect, thanks very much! :+1:t3:

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