The browser support to the accept attribute is poor and buggy, and felgall is right anyway.
On the other hand, w3schools is not a very recommendable reference to solve this (or any other problem). You'd better rely on the Reference section of this site. And in this particular case the following page:
Just have a look at the compatibility and see that it is buggy in all the browsers.