W3C home > Mailing lists > Public > site-comments@w3.org > February 2021

Re: Semantic change in example code

From: Coralie Mercier <coralie@w3.org>
Date: Mon, 8 Feb 2021 19:52:11 +0100
Cc: W3C website feedback <site-comments@w3.org>
Message-Id: <92AF3BB5-A628-43F6-AB76-68E1AEEDC59E@w3.org>
To: Jean-Bernard Pellerin <jeanbern@ualberta.ca>
Hello Jean-Bernard,

> On 5 Feb 2021, at 21:44 , Jean-Bernard Pellerin <jeanbern@ualberta.ca> wrote:
> 
> Hello,
> 
> In example 6 under 4.13.2 Bread crumb navigation, an unordered list is used. Since the elements have a hierarchical order should this be an ordered list to be semantically correct?
> 
> https://www.w3.org/TR/html52/common-idioms-without-dedicated-elements.html#example-9c7d0afd

I suppose you’re right but it can be argued that the hierarchy order depends on the viewer’s interest unless the navigation is for something that is sequential (e.g., steps 1 through several). So long as you wrap your elements within <nav> you can use either and even other elements.

In fact, the most recent version of HTML uses <p>s within <nav> and not <ul> anymore.
cf. https://www.w3.org/TR/html/#rel-up

I didn’t find any documentation in W3C space for that choice (it doesn’t mean it doesn’t exist, just that I didn’t find it) but I found that exact question asked in Stack Overflow:
https://stackoverflow.com/questions/1775200/why-we-always-use-ul-to-make-navigation-why-not-ol

Coralie

> 
> Thank you,
> 
> Jean-Bernard

--
Coralie Mercier  -  W3C Marketing & Communications -  https://www.w3.org
mailto:coralie@w3.org +337 810 795 22 https://www.w3.org/People/Coralie/
Received on Monday, 8 February 2021 18:52:17 UTC

This archive was generated by hypermail 2.4.0 : Monday, 18 April 2022 20:33:56 UTC