In a recent accessibility report of our application there were some points stating that the number of results should not be in a heading on the page. For example, the markup should be:

<h2>Search results</h2>
<p>42 courses found</p>

instead of

<h2>Search results: 42 courses found</h2>

In my search of the WCAG and 508 standards I haven't found why this is the case and was wondering if indeed it is in the standards (and I can't find it) or if it is good practice (or something else completely).

2 Answers 2


Personally, I always include the search result count in the heading.

Users navigating by outline/headings (a feature often offered by screen readers) get more, and possibly relevant, information before they have to jump to that section and start reading how many results there are.

WCAG 2.0

The relevant guideline is 2.4.6 Headings and Labels (level AA):

Headings and labels describe topic or purpose.

According to Understanding SC 2.4.6 and the technique G130: Providing descriptive headings, both ways should be fine.

However, under "Additional Techniques (Advisory) for 2.4.6" it lists two additional techniques that should be considered to make content more accessible:

  • Using unique section headings in a Web Page (future link)
  • Starting section headings with unique information (future link)

Unfortunately, it doesn’t go into detail (yet), so I’m not sure how exactly this was meant, but it might apply in your case. Including the search result doesn’t make the headings unique, but I guess it’s not that far off.


I assume the accessibility report is looking at that aspect only, as such it would be right, dynamic headers are not a good experience for screen readers as they use the H's to navigate.

In addition to the above I'm going to reform my answer.

It stands to reason that someone with impaired vision, using a screen reader would need the H tag to navigate, this is generally how screen readers work.

So we normally avoid using dynamic text in header tags, that said if you are only changing this specific tag which relates to a search results page it looks to me in the first instance that this could work. I haven't had a chance to test this scenario but that's what UX is about, presenting solutions and testing them.

I wouldn't use dynamic headers generally, but I can see it here.

  • I would imagine (although I'm no expert with a screen reader) that when they find this header they would hear "Search results ..." so it shouldn't make any difference. The heading isn't changed by Javascript (but is server side). Personally I would prefer the count not to be in the heading, but I'm looking for how I can convince others. Aug 5, 2014 at 21:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.