SearchBuilder select elements missing label

SearchBuilder select elements missing label

csidorfskycsidorfsky Posts: 3Questions: 2Answers: 0

Description of problem: This is an accessibility issue, as flagged by the WAVE tool. When you create a custom search with SearchBuilder, the resulting <select> elements are missing labels. Is there a way to add them, or can this be added in a future build? Thanks.

Answers

  • allanallan Posts: 64,373Questions: 1Answers: 10,628 Site admin

    There currently isn't a way to add them. What would they say? The layout doesn't really allow for labels in SearchBuilder.

    I agree that it would be great to make it more accessible, but I'm not sure that simply adding labels would magically fix that (other than addressing an automated tool's check).

    I'd welcome ideas and suggestions for how to improve SearchBuilder's accessibility.

    Allan

  • MrMarbleMrMarble Posts: 1Questions: 0Answers: 0

    Not only for accessibility, but usage in general.
    I have one colum with a custom render function that returns some html to display an icon, the <select> element does not support rendering html on the value (not even on the label I think) so all the values are just blank:

    Having a way of indicating how to render an option could be useful

  • allanallan Posts: 64,373Questions: 1Answers: 10,628 Site admin

    Having a way of indicating how to render an option could be useful

    That is already possible with orthogonal data.

    Allan

  • sloloslolo Posts: 80Questions: 16Answers: 1

    As @allan told you with orthogonal data, you can have a look to this similar issue I have had myself.

    https://datatables.net/forums/discussion/80840/how-to-display-only-the-value-and-not-the-html-in-the-searchbuilder-and-searchpanes-components

    Hope this helps you.

  • allanallan Posts: 64,373Questions: 1Answers: 10,628 Site admin

    Thinking about it, another option would be to use Select2 which can draw HTML elements.

    Allan

Sign In or Register to comment.