RE: Invisible "Skip navigation" link

At 10:35 AM 2002-07-24, RUST Randal wrote:

>>Please review for me the reasoning on the 'id' value, please?
>
>In case you need to do something with the INPUT in Javascript.  Same thing
>with the use of the NAME attribute.

That explains why it's there.  Not why it has the value it has.

Sorry, I didn't make my question clear on the first pass.  I should have 
said "Please review for me the reasoning behind the value you used as an
'id' in this example.  Why is it not different from the 'name,' and why
does it not contain a tail of non-mnemonic characters?"

For Javascript, as for HTML and XML, the element 'id' must be unique in the
page.

People offering tutorial code examples should, I am suggesting, include 
uniqifying non-mnemonic terminal substrings in their 'id' values to 
demonstrate to their readers that the 'id' value must be set unique in 
the page and that any mnemonic requirements may be satisfied by an 
initial substring or head of the 'id' string.

The 'name' attribute is a data-field name scoped to the form and is not subject
to such unique requirements.  If you want to offer multiple controls controlling
the same data item, then the 'name' repeats.

The "unique in page" requirement on 'id' is why it bothers me to have people give 
code examples with the 'name' and 'id' set the same.

There is a special case of the anchor element workaround.  The 'name' on the
'a' element and the 'map' element is a totally different thing from the 'name'
attribute on 'input.'  

In the case of 'a' and 'map' the 'name' should be in the unique-looking form 
to match the 'id,' not both the same pure simple mnemonic.

That was the idea, anyway.  You may be thinking that all 'id' attributes in 
a page are set manually and that the set of them is therefore maintained 
by the designer and can be manually given values that are both unique and
pure mnemonic.  I was allowing for a mixed maintenance mode for the 'id' 
vocabulary where the author is allowed to manually adjust the 'id' string to
inject a mnemonic initial substring while the author tool also adjusts the string,
appending enough stuff to ensure uniqueness without destroying the 
recognizability of the initial mnemonic substring.

Al

>Randal

Received on Wednesday, 24 July 2002 11:19:18 UTC