2

I would like to submit a "tabindex" attribute in a navmenu structure. The default options do not allow me to do it.

fuxia
  • 107,219
  • 39
  • 255
  • 462
user664457
  • 123
  • 1
  • 4

1 Answers1

1

You could write a custom walker to change the output of wp_nav_menu(). The walker should extend the function start_el() to add your attributes where you need them. Another option would be a filter on 'walker_nav_menu_start_el'.

But be aware that tabindex can make a page less accessible. If don’t have an urgent problem to solve do not use tabindex.

fuxia
  • 107,219
  • 39
  • 255
  • 462