The 'tableselect' form element type ostensibly accepts an #attributes property (like almost every other element type).
However, when generating the table in theme_tableselect, this property is not passed on:
return theme('table', array('header' => $header, 'rows' => $rows, 'empty' => $element['#empty']);
In order to add the attributes onto the table, this line would have to be:
return theme('table', array('header' => $header, 'rows' => $rows, 'empty' => $element['#empty'], 'attributes' => $element['#attributes']));
(Fixing this will incidentally make it possible to combine tabledrag and tableselect on the same table, which is pretty awesome.)
Comments
Comment #1
cburschkaHere is my patch:
Comment #2
moshe weitzman commentedComment #3
webchickCommitted to HEAD. Thanks!