[Bug 14373] New: 8.1 The hidden attribute Ready for first implementations Tests: 1 — View... Latest Internet Explorer beta: unknownLatest Firefox trunk nightly build: unknownLatest WebKit or Chromium trunk build: unknownLatest Opera beta or preview build: unknownJavaSc

http://www.w3.org/Bugs/Public/show_bug.cgi?id=14373

           Summary: 8.1 The hidden attribute  Ready for first
                    implementations Tests: 1 — View... Latest Internet
                    Explorer beta: unknownLatest Firefox trunk nightly
                    build: unknownLatest WebKit or Chromium trunk build:
                    unknownLatest Opera beta or preview build:
                    unknownJavaSc
           Product: HTML WG
           Version: unspecified
          Platform: Other
               URL: http://www.whatwg.org/specs/web-apps/current-work/#con
                    tenteditable
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P3
         Component: HTML5 spec (editor: Ian Hickson)
        AssignedTo: ian@hixie.ch
        ReportedBy: contributor@whatwg.org
         QAContact: public-html-bugzilla@w3.org
                CC: mike@w3.org, public-html-wg-issue-tracking@w3.org,
                    public-html@w3.org


Specification:
http://www.whatwg.org/specs/web-apps/current-work/multipage/editing.html
Multipage: http://www.whatwg.org/C#contenteditable
Complete: http://www.whatwg.org/c#contenteditable

Comment:
 8.1 The hidden attribute  Ready for first implementations Tests: 1 —
View... Latest Internet Explorer beta: unknownLatest Firefox trunk nightly
build: unknownLatest WebKit or Chromium trunk build: unknownLatest Opera beta
or preview build: unknownJavaScript libraries, plugins, etc: unknown
2010-01-28 Ms2ger All HTML elements may have the hidden content attribute set.
The hidden attribute is a boolean attribute. When specified on an element, it
indicates that the element is not yet, or is no longer, relevant. User agents
should not render elements that have the hidden attribute specified.  In the
following skeletal example, the attribute is used to hide the Web game's main
screen until the user logs in:      <h1>The Example Game</h1>   <section
id="login">    <h2>Login</h2>     <form>     ...     <!-- calls login() once
the user's credentials have been checked -->    </form>    <script>    
function login() {     // switch screens    
document.getElementById('login').hidden = true;      
document.getElementById('game').hidden = false;     }     </script>  
</section>   <section id="game" hidden>    ...     </section> The hidden
attribute must not be used to hide content that could legitimately be shown in
another presentation. For example, it is incorrect to use hidden to hide
panels in a tabbed dialog, because the tabbed interface is merely a kind of
overflow presentation — one could equally well just show all the form
controls in one big page with a scrollbar. It is similarly incorrect to use
this attribute to hide content just from one presentation — if something is
marked hidden, it is hidden from all presentations, including, for instance,
screen readers.  Elements that are not hidden should not link to or refer to
elements that are hidden.  For example, it would be incorrect to use the href
attribute to link to a section marked with the hidden attribute. If the
content is not applicable or relevant, then there is no reason to link to it. 
It would similarly be incorrect to use the ARIA aria-describedby attribute to
refer to descriptions that are themselves hidden. Hiding a section means that
it is not applicable or relevant to anyone at the current time, so clearly it
cannot be a valid description of content the user can interact with.  Elements
in a section hidden by the hidden attribute are still active, e.g. scripts and
form controls in such sections still execute and submit respectively. Only
their presentation to the user changes.  The hidden IDL attribute must reflect
the content attribute of the same name.  8.2 Activation  Ready for first
implementations Latest Internet Explorer beta: complete but buggy
supportLatest Firefox trunk nightly build: complete but buggy supportLatest
WebKit or Chromium trunk build: complete but buggy supportLatest Opera beta or
preview build: complete but buggy supportJavaScript libraries, plugins, etc:
unknown 2009-10-23 Hixie element . click() Acts as if the element was clicked.
 Each element has a click in progress flag, initially set to false.  The
