mirror of
https://github.com/DataTables/DataTables.git
synced 2025-01-18 11:52:11 +01:00
Strip HTML from the aria-label tag for the sorting headers
This commit is contained in:
parent
74f970e1a7
commit
c22dfe00d3
7
media/js/jquery.dataTables.js
vendored
7
media/js/jquery.dataTables.js
vendored
@ -3894,6 +3894,7 @@
|
||||
|
||||
for ( i=0, iLen=oSettings.aoColumns.length ; i<iLen ; i++ )
|
||||
{
|
||||
var sTitle = aoColumns[i].sTitle.replace( /<.*?>/g, "" );
|
||||
nTh = aoColumns[i].nTh;
|
||||
nTh.removeAttribute('aria-sort');
|
||||
nTh.removeAttribute('aria-label');
|
||||
@ -3907,18 +3908,18 @@
|
||||
|
||||
var nextSort = (aoColumns[i].asSorting[ aaSort[0][2]+1 ]) ?
|
||||
aoColumns[i].asSorting[ aaSort[0][2]+1 ] : aoColumns[i].asSorting[0];
|
||||
nTh.setAttribute('aria-label', aoColumns[i].sTitle+
|
||||
nTh.setAttribute('aria-label', sTitle+
|
||||
(nextSort=="asc" ? oAria.sSortAscending : oAria.sSortDescending) );
|
||||
}
|
||||
else
|
||||
{
|
||||
nTh.setAttribute('aria-label', aoColumns[i].sTitle+
|
||||
nTh.setAttribute('aria-label', sTitle+
|
||||
(aoColumns[i].asSorting[0]=="asc" ? oAria.sSortAscending : oAria.sSortDescending) );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
nTh.setAttribute('aria-label', aoColumns[i].sTitle);
|
||||
nTh.setAttribute('aria-label', sTitle);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -134,6 +134,7 @@ function _fnSort ( oSettings, bApplyClasses )
|
||||
|
||||
for ( i=0, iLen=oSettings.aoColumns.length ; i<iLen ; i++ )
|
||||
{
|
||||
var sTitle = aoColumns[i].sTitle.replace( /<.*?>/g, "" );
|
||||
nTh = aoColumns[i].nTh;
|
||||
nTh.removeAttribute('aria-sort');
|
||||
nTh.removeAttribute('aria-label');
|
||||
@ -147,18 +148,18 @@ function _fnSort ( oSettings, bApplyClasses )
|
||||
|
||||
var nextSort = (aoColumns[i].asSorting[ aaSort[0][2]+1 ]) ?
|
||||
aoColumns[i].asSorting[ aaSort[0][2]+1 ] : aoColumns[i].asSorting[0];
|
||||
nTh.setAttribute('aria-label', aoColumns[i].sTitle+
|
||||
nTh.setAttribute('aria-label', sTitle+
|
||||
(nextSort=="asc" ? oAria.sSortAscending : oAria.sSortDescending) );
|
||||
}
|
||||
else
|
||||
{
|
||||
nTh.setAttribute('aria-label', aoColumns[i].sTitle+
|
||||
nTh.setAttribute('aria-label', sTitle+
|
||||
(aoColumns[i].asSorting[0]=="asc" ? oAria.sSortAscending : oAria.sSortDescending) );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
nTh.setAttribute('aria-label', aoColumns[i].sTitle);
|
||||
nTh.setAttribute('aria-label', sTitle);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user