WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Keyword Search results, highlighting words within the text

for

From: Jared Smith
Date: Sep 21, 2012 8:56AM


On Fri, Sep 21, 2012 at 5:21 AM, Nancy Johnson wrote:
> Does the screen reader pick up on the bold text?

Most don't do anything different with bold or emphasized text.

I disagree with Joe on recommending <em> or <strong>. In this case,
the text is not semantically emphasized (you wouldn't emphasize the
highlighted words in speech, for example), it is simply being flagged
presentationally. Using <b> or <i> would be more appropriate.

HTML5 does have the <mark> element which is intended precisely for
this type of thing. Of course screen readers don't do anything special
with it either... yet. But that's not really your problem. More
details on <mark> - http://html5doctor.com/draw-attention-with-mark/

Jared