Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

On the ID attribute and its values

5 views
Skip to first unread message

tlvp

unread,
Apr 12, 2013, 8:15:09 PM4/12/13
to
There's a page the AARP produces, at

<http://www.aarp.org/health/conditions-treatments/info-04-2013/common-ailments-remedies.2.html>

that must have more than a half-dozen DIV items all with ID equal to
"aarp_main_n_textimage".

Is that suitable? And if, as I suspect, it is not, how my I tactfully, as
an HTML-aware AARP member, rub their noses in that, so they clean it up?

Think it'd be enough to point them to the validator's complaints? --

> Line 730, Column 50: Duplicate ID aarp_main_n_textimage.
> <div id="aarp_main_n_textimage" class="textImage">
>
> Line 551, Column 50: The first occurrence of ID aarp_main_n_textimage was here.
> <div id="aarp_main_n_textimage" class="textImage">

(And no, I'm not at all concerned with any of the other 200+ assorted
errors or warnings the validator finds it needs to issue :-) .)

Thanks for any good, diplomatic, effective advice. Cheers, -- tlvp
--
Avant de repondre, jeter la poubelle, SVP.

Barry Margolin

unread,
Apr 12, 2013, 8:55:57 PM4/12/13
to
In article <1ht86n8hclblx.1n9vg0q0yngeh$.d...@40tude.net>,
tlvp <mPiOsUcB...@att.net> wrote:

> There's a page the AARP produces, at
>
> <http://www.aarp.org/health/conditions-treatments/info-04-2013/common-ailments
> -remedies.2.html>
>
> that must have more than a half-dozen DIV items all with ID equal to
> "aarp_main_n_textimage".
>
> Is that suitable? And if, as I suspect, it is not, how my I tactfully, as
> an HTML-aware AARP member, rub their noses in that, so they clean it up?

If there's a webmaster address on the Contact Us page, you could try
sending there.

But unless it actually causes some operational failure with common
browsers, I wouldn't expect them to give fixing it a high priority.

--
Barry Margolin, bar...@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***

Chris F.A. Johnson

unread,
Apr 12, 2013, 8:51:04 PM4/12/13
to
On 2013-04-13, tlvp wrote:
> There's a page the AARP produces, at
>
><http://www.aarp.org/health/conditions-treatments/info-04-2013/common-ailments-remedies.2.html>
>
> that must have more than a half-dozen DIV items all with ID equal to
> "aarp_main_n_textimage".
>
> Is that suitable? And if, as I suspect, it is not, how my I tactfully, as
> an HTML-aware AARP member, rub their noses in that, so they clean it up?

Show them this screenshot: <http://b.cfaj.ca/aarp.jpg>

--
Chris F.A. Johnson
<http://torontowebdesign.cfaj.ca/>

Barry Margolin

unread,
Apr 12, 2013, 9:06:50 PM4/12/13
to
In article <oomm3a-...@cfa.johnson>,
"Chris F.A. Johnson" <cfajo...@gmail.com> wrote:

> On 2013-04-13, tlvp wrote:
> > There's a page the AARP produces, at
> >
> ><http://www.aarp.org/health/conditions-treatments/info-04-2013/common-ailment
> >s-remedies.2.html>
> >
> > that must have more than a half-dozen DIV items all with ID equal to
> > "aarp_main_n_textimage".
> >
> > Is that suitable? And if, as I suspect, it is not, how my I tactfully, as
> > an HTML-aware AARP member, rub their noses in that, so they clean it up?
>
> Show them this screenshot: <http://b.cfaj.ca/aarp.jpg>

Why do duplicate IDs in the main text cause layout problems in the
header?

Chris F.A. Johnson