click() method must run these steps:  If the element's click in progress flag
is set to true, then abort these steps.  Set the click in progress flag on the
element to true.  If the element has a defined activation behavior, run
synthetic click activation steps on the element. Otherwise, fire a click event
at the element.  Set the click in progress flag on the element to false.  8.3
Focus  Ready for first implementations Latest Internet Explorer beta: complete
but buggy supportLatest Firefox trunk nightly build: complete but buggy
supportLatest WebKit or Chromium trunk build: complete but buggy supportLatest
Opera beta or preview build: complete but buggy supportJavaScript libraries,
plugins, etc: unknown 2009-10-23 Hixie When an element is focused, key events
received by the document must be targeted at that element. There may be no
element focused; when no element is focused, key events received by the
document must be targeted at the body element.    User agents may track focus
for each browsing context or Document individually, or may support only one
focused element per top-level browsing context — user agents should follow
platform conventions in this regard.  Which elements within a top-level
browsing context currently have focus must be independent of whether or not
the top-level browsing context itself has the system focus.  When an element
is focused, the element matches the CSS :focus pseudo-class.  8.3.1 Sequential
focus navigation and the tabindex attribute  The tabindex content attribute
specifies whether the element is focusable, whether it can be reached using
sequential focus navigation, and the relative order of the element for the
purposes of sequential focus navigation. The name "tab index" comes from the
common use of the "tab" key to navigate through the focusable elements. The
term "tabbing" refers to moving forward through the focusable elements that
can be reached using sequential focus navigation.  The tabindex attribute, if
specified, must have a value that is a valid integer.  If the attribute is
specified, it must be parsed using the rules for parsing integers. The
attribute's values have the following meanings:  If the attribute is omitted
or parsing the value returns an error The user agent should follow platform
conventions to determine if the element is to be focusable and, if so, whether
the element can be reached using sequential focus navigation, and if so, what
its relative order should be.  If the value is a negative integer The user
agent must allow the element to be focused, but should not allow the element
to be reached using sequential focus navigation.  If the value is a zero The
user agent must allow the element to be focused, should allow the element to
be reached using sequential focus navigation, and should follow platform
conventions to determine the element's relative order.    If the value is
greater than zero The user agent must allow the element to be focused, should
allow the element to be reached using sequential focus navigation, and should
place the element in the sequential focus navigation order so that it is: 
before any focusable element whose tabindex attribute has been omitted or
whose value, when parsed, returns an error, before any focusable element whose
tabindex attribute has a value equal to or less than zero, after any element
whose tabindex attribute has a value greater than zero but less than the value
of the tabindex attribute on the element, after any element whose tabindex
attribute has a value equal to the value of the tabindex attribute on the
element but that is earlier in the document in tree order than the element,
before any element whose tabindex attribute has a value equal to the value of
the tabindex attribute on the element but that is later in the document in
tree order than the element, and before any element whose tabindex attribute
has a value greater than the value of the tabindex attribute on the element.
An element is specially focusable if the tabindex attribute's definition above
defines the element to be focusable.  An element that is specially focusable
but does not otherwise have an activation behavior defined has an activation
behavior that does nothing.  This means that an element that is only focusable
because of its tabindex attribute will fire a click event in response to a
non-mouse activation (e.g. hitting the "enter" key while the element is
focused).  The tabIndex IDL attribute must reflect the value of the tabindex
content attribute. Its default value is 0 for elements that are focusable and
−1 for elements that are not focusable.  8.3.2 Focus management  Ready for
first implementations Latest Internet Explorer beta: unknownLatest Firefox
trunk nightly build: unknownLatest WebKit or Chromium trunk build:
unknownLatest Opera beta or preview build: unknownJavaScript libraries,
plugins, etc: unknown 2009-10-23 Hixie An element is focusable if the user
agent's default behavior allows it to be focusable or if the element is
specially focusable, but only if the element is either being rendered or is a
descendant of a canvas element that represents embedded content.  User agents
should make the following elements focusable, unless platform conventions
dictate otherwise:  a elements that have an href attribute link elements that
have an href attribute button elements that are not disabled input elements
whose type attribute are not in the Hidden state and that are not disabled
select elements that are not disabled textarea elements that are not disabled
command elements that do not have a disabled attribute Elements with a
draggable attribute set, if that would enable the user agent to allow the user
to begin a drag operations for those elements without the use of a pointing
device Editing hosts In addition, each shape that is generated for an area
element should be focusable, unless platform conventions dictate otherwise. (A
single area element can correspond to multiple shapes, since image maps can be
reused with multiple images on a page.)  The user agent may also make part of
a details element's rendering focusable, to enable the element to be opened or
closed using keyboard input. However, this is distinct from the details or
summary element being focusable.  The focusing steps are as follows:  If the
element is not in a Document, or if the element's Document has no browsing
context, or if the element's Document's browsing context has no top-level
browsing context, then abort these steps.  If focusing the element will remove
the focus from another element, then run the unfocusing steps for that
element.  Make the element the currently focused element in its top-level
browsing context.  Some elements, most notably area, can correspond to more
than one distinct focusable area. If a particular area was indicated when the
element was focused, then that is the area that must get focus; otherwise,
e.g. when using the focus() method, the first such region in tree order is the
one that must be focused.  The user agent may apply relevant platform-specific
conventions for focusing widgets.  For example, some platforms select the
contents of a text field when that field is focused.  Fire a simple event
named focus at the element.  User agents must synchronously run the focusing
steps for an element whenever the user moves the focus to a focusable element.
 The unfocusing steps are as follows:  If the element is an input element, and
