CommentLuv Plugin Passes WCAG 2.0 by ATRC

May 13, 2008 – 6:23 am by Dani Iswara

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. :)

WCAG 2.0 - AA

Share :
  • Digg
  • del.icio.us
  • Facebook
  • Google
  • Live
  • Technorati
  • YahooMyWeb
  • Furl
  • Ma.gnolia
  • NewsVine
  • StumbleUpon

Last updated: Monday, May 19, 2008 at 8:04 am

You are free to share (copy, distribute and transmit) this blog post under the similar license (Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Unported; CCA-NC-ND 3.0 Unported). Please put these link on your copy:
Taken from: CommentLuv Plugin Passes WCAG 2.0 by ATRC by Dani Iswara (Dani Iswara .Net).

Post a Comment

You may read again from the Top

  • Strict XHTML (semantic markup) tags allowed (see Site Help - Leaving Comment)
  • All tags must be properly closed
  • Comment contains some words (eg. URLs) will be held in moderation
  • Paragraphs and line breaks are automatically converted
  • Keep relevant. Inappropriate comments may be edited, moderated, or removed
  • To have image beside your comment, get Gravatar!