unread,
Apr 12, 2013, 9:19:06 PM4/12/13
to
On 2013-04-13, Barry Margolin wrote:
> In article <oomm3a-...@cfa.johnson>,
> "Chris F.A. Johnson" <cfajo...@gmail.com> wrote:
>
>> On 2013-04-13, tlvp wrote:
>> > There's a page the AARP produces, at
>> >
>> ><http://www.aarp.org/health/conditions-treatments/info-04-2013/common-ailment
>> >s-remedies.2.html>
>> >
>> > that must have more than a half-dozen DIV items all with ID equal to
>> > "aarp_main_n_textimage".
>> >
>> > Is that suitable? And if, as I suspect, it is not, how my I tactfully, as
>> > an HTML-aware AARP member, rub their noses in that, so they clean it up?
>>
>> Show them this screenshot: <http://b.cfaj.ca/aarp.jpg>
>
> Why do duplicate IDs in the main text cause layout problems in the
> header?

They don't, but it might convince them that something needs to be
done with the page.

Jukka K. Korpela

unread,
Apr 13, 2013, 2:42:02 AM4/13/13
to
2013-04-13 3:55, Barry Margolin wrote:

>> <http://www.aarp.org/health/conditions-treatments/info-04-2013/common-ailments
>> -remedies.2.html>
>>
>> that must have more than a half-dozen DIV items all with ID equal to
>> "aarp_main_n_textimage".
>>
>> Is that suitable? And if, as I suspect, it is not, how my I tactfully, as
>> an HTML-aware AARP member, rub their noses in that, so they clean it up?
>
> If there's a webmaster address on the Contact Us page, you could try
> sending there.

They have a "Contact Us" link in the "WHO WE ARE" part of their
hypertrophic footer. But I would not bother; I have rarely seen any
feedback to web site admin have any positive effect (sometimes you get
even a response, but just telling they won't fix anything).

> But unless it actually causes some operational failure with common
> browsers, I wouldn't expect them to give fixing it a high priority.

Well, a multiple id value is a gross error, but it normally has no
effect if the id value is not actually used for anything. It is
comparable to assigning the same Social Security Number to dozens of
people in a country, without having any social security system or any
other use for SSN.

If the id value is used in a URL fragment (#aarp_main_n_textimage), in
link to a particular location on the page (internally or externally),
the effect is undefined, as it is an error.

If the id value is used in JavaScript to access an element, as in
document.getElementById('aarp_main_n_textimage'), the effect is undefined.

If the id value is used in an id selector in CSS,
#aarp_main_n_textimage, the effect is undefined.

(In practice browsers may treat the reference as referring to the first
element with the id attribute, or to no element, or a JavaScript error
message might be shown, though with normal settings it will only appear
in the error console.)

These are the basic used of an id attribute value. There might be others
that I cannot imagine right now (when it's about <div> elements). If the
value is not used in any way, the user won't notice anything.

--
Yucca, http://www.cs.tut.fi/~jkorpela/

tlvp

unread,
Apr 13, 2013, 9:02:07 PM4/13/13
to
On Sat, 13 Apr 2013 09:42:02 +0300, Jukka K. Korpela wrote:

> ... If the id value is used in a URL fragment (#aarp_main_n_textimage), in
> link to a particular location on the page (internally or externally),
> the effect is undefined, as it is an error. ...

Bingo, Jukka: that ID value is set (for the 7th time?) in a DIV containing
information on "leg cramps" that I had hoped to send a link for to an
interested friend. Because that DIV does not hold the *first* instance of
that ID value, of course, the "fragment" technique failed miserably, and I
had to resort to describing the passage in question as being "roughly 3/4
of the way down the page".

Not the end of the world, of course, but annoyingly imprecise :-) .

James Moe

unread,
Apr 14, 2013, 2:59:12 PM4/14/13
to
On 04/12/2013 05:51 PM, Chris F.A. Johnson wrote:
>>
>> Is that suitable? And if, as I suspect, it is not, how my I tactfully, as
>> an HTML-aware AARP member, rub their noses in that, so they clean it up?
>
> Show them this screenshot: <http://b.cfaj.ca/aarp.jpg>
>
Ah. You have a minimum font size set. I see that a lot as well.
It would seem that, despite decades of promotion, web authors are
still clueless that the visitor can change the layout, or worse, do not
care; most business websites are amazingly fragile. Especially when
Javascript is involved and document editors output the pages.

--
James Moe
jmm-list at sohnen-moe dot com
0 new messages