Should an element with display="none" take focus?

Should an element with display="none" take focus?

It had been my assumption that whether using script to  
addEventListener or as in the
the attached testcase, if display is set to none then the  element  
should not be focusable.

is this correct?

To test, open the file in a recent build of Opera and use tabkey to  
navigate.

when tested against recent builds of Opera, both events fire, filed as  
bug:
filed as DSK-303529@bugs.opera.com
after more than a decade one might  have hoped that more than one UA  
had an implementation  for focus.

regards

Jonathan Chetwynd

<?xml version="1.0" encoding="utf-8" standalone="no"?>
<svg xmlns="http://www.w3.org/2000/svg" version="1.2" baseProfile="tiny"
    xmlns:xlink="http://www.w3.org/1999/xlink"
    width="100%"
    height="100%"
 >

<title>Should an element with display="none" take focus?</title>


<rect x="34" y="86" width="132" height="16"  display="none"   
onfocusin="alert('value of display is none')" />
<rect x="34" y="40" width="132" height="16" pointer-events="fill"  
fill="#ded"  onfocusin="alert('value of display is inline')" />

<script type="text/ecmascript" />

</svg>

Received on Thursday, 24 June 2010 10:01:55 UTC