Hi,
Is there an easy way to enable or disable an IFrame to take it out of the Tab order?
I’ve created a simple HTML page that has several links that when clicked show or hide an IFrame associated with the link and set the SRC property of the IFrame to one of my Wordpress blogs’ PressThis forms. This way I can easily add a post to any of the blogs from a single page.
Everything on this page works nicely as expected except for the behavior of the Tab key. All of the IFrames are initially hidden and have no SRC set (eg <iframe src=""></iframe>
). The problem is that when I press Tab, instead of going from link to link, it sets focus to the hidden (and empty) IFrames between links.
When the frame is shown and loaded with the PressThis form, pressing Tab correctly navigates through the input fields of the form (and everything else in the page) between links. However when the frame is then hidden again, pressing Tab still goes through each field, so getting from link to link with the keyboard is pretty bad.
I’m trying to figure out a way to toggle the IFrame so that when it is hidden, pressing Tab skips over it (it is removed from the Tab order), and when it is shown, pressing Tab navigates between its form fields.
I looked around and cannot find anything about disabling HTML elements directly (HTML elements don’t seem to have a disabled property as part of the DOM, nor is there a disabled CSS style). The closest thing I could find was people asking about disabling specific form fields.
Is there an easy way to get this done?
Thanks.