Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

234
Vistas
is it possible to make the key "down" act like a "tab" for tabindexes

CONTEXT : Many <img tabindex="x" one under an other. When any user press tab: it "goes" to the next item, surround the item with blue border and the voice readers reads the alt text (or any tab behaviour...) [that's only an example].

WHAT I WANT : that when a user hit (on his keyboard) the key "down" => that it triggers the SAME behaviour as the tab = go to the next tabindex and read the alt text or what behaviour that a normal tab does.

NOTE : This question is NOT about the voice reading thing => it's ONLY to give an example of what a normal tabs does

WHAT I DON'T WANT : .focus() because it applies to inputs, here my tab index goes to the nest image.

WHAT I TRIED : without success (unless I misstype something)

$("html").keydown(function(e) {
    if (e.keyCode==40) {
      console.log("key down was pressed");
      document.dispatchEvent( new window.KeyboardEvent('keydown',  { key : 'Tab' }) );
    }
}

in this code the console.log gets triggered and I see "key down was pressed" but no tab was triggered.

Is there a way to do what I describe ?

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda