W3C home > Mailing lists > Public > public-html@w3.org > June 2010

Re: Change proposal for ISSUE-85

From: Smylers <Smylers@stripey.com>
Date: Wed, 16 Jun 2010 11:21:54 +0100
To: public-html@w3.org
Message-ID: <20100616102154.GB6614@stripey.com>
Henri Sivonen writes:

> We have a chance of making validators whine about the abuse of new
> elements and old elements that aren't already commonly abused. I think
> it's not realistic to stop the use of <a> as a non-link click target.

I agree it isn't realistic to _stop_ this occurring on the web -- along
with dozens of other undesirable things which are currently out there.
But I think it is realistic to reduce it, especially by authors who care
and who genuinely want to do the right thing.

> That's why I think <a> usage as non-link click targets, such as
> button, should be grandfathered into the conformance criteria,

An author updating a page to HTML5 and checking it with a validator may
find it complaining about several things which the HTML4 validator
didn't, and which are interoperably implemented. For an author with no
interest in updating those parts of the page, it's not helpful to have
complaints about those parts crowding out errors in the new updates.

That's a general problem, because there are two distinct scenarios for
using a validator: maximal complaints for new documents; ignoring
'legacy' complaints on updated HTML4 documents. There isn't really any
middle ground: a validator which mentions some 'legacy' issues but not
others is suboptimal for everybody.

To meet these two conflicting needs validators need to do something
different for each. If HTML5 specified errors and warnings to suit newly
created documents, validators could provide interfaces of use to authors
updating old documents. For example:

* A validator could offer a 'only complain about things I've just made
  worse' by accepting two versions of a webpage to check, typically the
  dev version and one that's currently live on the web. Then it only
  displays errors and warnings in the new version that weren't also in
  the old one.

  This wouldn't just apply to the HTML4-HTML5 transition. It would be a
  useful feature at any time for authors who have inherited poorly
  written sites and wish to do things right from now on (but don't have
  the time/the budget/permission/whatever to rewrite the entire site).

* A validator could examine a document's errors and warnings, and count
  how many of them are for checks which HTML4 permits. If they pass a
  certain threshold then it guesses that the author is editing an HTML4
  page, and chooses to display the errors accordingly, putting the 'new'
  errors first, followed by words along the lines of:

    The following problems have also been detected with your document.
    These are things which were permitted by HTML4 but which are no
    longer permitted in HTML5. Browsers typically behave consistently on
    this old mark-up, but it is discouraged in favour of better ways of
    doing things. You need to address all of these for your document to
    be valid HTML5.

    If this is a new webpage then you should look at the advice below to
    learn the current ways of implementing your page. If you are
    updating an old, formerly HTML4, page then you may decide to ignore
    these errors for the time being (but remember that your page won't
    be valid HTML5).

  That way it is easy for an author to see the errors she cares about,
  and it's up to her if she wishes to ignore constructs that were valid
  HTML4. This still allows other authors, particularly those of new
  documents, to benefit from all the validator complaints, something
  which is not the case if the HTML5 spec removes these from everybody.

So I think it's good for validators to complain about <a role=button>.
It's then up to them how they present this. (I object to changing the
spec such that they wouldn't complain.)


Received on Wednesday, 16 June 2010 10:22:49 UTC

This archive was generated by hypermail 2.4.0 : Saturday, 9 October 2021 18:45:20 UTC