In datatables 1.13.11 it was done via height: 0px, that the duplicated header is visually hidden.
But screenreaders and users using the tab key on the keyboard can still reach this duplicated and visually hidden header.
Normally you use aria-hidden="true" to exclude these from screenreaders.
Additionally you have to remove it from the keyboard navigation via tabindex="-1".
In the current datatables v2 the same problem exists, but the code is different.
You can easily test this via the following steps:
Relevant code in 1.13.11:
https://github.com/DataTables/DataTablesSrc/blob/1.13.11/js/core/core.scrolling.js#L313
There are probably more instances (like footer and so on), where visually hidden elements are reachable via tab key and are read aloud via screenreaders (NVDA).
In datatables 1.13.11 it was done via
height: 0px, that the duplicated header is visually hidden.But screenreaders and users using the tab key on the keyboard can still reach this duplicated and visually hidden header.
Normally you use
aria-hidden="true"to exclude these from screenreaders.Additionally you have to remove it from the keyboard navigation via
tabindex="-1".In the current datatables v2 the same problem exists, but the code is different.
You can easily test this via the following steps:
Relevant code in 1.13.11:
https://github.com/DataTables/DataTablesSrc/blob/1.13.11/js/core/core.scrolling.js#L313
There are probably more instances (like footer and so on), where visually hidden elements are reachable via tab key and are read aloud via screenreaders (NVDA).