The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

The CSS quizsticked at the top of the forum quiz b is a good way of trying to achieve what you want. I break the rules too-it gives the results and ONE little error (ok, well not a little one) won't hurt anything.
Stick around until Friday afternoon and when Paul posts the answer to quiz b that is going to be a perfectly valid way .

yeah... I wonder if such a thing could be built? Or would it basically need to be an AI and be able to understand a natural language?

It would require the validator to understand the content of the element and depending on the element, the way in which it is expressed (and even in what context). This may indicate the machine along with understanding language structure; formation and progression would also have to be able to understand any emotional or psychological emphasis (or relationship) which may exist. Long story short, the day we get a validator that can understand the semantics behind our language to a point in which it can tell apart for example what elements are considered important enough to require emotional or experience emphasis is the day that Skynet becomes self aware and your toaster strangles you with its cord while you sleep.

I never trusted toasters. I mean, they look all faithful in a chromey 1950's Father Knows Best sort of way... but it's all a ruse.

That is the best approach, I guess. So how would you fix this particular issue, for instance?

Simpler is usually better. Assuming you're going to put a Javascript event on that anchor, give it a class or id so your Javascript can keep iteself from butting into the HTML where it doesn't belong...

and use what jmp($fffc) suggested:

<a id="something" href="somewhere!">Cancel</a>

with CSS making some space on the left of the text and placing a background image (and likely making the whole anchor a block element so's it can has widths and heights).

Yesh, the href should go somewhere for those without JS-- your JS would override the href for those visitors who have JS on, best of both worlds. Non-JSers would be taken to some standalone page which can cancel stuff I guess. Depending on what this is in and what it's doing.