Problem with Combobox in ExtJS - combobox

I am developing a website, which is going to be accessed by an embedded system with a touchscreen interface. In order to provide the data to an ExtJS combobox, the user uses an on-screen keyboard (such as the add-ons provided by chrome and firefox, which are developed in javascript). When I select the combobox, I can type the first character (the combobox looses the focus when the keyboard button is pressed and then focuses once again when the key in the keyboard is released). When I try to insert the second character, the first one is erased instead of being concatenated to the end.
Is there any way to make sure that the new characters are appended to ones that are already in the combobox?(instead of erasing them).
Any help on this matter would be nice.

Would need to see code like the previous answerer, but make sure selectOnFocus is false on the combobox, or else you would be typing over everything for each letter the way you described it.

Related

NVDA and JAWS reading order using React

When using NVDA on Firefox, it reads in row-wise order in React. How can I change the reading order?
Sample code:
<Row1>
<row-item-left>{some content1-left}</row-item-left>
<row-item-right>{some content1-right}</row-item-right>
<Row1>
<Row2>
<row-item-left>{some content2-left}</row-item-left>
<row-item-right>{some content2-right}</row-item-right>
<Row2>
Now it reads, "some content1-left, some content1-right, some content2-left, and some content2-right." I want it to read, "some content1-left, some content2-left, some content1-right," and, "some content2-right."
I use tabindex. It's working fine with tabs, but I don't want to focus elements Also it's not working with arrow keys. Please help me on this.
The reading order is always the same as it appears in the accessibility tree, and the accessibility tree is built from the DOM.
This basic rule can't be changed. CSS has no effect on reading order.
So if you want the content to be read column by column instead of row by row, you have no choice but rearrange your code so that it appears in the right order in the source:
<row-item-left>{some content1-left}</row-item-left> 
<row-item-left>{some content2-left}</row-item-left> 
<row-item-right>{some content1-right}</row-item-right> 
<row-item-right>{some content2-right}</row-item-right> 
I leave CSS experts tell you how you can achieve it.
Firstly accessibility isn't about what you want, never try to change expected behaviour.
When using a screen reader it is expected that items flow from left to right, top to bottom in 99% of cases (the way you would read the page normally).
The idea is that a screen reader user gets the same experience as someone who does not need to use one.
With regards to focus, never interfere with that either if it is something that is interactive (a clickable cell, link etc.).
If something is focusable it should also have a distinctive border (this helps users who use tab to navigate due to mobility issues know where their current cursor is placed on your site.) - just an extra tip, not relevant to your question.
The current read order is correct, do not interfere with it.
With regards to using arrow keys that may be useful, just use JavaScript to intercept the key presses and move focus accordingly (give that a go and post another question with a code example if you get stuck.)
Bear in mind you should also provide a way for people to disable this arrow key behaviour as they may have changed the key bindings on their screen reader and that would cause accessibility issues if your JavaScript interferes with their preferred key bindings.
I am not sure why you said you don't want to focus the element, if your custom HTML elements have focus in the first place then adjust those elements (as you must have added a tabindex=0 or some JS to those elements in the first place to make them focusable as <divs> are not focusable by default.)

NVDA automatically switches to Forms Mode

