HTML5 autofocus with JavaScript fallback