Take the 2-minute tour ×
User Experience Stack Exchange is a question and answer site for user experience researchers and experts. It's 100% free, no registration required.

One of the definitions of a HTML label is:

The HTML label element associates a piece of text to a control

What is the correct way to render HTML when the label itself is NOT "for" another label?

Example (to make it clear)

LabelA -> is for LabelB (which is read only text)

LabelB -> is for? (not really anything)

When 508 compliance checks run against things like this, LabelB is considered an "orphan" because it is not "for" anything. I could do a read only textbox but why even show that UI when a user cannot edit it?

EDIT: Removing the misleading label tag and replacing it with a DIV, passes checks.

share|improve this question
    
What is labelB actually being used for? Is it a piece of explanatory text for an earlier input, or something else entirely? –  Jimmy Breck-McKye Dec 17 '12 at 20:05
    
E.g. LabelA says "Account Number", LabelB -> shows the value which cannot be edited. –  kd7 Dec 17 '12 at 20:21
add comment

closed as off topic by Jimmy Breck-McKye, Benny Skogberg, JohnGB, ChrisF, Erics Dec 26 '12 at 14:06

Questions on User Experience Stack Exchange are expected to relate to user experience within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

1 Answer

up vote 2 down vote accepted

A label that is “for” another label makes no sense, and a label that is “for” a field that accepts no input does not make much sense either. The obvious solution (to whatever is the problem here) is to not use labels like that.

Section 508 rules on web information and applications require that when a form is used, “the form shall allow people using assistive technology to access the information, field elements, and functionality required for completion and submission of the form, including all directions and cues”. So it does not say anything formal about label. Any “checks” are thus just advisory. But it looks obvious that misleading labeling, such as assigning labels to read-only fields, violate both accessibility and usability requirements.

share|improve this answer
    
Thanks, what would be the alternative? Literal Text? –  kd7 Dec 17 '12 at 20:22
    
If it’s an explanation of non-editable data, then yes, it needs no special markup (or there is no suitable markup). –  Jukka K. Korpela Dec 17 '12 at 22:05
add comment

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