aria-label seems to copy the whole cell html() vs. the text() only?

aria-label seems to copy the whole cell html() vs. the text() only?

frequentfrequent Posts: 23Questions: 0Answers: 0
edited July 2012 in DataTables 1.9
I'm just sifting through my table code and noticed the following in all of my table header cells:

[code]






 




[/code]

Quite the aria-labels... :-) Not sure what's causing this, because I'm using a lot of Jquery Mobile in the table, but I have not touched on aria-label, so maybe this is a bug. Without looking at the dataTables source code, maybe it should be text() instead of html() to determine the aria-label?

Replies

  • frequentfrequent Posts: 23Questions: 0Answers: 0
    ups. forgot the title... can this be added?
  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin
    DataTables should actually already be coping with this - which version is it that your are using?

    I've just put a simple test case up here: http://live.datatables.net/ujeziw/edit#preview and as you can see the and tags are being removed before being used in the ARIA attribute. Having said that, it is just a very basic regex replace on a string (rather than pulling it in from the DOM with text()/html() every time), so there could be something going wrong there.

    Allan
  • frequentfrequent Posts: 23Questions: 0Answers: 0
    1.9.0. I need check through the file though, because I replaced the JqueryUI with JqueryMobile UI. Maybe it's something I'm doing (I think not, I tried to limit tinkering with the original to a minimum). Will get back to this shortly.
This discussion has been closed.