NOTE: The current preferred location for bug reports is the GitHub issue tracker.
Bug 1027 - header with role of banner throws a warning
header with role of banner throws a warning
Status: RESOLVED INTENTIONAL
Product: Validator.nu
Classification: Unclassified
Component: ARIA
HEAD
All All
: P2 normal
Assigned To: Nobody
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2015-11-05 23:41 CET by Mark Sadecki
Modified: 2015-11-12 17:16 CET (History)
2 users (show)

See Also:


Attachments
Role Banner - Passing Test (269 bytes, text/html)
2015-11-06 14:35 CET, Mark Sadecki
Details
Role Banner - Warning Test (439 bytes, text/html)
2015-11-06 14:36 CET, Mark Sadecki
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Sadecki 2015-11-05 23:41:06 CET
A Warning is issued when a role appears on a <header> element.  This is true, with one exception; role=banner, as long as there is only one on the page.  Issuing a warning here is likely to cause developers to remove a role that improves accessibility.

See "Allowed Aria role attributes"
http://www.w3.org/html/wg/drafts/html/master/semantics.html#the-header-element

And
http://www.w3.org/TR/wai-aria/roles#banner

It would be nice of the validator detected more than one role=banner on the page and issues a Warning for that though.
Comment 1 Mark Sadecki 2015-11-06 14:35:52 CET
Created attachment 236 [details]
Role Banner - Passing Test
Comment 2 Mark Sadecki 2015-11-06 14:36:13 CET
Created attachment 237 [details]
Role Banner - Warning Test
Comment 3 Michael[tm] Smith 2015-11-08 12:24:50 CET
(In reply to Mark Sadecki from comment #0)
> A Warning is issued when a role appears on a <header> element.  This is
> true, with one exception; role=banner, as long as there is only one on the
> page.

I can't find anywhere in the spec that says that. Note that the current spec for this is http://w3c.github.io/html-aria/#header

> See "Allowed Aria role attributes"
> http://www.w3.org/html/wg/drafts/html/master/semantics.html#the-header-
> element

I see that says "banner role (default - do not set)", but as far as I can see it doesn't say anything about role=banner being OK for <header> if there's only in the document.

> And
> http://www.w3.org/TR/wai-aria/roles#banner
> 
> It would be nice of the validator detected more than one role=banner on the
> page and issues a Warning for that though.

I think the validator is behaving as expected per-spec but I have also pinged Steve Faulkner to confirm.
Comment 4 steveF 2015-11-11 11:45:40 CET
(In reply to Michael[tm] Smith from comment #3)
> (In reply to Mark Sadecki from comment #0)
> > A Warning is issued when a role appears on a <header> element.  This is
> > true, with one exception; role=banner, as long as there is only one on the
> > page.
> 
> I can't find anywhere in the spec that says that. Note that the current spec
> for this is http://w3c.github.io/html-aria/#header

there is no such caveat

> 
> > See "Allowed Aria role attributes"
> > http://www.w3.org/html/wg/drafts/html/master/semantics.html#the-header-
> > element
> 
> I see that says "banner role (default - do not set)", but as far as I can
> see it doesn't say anything about role=banner being OK for <header> if
> there's only in the document.

correct

> 
> > And
> > http://www.w3.org/TR/wai-aria/roles#banner
> > 
> > It would be nice of the validator detected more than one role=banner on the
> > page and issues a Warning for that though.
> 
> I think the validator is behaving as expected per-spec but I have also
> pinged Steve Faulkner to confirm.

That is correct, use of default implicit roles emits a warning as per spec. There is a blanket 'should not' on all default implicit roles.

"SHOULD NOT   This phrase, or the phrase "NOT RECOMMENDED" mean that
   there may exist valid reasons in particular circumstances when the
   particular behavior is acceptable or even useful, but the full
   implications should be understood and the case carefully weighed
   before implementing any behavior described with this label."
https://www.ietf.org/rfc/rfc2119.txt

It may be the case that a devloper decides to ignore this rule to support legacy user agents.
Comment 5 Mark Sadecki 2015-11-12 17:16:49 CET
Thanks for the clarification @steveF.  Closing this bug.