Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Jaws friendly textbox 1

Status
Not open for further replies.

IknowMe

Programmer
Aug 6, 2004
1,214
US
In our office we have some visually impaired folks and are trying to make our user forms Jaws friendly. Currently to allow a Jaws user to hear the corresponding label for a textbox we need to set it's tabstop property to true. If it is not tabable Jaws does not read it and a visually impaired person is left knowing there is a textbox for input but not what they should be inputting.

The tabstop works great for VI's but now our sighted users are complaining that they must tab twice to move from textbox to textbox. I was wondering if anyone knows of a way (or propery maybe) to incorporate the label into the textbox so I can make both my VI and V users happy?

I have a copy of Jaws here I can test with so even if you don't please let me know of any ideas you may have. I am willing to try anything.

[thumbsup2] Wow, I'm having amnesia and deja vu at the same time.
I think I've forgotten this before.


 

Since I code against dataBase (ORACLE in my case, but you can do this in Access, too)) I would have a table with all my Users and a Field to indicate who is VI and who is V. Based on who is using my App (check the UserName) I would go either one way or another - in the code to allow or not to tab thru labels.

Or....

On the very first Form, ask the User which way they want to go, then set the switch.

Or....

If that's just one form app, allow them to switch it on and off somewhere on the Form itself.


Have fun.

---- Andy
 
Thanks Andrzejek, that's certainly a viable option. I was hoping there would be some way to incorporate a label into the textbox (or other) via a property that JAWS will read but having no luck.

Or even someway of associating the two (label and textbox) so I wouldn't need a tabstop on the label for Jaws to read it.

If no other options I'm leaning towards arraying my labels and using a function to toggle the tabstop on off via user setting.

[thumbsup2] Wow, I'm having amnesia and deja vu at the same time.
I think I've forgotten this before.


 
The label and the textbox are separate controls, so I don't think this is possible. A tabstop reset by user identification seems the most reasonable.

faq219-2884

Gerry
My paintings and sculpture
 
Thanks for your input Gerry, I am making changes in that direction. If only it had been in the requirements from the begining :)

[thumbsup2] Wow, I'm having amnesia and deja vu at the same time.
I think I've forgotten this before.


 

MrMilson, what property of the Label do you want to switch on and off? In VB 6 a Label does not have .TabStop property (although it has a .TabIndex) because a Label does not get the Focus.

Have fun.

---- Andy
 
I am using .TabStop in VBA. This sets focus to the label and allows JAWS to read it. Index is equally important as if I have say NameLabel and NameTextBox that go together the label index must proceed the textbox index by 1 or it makes no sense when read.

So say I pull six textboxes onto my form and then six labels, if I do not sequence the tabindex correctly they will hear six text boxes followed by six labels as they tab through the form. To make better sense it should be label1 textbox1 label2 textbox2 ect.

What I was hoping for was some property in the textbox itself (tool tip ect) that jaws would read so I could mimick the label inside the textbox and not need to switch tabstop T/F on the labels themselves. Or some sort of on textbox focus do something sneaky for Jaws to tell a Jaws user to read the label that doesn't affect other users.

I have now converted all my labels into an label array so I can loop through and set tabstop property to True for my VI users and false for my V users. This was the only option as it turns out because jaws users have years of tabbing onto and past label expirience that shouldn't be retrained for my app individually. If I were somehow to make it happen they would hear what they thought to be a label and expect to hit tab to move to the textbox only to hear what sounds to them like another label.

[thumbsup2] Wow, I'm having amnesia and deja vu at the same time.
I think I've forgotten this before.


 

Ooops, sorry. My mistake. I though I was in VB6 Forum, but this is a VBA group and your Lables do have .TabStop Property :)

So, you are all set, right? And it works the way you want.


Have fun.

---- Andy
 
Yep, all set thanks everyone.

[thumbsup2] Wow, I'm having amnesia and deja vu at the same time.
I think I've forgotten this before.


 
Sounds like you've come up with a solution already, but here is another thought:

On the enter event for each text box, set the textbox.value = label.caption, and select the entire text

Jaws should be able to read it, and since it is selected it will get overwritten when any user starts typing.
 
MrMilson,
It's been a while since our paths have crossed...

This is sort of a tagent to the topic, but I thought you might find it interesting. A little background: I hate performing setup type maintenance in databases. Things like user tables, etc., etc. so I tend to do as much as I can to make my projects self maintaining.

With that said here is a concept that MIGHT work for you to determine when to toggle the TabStops on/off. It's possible that you could use something like this in a Forms Open event to determine if the Jaws is running and react appropriately.

Code:
Public Declare Function GetWindow Lib "user32" (ByVal hwnd As Long, _
  ByVal wCmd As Long) As Long
Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" _
  (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Public Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" _
  (ByVal hwnd As Long, ByVal lpString As String, ByVal cch As Long) As Long
Public Declare Function GetClassName Lib "user32" Alias "GetClassNameA" _
    (ByVal hwnd As Long, ByVal lpClassName As String, _
     ByVal nMaxCount As Long) As Long

Sub ListWindows()
Dim lngHWnd As Long
Dim lngChar As Long
Dim strWindowText As String, strClass As String
strWindowText = Space$(128)
lngHWnd = FindWindow(vbNullString, vbNullString)
Do Until lngHWnd = 0
  lngChar = GetWindowText(lngHWnd, strWindowText, Len(strWindowText))
  strClass = Space$(255)
  GetClassName lngHWnd, strClass, 255
  'Dump to the immediate window to see if either piece
  'of data is useful to you
  Debug.Print lngHWnd, Left$(strWindowText, lngChar) & _
  " - " & Trim$(strClass)
  lngHWnd = GetWindow(lngHWnd, 2)
Loop
End Sub

You might be able to use the Window Text or Class Name to determine if Jaws is running, if so this could be modified to a function that returns True or False...

Just a thought,
CMP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top