开发者

Semantic HTML: Should I use the <nav> tag for a tag cloud?

开发者 https://www.devze.com 2023-03-26 22:01 出处:网络
I\'m putting together my blog at the moment - which includes a tag cloud to allow people to browse by topic

I'm putting together my blog at the moment - which includes a tag cloud to allow people to browse by topic

I'm considering wrapping the tag cloud links in a <nav> tag since these are technically navigational links.

What 开发者_JAVA百科do others think?


The W3C definition is "The nav element represents a section of a page that links to other pages or to parts within the page: a section with navigation links." and then notes "Not all groups of links on a page need to be in a nav element — the element is primarily intended for sections that consist of major navigation blocks."

In my opinion, tag clouds are more similar to results of a search query (which are definitely not navigation blocks) than to well defined navigation elements.

So: I wouldn't.


Following the same definition as Olaf, I would consider putting them into a <nav> element.

Tag clouds can be a major aid for users, but mainly due to their varying size, which gives your user a visual feedback of which links are the most important.

The <nav> element is also (mainly) and aid for users with limitations, because it helps their browsers to find groups of navigation. So while it may be helpful to include the tag cloud, you may want to find a way to make the difference in importances clear to blind users too.

If you don't find a way to do that, it would make less sense to include the tag cloud in a <nav> element, if at all.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号