Re: [whatwg] Question: rel=help

2012-01-26 Thread Ian Hickson
On Thu, 29 Sep 2011, Schalk Neethling wrote:
 
 Question, would an element with rel=help and a title=Help text make 
 sense and be valid as a JavaScript hook for tooltips?
 
 Does not match the usage as described by the WHAT-WG 
 (http://developers.whatwg.org/links.html#link-type-help) exactly, but 
 close enough?

On Thu, 29 Sep 2011, Anne van Kesteren wrote:
 
 If there is no actual hyperlink, using a link relation does not make 
 sense.

Indeed.


On Thu, 29 Sep 2011, Schalk Neethling wrote:
 
 I heard some mention of using the data-* attributes so, something like: 
 a href= data-tooltip=Some help text/a
 
 or
 
 input type=text data-tooltip=Some help text /
 
 Would you agree that this is the better option?

If what you want is a tooltip, then the title= attribute is probably 
your best bet. No need for any scripting.

-- 
Ian Hickson   U+1047E)\._.,--,'``.fL
http://ln.hixie.ch/   U+263A/,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'


Re: [whatwg] Question: rel=help

2011-09-30 Thread Jukka K. Korpela

29.9.2011 21:52, Tantek Çelik wrote:


On Thu, Sep 29, 2011 at 11:12, Jukka K. Korpelajkorp...@cs.tut.fi  wrote:

29.9.2011 20:50, Tantek Çelik wrote:


Javascript-only help text (tooltip or otherwise) or any other content
intended for human consumption is a really bad idea for all the usual
reasons
(#a11y, mobile, search etc.)


Except in cases where the information is relevant only when JavaScript is
enabled.


That's a reasonable theory. Do you have URLs to any real world examples?


For example, various virtual keyboard pages use such techniques. Say,
http://www.virtualkeyboard.ws has buttons for entering characters, with 
mouseover events that show information about the key.



Question, would an element with rel=help and a title=Help text
make sense and be valid as a JavaScript hook for tooltips?


Realizing that this example markup was ambiguous - that is:

Does the string Help text represent a hypothetical placeholder on a
span or div etc.?

Or is that markup part of a hyperlink that links to a separate help
document? E.g.
a rel=help title=Help text href=help.html(?)/a


I assumed the latter. At least it makes sense. And it would make sense, 
in my opinion, to have JavaScript code that displays the string in the 
title attribute. The reason is that although graphic browsers generally 
display that value on mouseover by default, the implementations have 
oddities that reduce usability: the tooltip text is in a 
system-dependent font (cannot be styled by the author, cannot be 
modified by the user except via system settings), and it may disappear 
after some seconds.



But there are situations where you
expect 80% of people do well without any instructions.


Again, seems like a reasonable theory.

Do you have URLs to real world examples thereof?


Say, http://forums.whatwg.org/bb3/ucp.php?mode=register looks like a 
sure case. Or did you mean a form that additionally may have a problem 
for 20% of people or less? I guess _every_ form has some potential 
problem to _some_ people. The form cited has a Confirmation of 
registration question. I would expect well over 80% of users to be able 
to answer it without difficulties, but I'm afraid there's a 
non-ignorable amount of people who might get puzzled by it.



I'm not sure of what
we are expected to do, as authors, in order to give instructions that might
be needed by 20% of users but would mostly be a distraction for the
majority.


Theoretical problems are harder to provide specific answers for, but
this might work:

Try the details  and summary  elements.


I don't think the problem is theoretical (although it was formulated in 
general terms - as this seems natural in a discussion like this). The 
answer is, as there is no support worth mentioning yet.



http://html5doctor.com/the-details-and-summary-elements/


So you have some URLs to real world examples? :-)

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


[whatwg] Question: rel=help

2011-09-29 Thread Schalk Neethling

Hi there everyone,

Question, would an element with rel=help and a title=Help text make 
sense and be valid as a JavaScript hook for tooltips?


