This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
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.
Moved to GitHub issue. https://github.com/w3c/webcomponents/issues/104