Re: issue with validator flagging something the w3 site uses as an example

Hi Jacques,

Jacques Mattheij <jacques@mattheij.com>, 2015-07-22 12:56 +0200:
> Archived-At: <http://www.w3.org/mid/55AF76DE.1070109@mattheij.com>
> 
> Hello there,
> 
> When I run http://jacquesmattheij.com/ through your verifier I get this
> error:
> 
> *Error*: Bad value |navigation| for attribute |role| on element |ul| <http://www.w3.org/html/wg/drafts/html/master/single-page.html#the-ul-element>.

That error message is correct. The HTML element `ul` is not allowed to have
a role=navigation attribute.

The normative (authoritative) specification that defines which particular
role values are allowed on particular elements is the current HTML spec:

  https://www.w3.org/TR/html/dom.html#sec-implicit-aria-semantics

If you look at the row for the `ul` element in the table at the URL above,
you’ll see it says, “If specified, role must be one of the following:
directory, group, list, listbox, menu, menubar, radiogroup, tablist,
toolbar, tree or presentation.”

> But when I check how that's supposed to be done on the w3 site
> 
> http://www.w3.org/TR/2007/WD-xhtml-role-20071004/
> 
> That is explicitly used as an example:
> 
> <ul role="navigation wai:sitemap">
>     <li href="downloads">Downloads</li>
>     <li href="docs">Documentation</li>
>     <li href="news">News</li>
> </ul>
> 
> It states that sample is only 'informative', but still if that's not good
> use then I would expect them to use another example. Please let me know
> which of the two (verifier or standards document) is in error.

The document at http://www.w3.org/TR/2007/WD-xhtml-role-20071004/ is not
normative/authoritative with regard to the rules for role values in HTML
documents, and it doesn’t claim to be that; in fact the latest version of
that document, which is as https://www.w3.org/TR/xhtml-role/ indicates that
document is a Note, which means it has no normative/authoritative status
with regard to anything (instead it’s purely informative).

So while the fact that document has an invalid example is suboptimal, you
also need to understand that many older W3C documents may include invalid
examples; for example, the HTML4 spec has examples that aren’t valid
currently, according to the current rules in the HTML5 spec.

  —Mike

-- 
Michael[tm] Smith https://people.w3.org/mike

Received on Wednesday, 22 July 2015 12:57:52 UTC