- From: <bugzilla@jessica.w3.org>
- Date: Wed, 03 Sep 2014 18:20:35 +0000
- To: public-html-admin@w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=26725 Bug ID: 26725 Summary: make element.focus() consider body element's focusable state for improved real-world interop Product: HTML WG Version: unspecified Hardware: PC OS: Windows NT Status: NEW Severity: normal Priority: P2 Component: HTML5 spec Assignee: dave.null@w3.org Reporter: travil@microsoft.com QA Contact: public-html-bugzilla@w3.org CC: mike@w3.org, public-html-admin@w3.org, public-html-wg-issue-tracking@w3.org Created attachment 1508 --> https://www.w3.org/Bugs/Public/attachment.cgi?id=1508&action=edit Example showing the expectations of the new behavior; this is the primary repro file. A few months ago, IE made a platform change to improve our Mobile interop to match a webkit behavior which a variety of sites required in order to display properly. The change involved the behavior of focusing the body element. IE [previously], Firefox, and the spec all define the behavior that when element.focus() is called on the body element, it forwards the focus command on to the window which causes the viewport to be in a focused state (this scenario is usually done from a parent browsing context calling focus() on the body element of a child browsing context). However, in Webkit-based browsers, the ability of the body/viewport to accept focus is conditional on whether the body element can actually accept focus (e.g., if the body element has a valid tabindex attribute set). So, in a webkit-based browser and now in IE (on mobile, soon to come to desktop) unless the body element is focusable the call to focus() the body will do nothing. I recommend updating the spec to contain this condition in order to better match an interoperable pattern that many [mobile] sites expect. The change would be from: > Section: Focus management APIs > element . focus() > Moves the focus to the element. > If the element is the body element, moves the focus to the viewport instead. to: > Section: Focus management APIs > element . focus() > Moves the focus to the element. > If the element is the body element, and the body element is focusable, moves the focus to the viewport instead. Otherwise, does nothing. (and update the relevant details in the algorithm for the "focusing steps") -- You are receiving this mail because: You are on the CC list for the bug.
Received on Wednesday, 3 September 2014 18:20:37 UTC