It is currently Mon May 20, 2013 10:33 pm Advanced search

Overflow elements and JavaScript event attributes

Do you think the HTML spec should do something differently? You can discuss spec feedback here, but you should send it to the WHATWG mailing list or file a bug in the W3C bugzilla for it to be considered.

Overflow elements and JavaScript event attributes

Postby JAB Creations » Mon Sep 29, 2008 2:29 pm

A sore oversight in HTML4 and XHTML1 is the absence of validity of JavaScript event attributes on block level elements (mainly divisible elements) that browsers give keyboard focus to in order to scroll the content of the overflow element.

I haven't checked the HTML5 spec though has this issue been addressed or not? Visit my site and only make use of the tab and enter keys while navigating my website without using your mouse whatsoever in example.
User avatar
JAB Creations
<aside>
 
Posts: 529
Joined: Tue Mar 13, 2007 4:48 am
Location: Sarasota Florida, USA

Postby anne » Tue Sep 30, 2008 1:16 pm

Event handler attributes are allowed on all elements.
User avatar
anne
<h4>
 
Posts: 32
Joined: Tue Feb 06, 2007 11:17 pm
Location: Utrecht, NL

Postby JAB Creations » Tue Sep 30, 2008 3:26 pm

So then this should be considered valid?

Code: Select all
<span onfocus="do_something();">stuff</span>
User avatar
JAB Creations
<aside>
 
Posts: 529
Joined: Tue Mar 13, 2007 4:48 am
Location: Sarasota Florida, USA

Postby zcorpan » Thu Oct 02, 2008 5:22 pm

Yes but it won't do anything because spans by default don't receive focus. You can make it focusable with tabindex='0' though.
User avatar
zcorpan
<article>
 
Posts: 795
Joined: Tue Feb 06, 2007 8:29 pm
Location: Sweden


Return to Feedback on the Specs

Who is online

Users browsing this forum: No registered users and 0 guests

cron