Afficher un message
Vieux 16/04/2008, 13h54   #1
Lea GRIS
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut highlighting an accesskey

Hello,

Are there any generic and CSS standard mean of highlighting an accesskey?

I only fond a workaround by encapsulating the corresponding letter in a
<em></em> inside the label. But it is not applicable for a submit button
which label is not a content.

Here is en example:
<form method="get" action="http://example.com/cgi-bin/smokeping.cgi"
enctype="multipart/form-data" id="rangeform">
<fieldset><legend>Time range:</legend>
<label for="start"><em>F</em>rom:</label>
<input type="text" name="start" tabindex="1" value="2008-04-16
11:22" accesskey="f" id="start" />
<label for="end"><em>T</em>o:</label>
<input type="text" name="end" tabindex="2" value="now"
accesskey="t" id="end" />
<input type="hidden" name="target" value="World.Europe.France.IPv6" />
<input type="hidden" name="displaymode" value="n" />
<input type="submit" tabindex="3" name="Generate!"
value="Generate!" accesskey="g" />
</fieldset>
</form>

There would also exist another unsatisfying possibility with CSS:

input:before { content: attr(accesskey); }

But it would display the accesskey outside the label and before or after
the input field. Furthermore, there are few compatible browsers.

Regards,

--
Léa Gris
  Réponse avec citation
 
Page generated in 0,05381 seconds with 9 queries