Does not match the usage as described by the WHAT-WG 
(http://developers.whatwg.org/links.html#link-type-help) exactly, but 
close enough?


--
Kind Regards,
Schalk Neethling
Mozilla Corporation


Re: [whatwg] Question: rel=help

2011-09-29 Thread Anne van Kesteren
On Thu, 29 Sep 2011 16:35:33 +0200, Schalk Neethling  
sneethl...@mozilla.com wrote:
Question, would an element with rel=help and a title=Help text make  
sense and be valid as a JavaScript hook for tooltips?


Does not match the usage as described by the WHAT-WG  
(http://developers.whatwg.org/links.html#link-type-help) exactly, but  
close enough?


If there is no actual hyperlink, using a link relation does not make sense.


--
Anne van Kesteren
http://annevankesteren.nl/


Re: [whatwg] Question: rel=help

2011-09-29 Thread Schalk Neethling

Hi Anna,

I heard some mention of using the data-* attributes so, something like:
a href= data-tooltip=Some help text/a

or

input type=text data-tooltip=Some help text /

Would you agree that this is the better option?

On 29/09/2011 16:50, Anne van Kesteren wrote:

On Thu, 29 Sep 2011 16:35:33 +0200, Schalk Neethling
sneethl...@mozilla.com wrote:

Question, would an element with rel=help and a title=Help text
make sense and be valid as a JavaScript hook for tooltips?

Does not match the usage as described by the WHAT-WG
(http://developers.whatwg.org/links.html#link-type-help) exactly, but
close enough?


If there is no actual hyperlink, using a link relation does not make sense.




--
Kind Regards,
Schalk Neethling
Mozilla Corporation


Re: [whatwg] Question: rel=help

2011-09-29 Thread Jukka K. Korpela

29.9.2011 20:34, Schalk Neethling wrote:


I heard some mention of using the data-* attributes so, something like:
a href= data-tooltip=Some help text/a


The data-* attributes are supposed to be strictly private, so they are 
the last resort.


This all depends on what is going on, which was not disclosed
in the original question. The use of rel=help is for most practical
purposes just an idle attribute (few user agents pay any attention to 
it). But the title attribute is used, so the questions are: What would
you like to happen when JavaScript is disabled? Is it OK to search 
engines to treat the title=... attribute value as actually relating to 
the link?


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


Re: [whatwg] Question: rel=help

2011-09-29 Thread Tantek Çelik
Schalk,

Javascript-only help text (tooltip or otherwise) or any other content intended 
for human consumption is a really bad idea for all the usual reasons (#a11y, 
mobile, search etc.)

Consider adjusting your content design to incorporate the help text instead 
(perhaps with either the respective element's title attribute or with a 
nearby/adjacent element) so that it is available without JS, and then if you 
wish to do fancy tooltip effects feel free to provide them with JS (progressive 
enhancement) which re-uses that content from the page.

Thanks,

Tantek

-Original Message-
From: Schalk Neethling sneethl...@mozilla.com
Sender: whatwg-boun...@lists.whatwg.org
Date: Thu, 29 Sep 2011 19:34:40 
To: Anne van Kesterenann...@opera.com
Reply-To: sneethl...@mozilla.com
Cc: whatwg@lists.whatwg.org
Subject: Re: [whatwg] Question: rel=help

Hi Anna,

I heard some mention of using the data-* attributes so, something like:
a href= data-tooltip=Some help text/a

or

input type=text data-tooltip=Some help text /

Would you agree that this is the better option?

On 29/09/2011 16:50, Anne van Kesteren wrote:
 On Thu, 29 Sep 2011 16:35:33 +0200, Schalk Neethling
 sneethl...@mozilla.com wrote:
 Question, would an element with rel=help and a title=Help text
 make sense and be valid as a JavaScript hook for tooltips?

 Does not match the usage as described by the WHAT-WG
 (http://developers.whatwg.org/links.html#link-type-help) exactly, but
 close enough?

 If there is no actual hyperlink, using a link relation does not make sense.



-- 
Kind Regards,
Schalk Neethling
Mozilla Corporation


Re: [whatwg] Question: rel=help

2011-09-29 Thread Jukka K. Korpela

29.9.2011 20:50, Tantek Çelik wrote:


Javascript-only help text (tooltip or otherwise) or any other content
 intended for human consumption is a really bad idea for all the usual 
reasons

 (#a11y, mobile, search etc.)

Except in cases where the information is relevant only when JavaScript 
is enabled. But the original question did not imply, as far as I can 
see, any JavaScript-only idea. On the contrary, using the title=... 
attribute implies that the text will be available to many people graphic 
browsers (though perhaps just by accident) and to many people using 
speech-based browsing.



Consider adjusting your content design to incorporate the help text instead
(perhaps with either the respective element's title attribute or with

 a nearby/adjacent element)

I think that idea was implied in the question:


Question, would an element with rel=help and a title=Help text
make sense and be valid as a JavaScript hook for tooltips?


I stll think it's best, for all users, to give instructions in normal 
text before the fields to be filled out. But there are situations where 
you expect 80% of people do well without any instructions. I'm not sure 
of what we are expected to do, as authors, in order to give instructions 
that might be needed by 20% of users but would mostly be a distraction 
for the majority.


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


Re: [whatwg] Question: rel=help

2011-09-29 Thread Tantek Çelik
On Thu, Sep 29, 2011 at 11:12, Jukka K. Korpela jkorp...@cs.tut.fi wrote:
 29.9.2011 20:50, Tantek Çelik wrote:

 Javascript-only help text (tooltip or otherwise) or any other content

 intended for human consumption is a really bad idea for all the usual
 reasons
 (#a11y, mobile, search etc.)

 Except in cases where the information is relevant only when JavaScript is
 enabled.

That's a reasonable theory. Do you have URLs to any real world examples?


 But the original question did not imply, as far as I can see, any
 JavaScript-only idea. On the contrary, using the title=... attribute
 implies that the text will be available to many people graphic browsers
 (though perhaps just by accident) and to many people using speech-based
 browsing.

Agreed.


 Consider adjusting your content design to incorporate the help text
 instead
 (perhaps with either the respective element's title attribute or with

 a nearby/adjacent element)

 I think that idea was implied in the question:

 Question, would an element with rel=help and a title=Help text
 make sense and be valid as a JavaScript hook for tooltips?

Realizing that this example markup was ambiguous - that is:

Does the string Help text represent a hypothetical placeholder on a
span or div etc.?

Or is that markup part of a hyperlink that links to a separate help
document? E.g.
a rel=help title=Help text href=help.html(?)/a


 I stll think it's best, for all users, to give instructions in normal text
 before the fields to be filled out.

Agreed.


 But there are situations where you
 expect 80% of people do well without any instructions.

Again, seems like a reasonable theory.

Do you have URLs to real world examples thereof?


 I'm not sure of what
 we are expected to do, as authors, in order to give instructions that might
 be needed by 20% of users but would mostly be a distraction for the
 majority.

Theoretical problems are harder to provide specific answers for, but
this might work:

Try the details and summary elements.

http://html5doctor.com/the-details-and-summary-elements/

Thanks,

Tantek

-- 
http://tantek.com/ - I made an HTML5 tutorial! http://tantek.com/html5