[Bug 28652] New: [Shadow] Need Document.deepActiveElement

https://www.w3.org/Bugs/Public/show_bug.cgi?id=28652

            Bug ID: 28652
           Summary: [Shadow] Need Document.deepActiveElement
           Product: WebAppsWG
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Component Model
          Assignee: dglazkov@chromium.org
          Reporter: kochi@google.com
        QA Contact: public-webapps-bugzilla@w3.org
                CC: mike@w3.org, public-webapps@w3.org

According to the current spec,
http://w3c.github.io/webcomponents/spec/shadow/#active-element
Document.activeElement returns "adjusted" element, i.e.
when the real focused element is within a shadow tree, it returns
the top-most shadow host in the Document treescope.

The real focused element can be retrieved by recursively applying
.activeElement against shadowRoots on the way, but it may be
convenient to have a way to directly retrieve the element from Document.

One use case is for accessibility plugins; when a web app is provided
as one custom element (e.g. <topeka-app> at
https://polymer-topeka.appspot.com/),
Document.activeElement always points to <topeka-app>,  which does not make
much sense for accessibility plugins.
It may be also necessary to have another type of event than "focus", which
fires when Document.activeElement changes.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Received on Monday, 18 May 2015 07:34:23 UTC