This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
If we have: <html> <body> <iframe src="somewhere"></iframe> <input autofocus> </body> </html> If the user is interacting with the iframe before the autofocus event is called for the input, the input shouldn't be focus. In other words, when the focused document is a sub-document, if an element from the parent document wants to focus via autofocus it shouldn't have it.
The spec already defines: "User agents may ignore this attribute if the user has indicated (for example, by starting to type in a form control) that he does not wish focus to be changed." What you're asking for is already permitted. It does not matter whether the user is interacting with another control in the same document, a document in another frame or a control on the browser chrome. The UA may ignore the autofocus in any or all of those cases.