W3C home > Mailing lists > Public > www-svg@w3.org > June 2010

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

From: Jonathan Chetwynd <j.chetwynd@btinternet.com>
Date: Thu, 24 Jun 2010 11:01:51 +0100
Message-Id: <48FCCADA-8DBC-4E34-B771-05525D746486@btinternet.com>
To: www-svg <www-svg@w3.org>
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 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:45 GMT