3

I'm working on LAMP application. In my application I'm using iframe. I want to navigate through my application via Tab key. all ok. But Tab selection not going inside to the IFRAME.

Is any one have answer for this

<html>
<body>
<div>
other codes..
</div>
    <div id="main-content1" style="position:absolute;float:none;top:80px;margin-left:170px;width: 830px;">
              <iframe onload="IfarmeOnload();"  style="display:block; margin-left:none;  margin-right:none; width: 100%; height: 100%;" src="<?php echo $home; ?>" id="rightMenu" name="rightMenu"   frameborder="0">
              </iframe>

    </div>



    </body>
</html>
Sastrija
  • 3,284
  • 6
  • 47
  • 64
Roshan Wijesena
  • 3,106
  • 8
  • 38
  • 57
  • can you list 3 good reasons to use an iframe? I'm sure there's a better way. – jrharshath Jul 25 '11 at 12:11
  • Im Loading all the contents via echo $home varible in to the iframe; $home varible content the site content – Roshan Wijesena Jul 25 '11 at 12:13
  • 1
    In that case, use ajax to load the content. Don't use an iframe to display your own application's content. Typically, iframes will be useful to display content from other domains, or if they're absolutely unavoidable (like facebook social plugins). – jrharshath Jul 25 '11 at 12:14

3 Answers3

3

Yes! There is a spec for it, its called WAI-ARIA and its for accessibility : http://www.w3.org/WAI/PF/aria-practices/#focus_tabindex

hdf54d56
  • 31
  • 2
1

Look into the documentation of your browser to learn about the shortcut key that navigates between frames.

After you've done that you should be either able to navigate to the iframe and then use the Tab key for further navigation - or in case your browser has no shortcut key for the operation - you can't do anything about it.

Sastrija
  • 3,284
  • 6
  • 47
  • 64
hakre
  • 193,403
  • 52
  • 435
  • 836
  • Im using Chrome I can see in Gmail its working fine with the tab key but not in my app – Roshan Wijesena Jul 25 '11 at 12:12
  • 1
    @Roshan: Gmail might make use of handling the key events in javascript and deal with changing the position of the focus manually. However that is not always possible and not really trivial for a cross-browser experience. Just look inside the gmail code how it's done to get an impression. Just using the browser's hotkey should always work. – hakre Jul 25 '11 at 12:14
1

Hi found the soultion to this by SF by self

please look to this

Tab Index on div regards

Community
  • 1
  • 1
Roshan Wijesena
  • 3,106
  • 8
  • 38
  • 57