Validating WordPress Single Post

Error Line 117, Column 95: there is no attribute “aria-required”

…me=”author” id=”author” value=”" size=”22″ tabindex=”1″ aria-required=’true’ />

Ever since this line was in the comments.php, my blog no longer validates.
I have always ignored it.
If it benefits the visitors, I’ll live with it.

But suddenly, this Invalid Markup bothers me today. It must have been 2 years.
Someone must have moved too fast and someone else moved too slow.
2 years and still behind. It must be a case of :

  • It is not important
  • It is important but is not urgent
  • It is important and urgent but does not required immediate attention and action

So I opened up comment.php and search for <aria-required> I found these 2 lines:

<p><input type="text" name="author" id="author" value="<?php echo esc_attr($comment_author); ?>" size="22" tabindex="1" <?php if ($req) echo "aria-required='true'"; ?> />
<label for="author"><small>Name <?php if ($req) echo "(required)"; ?></small></label></p>
<p><input type="text" name="email" id="email" value="<?php echo esc_attr($comment_author_email); ?>" size="22" tabindex="2" <?php if ($req) echo "aria-required='true'"; ?> />
<label for="email"><small>Mail (will not be published) <?php if ($req) echo "(required)"; ?></small></label></p>

I had these 2 lines of php code removed

<?php if ($req) echo "aria-required='true'"; ?>

Now there’s a line that says
<?php if ($req) echo "(required)"; ?>

I don’t understand PHP but I feel this line should go too.

Since it’s done, I’ll go fill in a comment and see if there’s anything wrong.

It’s good the see this line again:

This document was successfully checked as XHTML 1.0 Transitional!

Tags:
Category: Maintain-Website
Saturday, April 10th, 2010 at 10:36 am

Leave a Reply