CommentLuv Plugin Passes WCAG 2.0 by ATRC
May 13, 2008 – 06:23 by Dani Iswara. Words count: 321.Last updated: Monday, May 19, 2008 at 8:04.
We can make CommentLuv plugin get Conditional Pass WCAG 2.0 L2 (level 2 or AA level) status by ATRC web accessibility checker. Actually, web or blog using original code plugin will pass W3C markup validation, WAVE (wave.webaim.org) and Section 508 (cynthiasays.com). WAI test (cynthiasays.com) didn’t valid anymore, I guess (updated May 17, 2008: it’s valid now). See Comparison of Web Accessibility.
After upgrading CommentLuv plugin on my WordPress blog (Dani Iswara .Net), I gave my single post against Validome.org X/HTML validation and ATRC first. In my opinion, Validome XHTML Validator is more Strict for now.
Validome result was failed (not valid X/HTML 1.1). See the how to on CommentLuv Plugin Validation by Validome.
Using ATRC, I got this result:
Form missing fieldset and legend to group multiple checkbox buttons.
Then I go to my ‘Edit Plugins’ section as admin. Edit Commentluv plugin code.
Find this part of code:
// function to add text to bottom of form field
function add_text($id){
$cl_under_comment=get_option('cl_under_comment');
$cl_under_comment=str_replace('[commentluv]','<a href="http://www.fiddyp.co.uk/commentluv-wordpress-plugin/">CommentLuv</a>',$cl_under_comment);
echo "<input name='luv' id='luv' value='luv' type='checkbox' style='width: auto;'";
if(get_option('cl_default_on')=="TRUE") { echo ' checked="checked" ';}
echo "/><label for='luv'><!- - Added by CommentLuv Plugin v1.92 - Andy Bailey @ www.fiddyp.co.uk- ->".$cl_under_comment."</label>";
return $id; // need to return what we got sent
}
As ATRC result test (based on WCAG 2.0 guidelines) above, I add some codes (fieldset, legend, tabindex, small, and p) and words below:
// function to add text to bottom of form field
function add_text($id){
$cl_under_comment=get_option('cl_under_comment');
$cl_under_comment=str_replace('[commentluv]','<a href="http://www.fiddyp.co.uk/commentluv-wordpress-plugin/">CommentLuv</a>',$cl_under_comment);
echo "<fieldset><legend><small>Show your last blog post:</small></legend><p><input name='luv' id='luv' value='luv' type='checkbox' tabindex='8' style='width: auto;'";
if(get_option('cl_default_on')=="TRUE") { echo ' checked="checked" ';}
echo "/><label for='luv'><small><!- - Added by CommentLuv Plugin v1.92 - Andy Bailey @ www.fiddyp.co.uk- ->".$cl_under_comment."</small></label></p></fieldset>";
return $id; // need to return what we got sent
}
Try to validate it again.
It should works now.
Valid XHTML 1.1 by Validome.org and got Conditional Pass WCAG 2.0 L2 by ATRC.
![]()
Comment by shots on February 25, 2009 at 03:04:26
using Mozilla Firefox 3.0.6 on Windows XP
Nice edit, thank you for sharing it with us !
Should come in quite handy, if i can get it to work.
Thanks
-Josh
Comment by Cahya on July 31, 2009 at 06:19:28
using Mozilla Firefox 3.5.1 on Windows Vista
Kayanya yang ga valid itu malah CSS-nya deh Bli
Comment by Dani Iswara on July 31, 2009 at 08:54:23
using Mozilla Firefox 3.5.1 on Gentoo Linux
Cahya,
saya ngga ngikuti lagi perkembangannya sekarang..