1
0
mirror of https://github.com/DataTables/DataTables.git synced 2024-11-29 11:24:10 +01:00

Fix: Accessibility improvements

- Remove the aria-relevant from the info text to use the default,
  otherwise it was reading information that isn't very useful
- Change info text role to `status`
- Remove `role=row` from header - this is experimental and might change.
  Might need it on this row and all rows in the table
- Based on feedback from James Craig (thanks!)
This commit is contained in:
Allan Jardine 2014-04-18 09:39:18 +01:00
parent 22161b3224
commit d6a5b7c729
2 changed files with 3 additions and 7 deletions

View File

@ -1 +1 @@
8f8b1e7915da0e8681302016830c46dd62fa9797
7af052b65bad5f70edd2aa928eab03ce43206081

View File

@ -1677,9 +1677,6 @@
_fnDetectHeader( oSettings.aoHeader, thead );
}
/* ARIA role for the rows */
$(thead).find('>tr').attr('role', 'row');
/* Deal with the footer - add classes if required */
$(thead).find('>tr>th, >tr>td').addClass( classes.sHeaderTH );
$(tfoot).find('>tr>th, >tr>td').addClass( classes.sFooterTH );
@ -2952,9 +2949,8 @@
} );
n
.attr( 'role', 'alert' )
.attr( 'aria-live', 'polite' )
.attr( 'aria-relevant', 'all' );
.attr( 'role', 'status' )
.attr( 'aria-live', 'polite' );
// Table is described by our info div
$(settings.nTable).attr( 'aria-describedby', tid+'_info' );