WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Use of SAMP to highlight search results

for

From: Cliff Tyllick
Date: Oct 28, 2010 9:24AM


I hadn't thought of this before, Pete.

According to the draft html5 spec, <samp> is to be used to tag program output in the middle of other content. For example, this might be an appropriate use:

"Returning <samp>404 Error: Page not found</samp> is not only unhelpful but also rude."

If you want to mark search terms used, the closer fit would be <kbd>, which the spec says is for tagging text as terms input by the user. And the user entered the search terms, right?

Just my quick thought. Someone else might have a still better idea.

Cliff

Cliff Tyllick
Usability assessment coordinator
Agency Communications Division
Texas Commission on Environmental Quality
512-239-4516
<EMAIL REMOVED>


>>> On 10/28/2010 at 5:04 AM, in message <AANLkTi=Zj3_x4VUaw=T85SU+t= <EMAIL REMOVED> >, Pete Fairhurst < <EMAIL REMOVED> > wrote:
Hi everyone,

I'm Pete Fairhurst, a web developer with 11 years' experience based in
Bristol, England.

I was wondering what people think of my idea to use the SAMP element to
highlight matching text in a list of search results?

http://www.htmlcodetutorial.com/_SAMP.html

On the face of it, SAMP sounds like it might be a better element to use than
EM, which is how I currently highlight matching text in search results.

What do you think? Does this sound like a good alternative, or should I be
using a different element entirely to EM or SAMP?

Thanks in advance!

- Pete

~~~~

"Haste in art is almost always vulgarisation." H.G. Wells