Issue T22255
Visible to All Users

Accessibility Issue - H Tag Used for Question Fields

created 20 days ago

We recently received a rejection in accessibility testing due to the use of H tags for question fields in our forms.

According to WCAG accessibility guidelines, question fields should be defined with a <label> tag or another suitable HTML element for better accessibility.

Is there a way to change the H tag to a <label> tag or another appropriate element within SurveyJS to comply with these guidelines?

If this feature is not currently available, is this something you plan to implement in the future?

Thank you for your assistance!

Show previous comments (6)

    Hi Ziv,
    We will research this issue and update you once we have any news to share: Question titles are not rendered after setting settings.titleTags.question = "label". Please stay tuned.

      Hi Ziv,
      I discussed this issue with our developers.
      SurveyJS forms use HTML section headings (<h1><h6>) to render question, panel, page, and survey titles. Using heading elements helps structure an HTML document, making it more accessible and improving search engine understanding of page hierarchy. This approach aligns with accessibility guidelines.

      However, we’ve decided to support the <label> element for form element titles as well. We're working on this update, and we’ll notify you once the fix is available: Question titles are not rendered after setting settings.titleTags.question = "label".

      In the meantime, if you have any references to guidelines recommending <label> or another element for form titles, please share them for our reference.

      Thank you

        Hi Jane

        I don't have any specific guidelines. It's just that the question title could be replaced from <h1>-<h6> to <label> or another tag that is not a heading tag.

        Thank you