mirror of
https://github.com/DataTables/DataTables.git
synced 2025-03-15 16:29:16 +01:00
Fix: grid
ARIA role should be on the table
, not the container
- Feedback from James Craig - author of WAI-ARIA specification.
This commit is contained in:
parent
b53ac91310
commit
3fb997f0b8
@ -1 +1 @@
|
||||
4d968710b6b942e511f833c96dc45c1533ec1db0
|
||||
1d7bb5389cc0da4d1176ca115fda46b584d70e50
|
||||
|
8
media/js/jquery.dataTables.js
vendored
8
media/js/jquery.dataTables.js
vendored
@ -1994,7 +1994,6 @@
|
||||
|
||||
// All DataTables are wrapped in a div
|
||||
var insert = $('<div/>', {
|
||||
role: 'grid',
|
||||
id: oSettings.sTableId+'_wrapper',
|
||||
'class': classes.sWrapper + (oSettings.nTFoot ? '' : ' '+classes.sNoFooter)
|
||||
} );
|
||||
@ -3374,6 +3373,12 @@
|
||||
*/
|
||||
function _fnFeatureHtmlTable ( settings )
|
||||
{
|
||||
var table = $(settings.nTable);
|
||||
|
||||
// Add the ARIA grid role to the table
|
||||
table.attr( 'role', 'grid' );
|
||||
|
||||
// Scrolling from here on in
|
||||
var scroll = settings.oScroll;
|
||||
|
||||
if ( scroll.sX === '' && scroll.sY === '' ) {
|
||||
@ -3383,7 +3388,6 @@
|
||||
var scrollX = scroll.sX;
|
||||
var scrollY = scroll.sY;
|
||||
var classes = settings.oClasses;
|
||||
var table = $(settings.nTable);
|
||||
var caption = table.children('caption');
|
||||
var captionSide = caption.length ? caption[0]._captionSide : null;
|
||||
var headerClone = $( table[0].cloneNode(false) );
|
||||
|
Loading…
x
Reference in New Issue
Block a user