Tab and modality fixes for the modal dialogs

This request fixes the tab issue #4589 by refcusing the first/last input when we will tab outside the dialog.

And modal issue #4687, by handling the z-index of the dialogs and backdrops.

I also fixed several links missing the href attribute to make them tab-able and using space on those items to trigger the click event which was missing.