Currently my React component consists of a few labels and one input box. And it has a view mode and en edit mode.
When I go into edit mode, NVDA automatically goes into forms mode, due to which I'm not able to enter any text in input box or navigate through labels using arrow keys.
By default, on pressing Enter, NVDA goes in forms mode (see NVDA's keyboard shortcuts for forms) which takes all next keyboard input as shortcut to some command. To come out of that mode, we need to use the NVDA key (Default is insert key) + space. After that, we can resume typing. We are not even able to navigate through arrow key as it begins reading each character.
Readonly : ReadOnly Looks like this
Edit Mode: Edit Mode looks like this
Is there a way to prevent NVDA from going into forms mode automatically?
Any help would be appreciated.
NVDA Version : 2018.11
Firefox: 60.0.1 (64-bit)
I'm not sure I follow what the question is.
You have forms mode backwards. When in forms mode (meaning, that you're in a <form>), you want to type stuff into input fields and such. The keyboard events go to the form instead of to the screen reader so that what you type is what you see.
When you exit forms mode, you're back in "screen reader mode" and characters that you type will be interpreted as screen reader quicknav keys (such as 'B' to go to the next button, 'T' to go to the next table, etc).
NVDA (and JAWS) have options on whether to automatically go into forms mode when focus goes to a form element.
So given that, are you asking how you can force a screen reader to switch modes?

Page in WPF losing focus

I have a Page in WPF which has a text box. This text box is set to be focused on load.
There is an application running in the background which takes a string value of a biometrics scan result and places it in that text box. This is a 3rd party application, and we have been told that it looks for a text box with a certain name, in an application with a certain name and if that text box is focused on, it will write that string in.
This works perfectly fine, but below is the problem I am having.
We have another piece of software which is a custom on screen keyboard. The text box can also be written into so the user can click a button to bring up this keyboard then start typing. However when this keyboard comes up, it seems to lose focus to my application and it doesnt come back again. For the lifecycle of our application running, the biometrics doesn't work because it doesn't see my application as the one currently in focus.
How do I force my application to come back in focus, but only when I want it to. I don't want it ALWAYS to be in focus and on the top, else the custom keyboard would never show.
I looked into Application.Activated Event with no joy, and even tried the following
public static extern bool SetForegroundWindow(IntPtr hWnd);
Getting a but stuck, does anyone have any advice?
Have you tried Activate() and Focus() methods?
This thread has a bunch of answers on topic Bring a window to the front in WPF
This particular one worked for me https://stackoverflow.com/a/7559766/305020

Custom Undo/Redo in WPF TextBox with proper caret-movement

I have implemented a custom Undo/Redo stack and Im trying to get it to work with the WPF TextBox.
I have turned off the built in Undo-mechanism and hooked up my custom Undo on Ctrl+Z. Everything works fine accept that the caret in the TextBox is always being moved to index 0 on every undo/redo. The question is how to solve this?
I have tried having a custom behaviour on the TextBox which listens to TextChanged and is localizing the last change in the text-string. But this only works unless you start typing the same letter several times in a row. The my method breaks down.
What I ideally want is some kind of behaviour that only makes actual changes to the TextBox.Text-property. As it is now it is updated completely for every Undo, even if its only the last entered letter that is removed. This is of course no suprise since it listens to the Text-property on my PresentationModel which is triggering PropertyChanged on Undo.
But wouldnt it be great if there was some more fine-detailed way of telling exactly what had changed with the property-value, that only one or a couple of letters where inserted/removed in the string value. Then the TextBox could change only that without having to refresh its entire Text-value. Is there any such way of telling the TextBox this allready or could it be possible to make a custom TextBox that behaved in this way? Then it would be possible to pinpoint the exact location for the new caret without having it go straight back to 0 for every propertychange-update!

Create a WPF text box which only responds to character key presses and few selected editing key presses

The WPF text box responds to quite a number of editing commands. I want to eliminate the vast majority and have it respond to any text input and few editing commands like backspace & delete. I know I can handle the KeyDown event but I can't see any easy way of distinguishing between character input and editing key strokes.
You can use the Preview events. They happen before the actual key events that actually perform the work. For instance, if you want to disable the down arrow for moving up and down in text, in the PreviewKeyDownEvent you would check 'e.Key' for the down key, and if found, and set e.Handled = true. This effectively removes that key press from the processing. As such, KeyDown will never get called.
Using this method you can remove specific keys, or combinations of keys and modifiers (such as CTRL-C if you wanted to disable the 'copy' shortcut).
Hope this helps! If so, don't forget to vote it up and/or mark it as accepted.
WPF does not have a built-in masked text box under .NET 3.5.
You will find lots of starting places if you search google and stackoverflow for: WPF Masked TextBox

Resources