How to prevent keyboard input without Enter from changing TComboBox selection in Delphi? - delphi

A TComboBox behaves differently for mouse and keyboard input. If an item is highlighted using the mouse, it only becomes selected when clicked. However, when highlighted using the keyboard, using the arrow keys or by entering the first letter of the item, the selected item changes instantly.
How do I (cleanly) change the behavior of keyboard input to be more like mouse input? That is, an item becomes only the selected item when Enter is pressed (a "click").

Related

programmatically navigate focus in material-ui

I have an autosuggest component (with a TextField from material-ui), my issue is that after selecting a value from the autosuggest (eg. with the mouse), the suggestion remains open since the input still has the focus
How do I navigate to the next focusable element programmatically?

iOS Voiceover support for combobox widgets

Typically a combobox widget is an input field that launches an associated popup with a bunch of suggestions in the popup. In desktop browsers using keyboard, while the focus stays with the input field, pressing Up/Down arrow keys, the selection within the popup can be changed. Pressing ENTER key populates the input field with current selection in the popup and closes the popup.
For accessibility purpose, the input field is marked role="combobox", the popup is linked with the input field via aria-owns. The AT are indicated the current selection via aria-activedescendant.
While this setup works great in desktop browsers with tools like JAWS/NVDA etc., there seems to be a major issue with voiceover on iOS. On swiping the finger, the virtual cursor moves to the next element in the page from the input field, though I would expect with aria-owns set, the focus to move to the first suggestion item or to the popup.
Any suggestions on how such a combobox widget can be made accessible in iOS with voiceover?
PS: The popup and input field are not siblings in the DOM order.
It sounds like you are creating a custom combobox. If you use the native <select>/<option> elements, the combobox works correctly on ios/voiceover. If you are creating your own, follow the guidance on https://www.w3.org/TR/wai-aria-practices/#combobox. You mentioned several ARIA attributes so perhaps you're already following the advice on that page.
Swiping right with voiceover will move the focus to the next element in the DOM. If your dropdown list is hidden, then focus won't move to it. Double tapping on your <input> should display the dropdown list.

Swift textfield deletes text when segmented control is touched.

I have a textfield that inputs a number, and that number is converted into different units depending on the selection of a segmented control. My problem is that if the textfield is still being edited - and then the segmented control is selected, the textfield deletes the data that was entered.
Just to clarify: I enter an amount into the textfield, and while the text field is still selected I click the segmented control, and the textfield displays zero, erasing the value that I originally inputted.
I'm not positive if this is default behavior, or just the flow of my program.

How to show keyboard programmatically in Firefox OS?

I am working on a ToDo list app wherein I keep the focus on the textbox input after the user adds a ToDo item.
Now, the problem is, when the user adds some text input and hits the add button, the focus on the textbox is lost so the keyboard disappears and then the focus gets back to the textbox. So, the keyboard disappears and appears again in a short interval. As you can imagine, this is bad UX.
How do I set the keyboard to be shown explicitly when the focus is on the input button?
I fixed it by setting the focus onto the textbox first when I click the add button then do the actual adding stuff.

Focusing a label in Windows Form Application in C#

I have one split container.
In panel1 of split container, it has 2 PANEL, first panel contains 2 buttons and 1 combobox. second panel contains 2 labels. I had tried to set tabIndex of label control to 0
but when I run program button gets focus by default. When I press TAB key, next button gets focus after that "combobox" gets focus after that again button1 gets focus. But label never get the focus. Why it is so and hoe to solve this ? I want label to get focus or I wish those buttons and combo will never receive a focus.
Thanks
Rahul
You can't set focus on a label because labels do not accept input. Only controls that accept input can be focussed.

Resources