the change event applies to the element, and the element does not have a
defined activation behavior, and the user has changed the element's value or
its list of selected files while the control was focused without committing
that change, then fire a simple event that bubbles named change at the
element.  Unfocus the element.    Fire a simple event named blur at the
element.
 When an element that is focused stops being a focusable element, or stops
being focused without another element being explicitly focused in its stead,
the user agent should synchronously run the focusing steps for the body
element, if there is one; if there is not, then the user agent should
synchronously run the unfocusing steps for the affected element only.  For
example, this might happen because the element is removed from its Document,
or has a hidden attribute added. It would also happen to an input element when
the element gets disabled.  8.3.3 Document-level focus APIs  Ready for first
implementations Latest Internet Explorer beta: unknownLatest Firefox trunk
nightly build: unknownLatest WebKit or Chromium trunk build: unknownLatest
Opera beta or preview build: unknownJavaScript libraries, plugins, etc:
unknown 2009-10-23 Hixie document . activeElement Returns the currently
focused element.  document . hasFocus() Returns true if the document has
focus; otherwise, returns false.  window . focus() Focuses the window. Use of
this method is discouraged. Allow the user to control window focus instead. 
window . blur() Unfocuses the window. Use of this method is discouraged. Allow
the user to control window focus instead.  The activeElement attribute on
HTMLDocument objects must return the element in the document that is focused.
If no element in the Document is focused, this must return the body element. 
The hasFocus() method on HTMLDocument objects must return true if the
Document's browsing context is focused, and all its ancestor browsing contexts
are also focused, and the top-level browsing context has the system focus. If
the Document has no browsing context or if its browsing context has no
top-level browsing context, then the method will always return false.  The
focus() method on the Window object, when invoked, provides a hint to the user
agent that the script believes the user might be interested in the contents of
the browsing context of the Window object on which the method was invoked. 
User agents are encouraged to have this focus() method trigger some kind of
notification.  The blur() method on the Window object, when invoked, provides
a hint to the user agent that the script believes the user probably is not
currently interested in the contents of the browsing context of the Window
object on which the method was invoked, but that the contents might become
interesting again in the future.  User agents are encouraged to ignore calls
to this blur() method entirely.  Historically the focus() and blur() methods
actually affected the system focus, but hostile sites widely abuse this
behavior to the user's detriment.  8.3.4 Element-level focus APIs  Ready for
first implementations Latest Internet Explorer beta: unknownLatest Firefox
trunk nightly build: unknownLatest WebKit or Chromium trunk build:
unknownLatest Opera beta or preview build: unknownJavaScript libraries,
plugins, etc: unknown 2009-10-23 Hixie element . focus() Focuses the element. 
element . blur() Unfocuses the element. Use of this method is discouraged.
Focus another element instead.    Do not use this method to hide the focus ring
if you find the focus ring unsightly. Instead, use a CSS rule to override the
'outline' property. (Be aware, however, that this makes the page significantly
less usable for some people, especially those with reduced vision who use
focus outlines to help them navigate the page.)  For example, to hide the
outline from links, you could use:  :link:focus, :visited:focus { outline:
none; } The focus() method, when invoked, must run the following algorithm: 
If the element is marked as locked for focus, then abort these steps.  If the
element is not focusable, then abort these steps.  Mark the element as locked
for focus.  If the element is not already focused, run the focusing steps for
the element.  Unmark the element as locked for focus.  The blur() method, when
invoked, should run the focusing steps for the body element, if there is one;
if there is not, then it should run the unfocusing steps for the element on
which the method was called instead. User agents may selectively or uniformly
ignore calls to this method for usability reasons.  For example, if the blur()
method is unwisely being used to remove the focus ring for aesthetics reasons,
the page would become unusable by keyboard users. Ignoring calls to this
method would thus allow keyboard users to interact with the page.  8.4
Assigning keyboard shortcuts  8.4.1 Introduction  Awaiting implementation
feedback Latest Internet Explorer beta: unknownLatest Firefox trunk nightly
build: unknownLatest WebKit or Chromium trunk build: unknownLatest Opera beta
or preview build: unknownJavaScript libraries, plugins, etc: unknown
2011-09-08 Hixie This section is non-normative.  Each element that can be
activated or focused can be assigned a single key combination to activate it,
using the accesskey attribute.    The exact shortcut is determined by the user
agent, based on information about the user's keyboard, what keyboard shortcuts
already exist on the platform, and what other shortcuts have been specified on
the page, using the information provided in the accesskey attribute as a
guide.    In order to ensure that a relevant keyboard shortcut is available on
a
wide variety of input devices, the author can provide a number of alternatives
in the accesskey attribute.  Each alternative consists of a single character,
such as a letter or digit.  User agents can provide users with a list of the
keyboard shortcuts, but authors are encouraged to do so also. The
accessKeyLabel IDL attribute returns a string representing the actual key
combination assigned by the user agent.  8.4.2 The accesskey attribute    Ready
for first implementations Latest Internet Explorer beta: incomplete
supportLatest Firefox trunk nightly build: incomplete supportLatest WebKit or
Chromium trunk build: unknownLatest Opera beta or preview build: incomplete
supportJavaScript libraries, plugins, etc: unknown 2009-10-23 Hixie All HTML
elements may have the accesskey content attribute set. The accesskey
attribute's value is used by the user agent as a guide for creating a keyboard
shortcut that activates or focuses the element.  If specified, the value must
be an ordered set of unique space-separated tokens that are case-sensitive,
each of which must be exactly one Unicode code point in length.  In the
following example, a variety of links are given with access keys so that
keyboard users familiar with the site can more quickly navigate to the
relevant pages:  <nav>    <p>   <a title="Consortium Activities" accesskey="A"
href="/Consortium/activities">Activities</a> |     <a title="Technical Reports
and Recommendations" accesskey="T" href="/TR/">Technical Reports</a> |     <a
title="Alphabetical Site Index" accesskey="S"
href="/Consortium/siteindex">Site Index</a> |    <a title="About This Site"
accesskey="B" href="/Consortium/">About Consortium</a> |   <a title="Contact
Consortium" accesskey="C" href="/Consortium/contact">Contact</a>  </p> </nav>
In the following example, the search field is given two possible access keys,
"s" and "0" (in that order). A user agent on a device with a full keyboard
might pick Ctrl+Alt+S as the shortcut key, while a user agent on a small
device with just a numeric keypad might pick just the plain unadorned key 0: 
<form action="/search">  <label>Search: <input type="search" name="q"
accesskey="s 0"></label>  <input type="submit"> </form> In the following
example, a button has possible access keys described. A script then tries to
update the button's label to advertise the key combination the user agent
selected.  <input type=submit accesskey="N @ 1" value="Compose"> ... <script> 
function labelButton(button) {      if (button.accessKeyLabel)     
button.value
+= ' (' + button.accessKeyLabel + ')';    }  var inputs =
document.getElementsByTagName('input');  for (var i = 0; i < inputs.length; i
+= 1) {    if (inputs[i].type == "submit")    labelButton(inputs[i]);  }
</script> On one user agent, the button's label might become "Compose (⌘N)".
On another, it might become "Compose (Alt+⇧+1)". If the user agent doesn't
assign a key, it will be just "Compose". The exact string depends on what the
assigned access key is, and on how the user agent represents that key
combination.  8.4.3 Processing model  Ready for first implementations Latest
Internet Explorer beta: unknownLatest Firefox trunk nightly build:
unknownLatest WebKit or Chromium trunk build: unknownLatest Opera beta or
preview build: unknownJavaScript libraries, plugins, etc: unknown 2011-09-08
Hixie An element's assigned access key is a key combination derived from the
element's accesskey content attribute. Initially, an element must not have an
assigned access key.  Whenever an element's accesskey attribute is set,
changed, or removed, the user agent must update the element's assigned access
key by running the following steps:  If the element has no accesskey
attribute, then skip to the fallback step below.  Otherwise, split the
attribute's value on spaces, and let keys be the resulting tokens.  For each
value in keys in turn, in the order the tokens appeared in the attribute's
value, run the following substeps:  If the value is not a string exactly one
Unicode code point in length, then skip the remainder of these steps for this
value.    If the value does not correspond to a key on the system's keyboard,
then skip the remainder of these steps for this value.    If the user agent can
find a mix of zero or more modifier keys that, combined with the key that
corresponds to the value given in the attribute, can be used as the access
key, then the user agent may assign that combination of keys as the element's
assigned access key and abort these steps.  Fallback: Optionally, the user
agent may assign a key combination of its choosing as the element's assigned
access key and then abort these steps.    If this step is reached, the element
has no assigned access key.  Once a user agent has selected and assigned an
access key for an element, the user agent should not change the element's
assigned access key unless the accesskey content attribute is changed or the
element is moved to another Document.  When the user presses the key
combination corresponding to the assigned access key for an element, if the
element defines a command, the command's Hidden State facet is false
(visible), the command's Disabled State facet is also false (enabled), and the
element is in a Document, then the user agent must trigger the Action of the
command.  User agents might expose elements that have an accesskey attribute
in other ways as well, e.g. in a menu displayed in response to a specific key
combination.  The accessKey IDL attribute must reflect the accesskey content
attribute.  The accessKeyLabel IDL attribute must return a string that
represents the element's assigned access key, if any. If the element does not
have one, then the IDL attribute must return the empty string.    8.5 Editing 
8.5.1 Making document regions editable: The contenteditable content attribute 
Ready for first implementations Latest Internet Explorer beta: complete but
buggy supportLatest Firefox trunk nightly build: complete but buggy
supportLatest WebKit or Chromium trunk build: complete but buggy supportLatest
Opera beta or preview build: complete but buggy supportJavaScript libraries,
plugins, etc: unknown 2009-10-23 Hixie The contenteditable attribute is an
enumerated attribute whose keywords are the empty string, true, and false. The
empty string and the true keyword map to the true state. The false keyword
maps to the false state. In addition, there is a third state, the inherit
state, which is the missing value default (and the invalid value default). 
The true state indicates that the element is editable. The inherit state
indicates that the element is editable if its parent is. The false state
indicates that the element is not editable.  element . contentEditable [ =
value ] Returns "true", "false", or "inherit", based on the state of the
contenteditable attribute.  Can be set, to change that state.  Throws a
SyntaxError exception if the new value isn't one of those strings.  element .
isContentEditable Returns true if the element is editable; otherwise, returns
false.    The contentEditable IDL attribute, on getting, must return the string
"true" if the content attribute is set to the true state, "false" if the
content attribute is set to the false state, and "inherit" otherwise. On
setting, if the new value is an ASCII case-insensitive match for the string
"inherit" then the content attribute must be removed, if the new value is an
ASCII case-insensitive match for the string "true" then the content attribute
must be set to the string "true", if the new value is an ASCII
case-insensitive match for the string "false" then the content attribute must
be set to the string "false", and otherwise the attribute setter must throw a
SyntaxError exception.    The isContentEditable IDL attribute, on getting, must
return true if the element is either an editing host or editable, and false
otherwise.  8.5.2 Making entire documents editable: The de

Posted from: 98.244.90.121
User agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.2 (KHTML, like
Gecko) Chrome/15.0.874.58 Safari/535.2

-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

Received on Tuesday, 4 October 2011 03:45:59 UTC