This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 29126 - Should a <ul> allow a role="navigation"
Summary: Should a <ul> allow a role="navigation"
Status: RESOLVED MOVED
Alias: None
Product: ARIA
Classification: Unclassified
Component: Spec (show other bugs)
Version: Future
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: James Craig
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-14 10:53 UTC by Craig Francis
Modified: 2015-09-14 11:33 UTC (History)
1 user (show)

See Also:


Attachments

Description Craig Francis 2015-09-14 10:53:32 UTC
This may have already been discussed (cannot find), but after trying a markup solution by Mike West:

https://mikewest.org/2010/02/an-accessible-pagination-pattern

I received an error that said the <ul role="navigation"> was invalid:

https://github.com/validator/validator/issues/157

Considering that several websites have also used <ul>'s just for navigation, should we support this role on the <ul>?

That said, I realise the <li> inherits a default role of "listitem", and that cannot really be a child of "navigation"... where menubar / menuitem might be more appropriate?

Or adding a wrapping <nav> (which inherits the role="navigation") might be a better solution, as it would allow other lists to be added, and the UA to continue to provide separate landmark and list navigation.

As an aside, I'm going on holiday tomorrow, so might not be able to reply for a couple of weeks.
Comment 1 steve faulkner 2015-09-14 11:26:00 UTC
(In reply to Craig Francis from comment #0)
> This may have already been discussed (cannot find), but after trying a
> markup solution by Mike West:
> 
> https://mikewest.org/2010/02/an-accessible-pagination-pattern
> 
> I received an error that said the <ul role="navigation"> was invalid:
> 
> https://github.com/validator/validator/issues/157
> 
> Considering that several websites have also used <ul>'s just for navigation,
> should we support this role on the <ul>?
> 
> That said, I realise the <li> inherits a default role of "listitem", and
> that cannot really be a child of "navigation"... where menubar / menuitem
> might be more appropriate?
> 
> Or adding a wrapping <nav> (which inherits the role="navigation") might be a
> better solution, as it would allow other lists to be added, and the UA to
> continue to provide separate landmark and list navigation.
> 
> As an aside, I'm going on holiday tomorrow, so might not be able to reply
> for a couple of weeks.

Hi Craig,

role=navigation is not allowed (and has never been allowed) on a UL as navigation cannot have listitems as direct children and listitems must have a list or group parent. ARIA roles override the native role semantics. The advice is to wrap a list in <nav> if it is a list of navigation items. It does not work correctly across browsers or AT. In order for this to work interoperably it would require changes to the definitions and implementation requirements of role=navigation and the HTML <nav> element.
Comment 2 steve faulkner 2015-09-14 11:32:41 UTC
(In reply to Craig Francis from comment #0)
> This may have already been discussed (cannot find), but after trying a
> markup solution by Mike West:
> 
> https://mikewest.org/2010/02/an-accessible-pagination-pattern
> 
> I received an error that said the <ul role="navigation"> was invalid:
> 
> https://github.com/validator/validator/issues/157
> 
> Considering that several websites have also used <ul>'s just for navigation,
> should we support this role on the <ul>?
> 
> That said, I realise the <li> inherits a default role of "listitem", and
> that cannot really be a child of "navigation"... where menubar / menuitem
> might be more appropriate?
> 
> Or adding a wrapping <nav> (which inherits the role="navigation") might be a
> better solution, as it would allow other lists to be added, and the UA to
> continue to provide separate landmark and list navigation.
> 
> As an aside, I'm going on holiday tomorrow, so might not be able to reply
> for a couple of weeks.

Note: this is a HTML conformance issue not an ARIA issue
have moved to https://github.com/w3c/html-aria/issues/10

Hi Craig,

role=navigation is not allowed (and has never been allowed) on a UL as navigation cannot have listitems as direct children and listitems must have a list or group parent. ARIA roles override the native role semantics. The advice is to wrap a list in <nav> if it is a list of navigation items. It does not work correctly across browsers or AT. In order for this to work interoperably it would require changes to the definitions and implementation requirements of role=navigation and the HTML <nav> element.