I am tasked with the problem of making sure, that the page can be navigated by keyboard - mainly using the tab-key. I was wondering if there is a module or a certain way in Drupal to archive this since using JS to set the tabindex seems to be a very ugly solution which potentially could create chaos and slow down the page immensely.

Any hints or pointers are more than welcome.

  • Using JavaScript wouldn't help with making the page accessible either...what elements do you specifically need to add a tab index to, and where/how are those elements generated?
    – Clive
    Jan 12, 2015 at 11:11
  • Basically the page is divided into four blocks. The menu and it's submenu (standard drupal menu), a content block (may contain links), a gallery (not important now) and another block with links in it. I need to jump through the menu, into the content block, to the block with the link in it. Can you elaborate how JS won't help? I was thinking about adding the tabindex-attribute with it. Jan 12, 2015 at 11:16
  • 1
    A fair proportion of people who need to make use of accessibility features won't have javascript available, so you'd be kind of fixing a problem for people who don't really need it while missing a lot of those who really do. Presumably you're doing this for some sort of section 508/DDA compliance, so it's probably not worth implementing half-measures. I'd recommend identifying the elements you need to add the attribute to, then working out how to alter each using theme hooks
    – Clive
    Jan 12, 2015 at 11:39
  • Didn't think about JavaScript not being available ;) But that is true. Alright, I'll reconsider my approach. Hooks seems to be the best way to do it. Thank you! Jan 12, 2015 at 11:43


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.