with the standard HTML attribute
accesskey
allows keyboard shortcuts (shortcuts) to define with whom you can set the input focus to the associated input elements: \u0026lt;label for = "last_name" accesskey = " n "> Name: \u0026lt;/ label>Which key combination is set, the focus is browser-and system-dependent. The above code to enable the IE / Win with Alt + N, in Firefox / Win with Shift + Alt + N, in Firefox / Mac, Ctrl + N, in Safari / Mac, Ctrl + Alt + N. ..
\u0026lt;input id = "last_name" type = "text">
course, one should also show the user that keyboard shortcuts are available. Man, this information can still write once statically in the HTML source code (in addition to
accesskey attribute). With a simple CSS2 rule, but can do without such redundant information and allow the shortcut label at all
represent elements for which accesskey
label [accesskey]: after {
content: is set "[" attr (accesskey) "]";
text-transform: uppercase;
color: # 999999;
font-size: x-small;
} The CSS rule is based primarily on a single attribute selector and a pseudo-element . This is according to (
: after
) each label
element in which the accesskey
attribute is present, the value of the attribute in upper case ( uppercase
) in the document content ( content
) added: these techniques are On quite old, the appropriate standards were formally adopted years ago (the HTML 4.01 specification is more than 10 years, CSS 2 as well). What makes this issue again today?
Google recently announced , from 1 March this year, older browser versions and in particular the Internet Explorer 6 (IE6) to no longer support in its Web applications. This
- actually long overdue - step should also move to other suppliers, newer versions of IE (or alternatives such as Firefox ) assumed. And it could finally IE users of Web standards such as the attribute selectors That benefit the IE6 unfortunately ignored for years.
0 comments:
Post a Comment