What is the best way to override the tab order in a web page?
I'm trying to implement a zoom mode for part of a form, so when the zoom
button is pressed that section of the form is resized to fill the entire
browser window. While the user is in the zoom mode I want to stop the tab
key taking them on to the next (now invisible) tabstop on the page. Ideally
I want tabbing to wrap round so that tabbing forward from the last of the
zoomed controls takes me to the first zoomed control, and tabbing back from
the first takes me to the last zoomed control. I have no control over what
appears elsewhere on the webpage.
I can think of a variety of ways to achieve this:
I could modify tabindex so that when focus is in the last zoomed control,
the first zoomed control has the next tabindex and when focus is in the
first zoomed control its original tabindex is restored.
I could set a negative tabindex on all other tabstops on the page, but this
gets messy if any tabstops already have a negative tabindex and it is quite
a lot of work.
I could intercept the tab key and try to force its behaviour.
Any suggestions which of these (or any other) technique is most likely to
work? 2 4388
Duncan Booth wrote: What is the best way to override the tab order in a web page?
[...]
If you really must do this, trapping the tab key and manually moving
the focus to the next element is probably best but please look
carefully at the usability issues first. Presumably the "un-zoom"
button will be one of the tab-navigable elements.
You can dynamically change the tabIndex property, but I think the logic
of trying to trap users in the one set of controls would drive you (and
your visitors) mad. I could modify tabindex so that when focus is in the last zoomed control, the first zoomed control has the next tabindex and when focus is in the first zoomed control its original tabindex is restored.
The behaviour of negative numbers may be unreliable, the spec does not
say how they should be treated, but it does say:
This value must be a number between 0 and 32767
<URL:
http://www.w3.org/TR/1998/REC-html40-19980424/interact/forms.html#adef-tabindex>
but I was able to get Safari to follow an order using negative numbers.
Cheers, Fred.
Fred Oz wrote: Duncan Booth wrote: What is the best way to override the tab order in a web page? [...]
If you really must do this, trapping the tab key and manually moving the focus to the next element is probably best but please look carefully at the usability issues first. Presumably the "un-zoom" button will be one of the tab-navigable elements.
You can dynamically change the tabIndex property, but I think the logic of trying to trap users in the one set of controls would drive you (and your visitors) mad.
Naturally the un-zoom button will be tab navigable. It wouldn't be much of
a user interface if it weren't. The point of doing this is that I think the
users will go a bit crazy if they can tab to controls which aren't visible
and zooming hides *everything* except the one area of the form.
A bit more information: I'm adding this zoom functionality to Kupu which is
a wysiwyg editor, so the controls visible when zoomed are a toolbar with
all the usual word processing functions and the rest of the window gets
filled with an iframe containing the contentEditable or designMode
document. In normal mode you have the toolbar and iframe in the middle of a
page which results in a slightly unpleasant interface as you have separate
scrollbars for the page and for the iframe.
It is still very much a speculative enhancement since I'm not sure to what
extent I can get something that works cleanly and intuitively, but so far
it looks pretty promising.
... The behaviour of negative numbers may be unreliable, the spec does not say how they should be treated, but it does say: ...
Thanks, that's exactly why I posted the question. I thought there were
bound to be people who knew reasons why some of my options are non-
starters. Scratch negative indexes, not that I liked that idea much anyway. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Jonas Smithson |
last post by:
I'm going to say something now that may seem to completely contradict
a previous post of mine, in which I basically said that taking a "who
cares" attitude about certain browsers (because of their non-standard
CSS rendering) makes no sense.
Well, you have to draw the line *somewhere*... and contradictory or
not, I've decided that I've suffered with Netscape 4 for long enough.
Coding workarounds for its brain-dead CSS rendering has...
|
by: Chris Beall |
last post by:
Here's the problem:
http://pages.prodigy.net/chris_beall/Demo/theproblem.html
The page contains inline text, then some additional pairs of text which
are floated right and left. (This is a transcript of a historical legal
document with signatures on the right and witnesses on the left). The
'document' ends with no additional inline text. The background of the
entire document should be brown inside a white body, (in this test the
body...
|
by: |
last post by:
I have an app that retrieves data from an Access database. At the moment I
have the SQL string as a Const in my app. I understand this is not best
practice. I don't want the user to have access to read or modify this string
so I don't want to store it in an INI / Text file or in registery. Can
someone please tell me the best practice for this.
Thanks
Mike
|
by: Scott Emick |
last post by:
When I try to execute
dc.daOrders.Update(ds.Orders)
I get:
Run-time exception thrown : System.FormatException - Input string was not in
a correct format.
I think in my typed dataset/datatable one of the column's defaults must be
null or something and since the column type is string it is throwing that
error....But what makes no sense is if I iterate through all all the column
values prior to the update I can read each one with no...
|
by: John Salerno |
last post by:
Let's pretend I'm creating an Employee class, which I will later
subclass for more specific jobs. Each instance will have stuff like a
name, title, degrees held, etc. etc.
So I'm wondering, is the best way to get all this information into the
object to just have a really long __init__ method that takes each argument?
Does a question like this depend on how the class will be used? I'm
trying to construct it in a way that is independent...
| |
by: Charlie Bear |
last post by:
i've got myself into a bit of an oo mess. it's probably me
misunderstanding how oo works.
I've got a base class called "Feature" which some classes inherit. in
the database i've stored the data in a table along with a type id to
tell me what type of feature it is. ie a poll feature has an id of two
and has the properties of feature plus a poll id which links to a poll
table. the poll feature has seperate methods that the base feature...
|
by: darthghandi |
last post by:
I've created a class to listen to all interfaces and do a
BeginAccept(). Once it gets a connection, it passes the connected
socket off and stores it in a List. Next, it continues to listen for
more incoming connections and does the BeginAccpet() again. It does
an infinite loop this way. My question is: What is the best way to
stop this? I thought about putting a boolean in there, but then what
if it's still waiting for an incoming...
|
by: jim |
last post by:
Let's just say that I am foolish enough to code and distribute a free app to
the general public over the web.
What is the best (cheapest, smallest bandwidth, easiest to code) way to
publish updates to my .Net application?
I'd like to save bandwidth by only updating the changed portions if
possible.
Thanks!
|
by: stephen.diverdi |
last post by:
I have a question about what's the best way to handle something in C++
without a lot of redundant code and void*s because I don't seem to be
able to avoid them both. I've run into it before and always sort of
hacked something together, but I'd really prefer a more elegant
solution.
I have a parameter struct that I store some values of varying type in:
struct params_t
{
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |