Adding id and for attribute to filter box and length dropdown elements of data table

Adding id and for attribute to filter box and length dropdown elements of data table

bvjebinbvjebin Posts: 2Questions: 0Answers: 0
edited August 2013 in DataTables 1.8
Hi,

I am a big fan of data table. Thanks for the awesome plugin.

DataTable plugin plays major role in my product. Now one of my client needs 508 compliance on these tables. The filter box and the length drop-down is wrapped by label tag. But those labels don't have "for" attribute and I don't find a provision to add a "for" attribute to labels and an "id" attribute to the input box(search filter) and combo box(length drop-down).

Please do not ask me to do it on the callback of each table initialization. Its a pain really as I have around 100 tables in my product. So I need a one place solution where an "id" and "for" attribute can be added to form elements and labels that are present in the data table.

Can someone help me out to do this?

Replies

  • allanallan Posts: 63,489Questions: 1Answers: 10,470 Site admin
    The filter input is inside the label which creates an implicit connection between the input and the label - there is no need for a `for` attribute (which creates an explicit connection). This is defined in the HTML specification: http://www.w3.org/TR/html401/interact/forms.html#adef-for .

    Allan
  • bvjebinbvjebin Posts: 2Questions: 0Answers: 0
    Hey Allan, Thanks for your reply. Still I pointed this out, the customer complained on it. So, because of time constraint I did it manually using [code]fnInitComplete[/code] CallBack. Any how once again thanks for your reply and thanks a lot for the plugin.
This discussion has been closed.