The sticky table library adds an extra table that does not pass accessibility validation.
The error that is returned is "Data tables must have unique names".
Changing line 101 in "core/misc/tableheader.js.
From:
this.$stickyTable = $('<table class="sticky-header"/>').css({
to:
this.$stickyTable = $('<table class="sticky-header" role="presentation"/>').css({
Will fix the issue.
I would post a patch but am in the middle of a project.
For those who want to fix it without altering core, you can make use of libraries-extend: core/drupal.tableheader to load your own js to override the Drupal.TableHeader.prototype.createSticky function.
Edit:
I now get another error with the above applied.
"Layout tables cannot have data table elements and/or attributes".
Maybe aria-hidden is called for?... I'm not sure yet
| Comment | File | Size | Author |
|---|---|---|---|
| #14 | 3088500-14.patch | 689 bytes | gauravvvv |
Comments
Comment #2
2phaComment #3
2phaComment #4
2phaComment #6
sd9121 commentedComment #7
sd9121 commentedComment #14
gauravvvv commentedI have added aria-label and it fixes the issue. please review
see reference aria-label
Comment #15
smustgrave commentedIssue summary seems incomplete. Can a link to the violation be added also