0

My HTML5 template has h1 elements on every page (that I use for keyword) on top left part of the page.

Is there a role attribute to sign them as tags like the tags in WorPress?

unor
  • 92,415
  • 26
  • 211
  • 360
nikel
  • 653
  • 4
  • 13
  • 24

2 Answers2

1

As defined by W3C, you can use this values for role attribute:

  • banner
  • complementary
  • contentinfo
  • definition
  • main
  • navigation
  • note
  • search

contentinfo purpose is to provide meta information about the content, so it could be used for tag management. That said, <h1> shouldn't be used as tags, as it's main purpose is to explicitly describe the whole page

Source

zessx
  • 68,042
  • 28
  • 135
  • 158
1

You can find a list of all WAI-ARIA roles in the WAI-ARIA 1.0 specification:
http://www.w3.org/TR/2014/REC-wai-aria-20140320/roles#role_definitions

There doesn’t seem to be a role for tags. The contentinfo role could be used for the element that contains all tags the current document is tagged with.

In HTML5, contentinfo is the default role for the footer element, which is the element you should use for tags anyhow (instead of h1, which would typically be not correct). You might be interested in my related answer about semantic markup for tags.

Community
  • 1
  • 1
unor
  • 92,415
  • 26
  • 211
  • 360