I would like to submit a “tabindex” attribute in a navmenu structure. The default options do not allow me to do it.
Leave a Reply
You must be logged in to post a comment.
I would like to submit a “tabindex” attribute in a navmenu structure. The default options do not allow me to do it.
You must be logged in to post a comment.
You could write a custom walker to change the output of
wp_nav_menu()
. The walker should extend the functionstart_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 usetabindex
.