The following snippet is being called but does not allow the scope attribute to pass through. This is required for most .gov sites.
sites/all/modules/htmlpurifier/config/1.php
function htmlpurifier_config_1($config) {
$def = $config->getDefinition('HTML');
$def->addAttribute('th', 'scope', 'Enum#row,col');
$def->addAttribute('td', 'scope', 'Enum#row,col');
}
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | htmlpurifier-scope_fix-1.patch | 578 bytes | thekevinday |
Comments
Comment #1
thekevinday commentedI have found the problem to be in the htmlpurifier module itself.
I made a patch against the module and also reported the problem upstream here: http://htmlpurifier.org/phorum/read.php?2,5688
I also attached the patch to this thread for drupal users who need or want to follow accessibility compliance.
Comment #2
NavArtsJim commentedRE: "This is required for most .gov sites"
Technically, scope is one of a few methods for HTML tables to become compliant with 508 and the markup understood well by the reader machines and software out there. The actual requirements are:
Data tables with more than one row of data must use either scoping or header/id attributes to associate data cells with row/column headings.
Source with examples:
http://www.access-board.gov/sec508/guide/1194.22.htm#(g)
Comment #3
mgifford+1
Comment #4
ezyang commentedFixed in upstream HTML Purifier 4.4.0.