In my application, we have various types of dropdown GWT components used. I am using the JAWS latest version for the accessibility.
JAWS have some default keyboard manager setting for the "Downarrow" which perform the respective function. In my application, when the dropdown is opened, on pressing the "downarrow" JAWS is reading the list of values in dropdown one by one along with the respective highlighted thing.
But on the "enter" keypress, the selection of that particular value is not happening.
When in turned-off the JAWS, the down arrow perform its respective function of moving to the next record and on Enter click, that particular value is selected in dropdown.
somewhere JAWS default settings is overridden by the application setting. I tried various attributes like "aria-labelledby", "role - combobox, menuitem". but no luck. Could somebody help on this?
By default, the up/down arrow keys when JAWS is running will move you to the next element in the DOM. If that element is an interactive component that uses the up/down key for interaction (such as a radio), then JAWS will automatically switch to "forms mode" (kind of like a mini application mode) so that the arrow keys can be interpreted by the compoent instead of the screen reader. (The user has options on whether automatic forms mode is turned on). To get out of forms mode, press Escape.
If you have your own custom component that behaves like a native component, as long as you have the proper ARIA roles and attributes (such as role="radiogroup" and role="radio"), JAWS should switch to forms mode automatically.
See https://www.freedomscientific.com/Support/TechnicalSupport/Bulletin/1665 for more details. The title of that article talks about role="applications" and role="document" but it talks about forms mode and the Enter key.
Related
I want to move a google map into an activity Android without using the fingers but only using four buttons (objects) with the directions: left, right, top and bottom.
Any idea on how to do this?
Based on the documentation, you can use draggable:false in preventing maps from being dragged.
You can use this link for more information.
Also, here is a related article that you can refer to:
How can I disable scrolling on the Google Maps mobile layout?
Regarding the controls, I think you can actually add custom controls aside from the existing and default controls. Note that few rules are necessary to be followed:
Define appropriate CSS for the control element(s) to display.
Handle interaction with the user or the map through event handlers for either map property changes or user events (for example, 'click' events).
Create a <div> element to hold the control and add this element to the Map's controls property.
Please see this link for more information and examples.
Hope this one will help.
I am working on a web based Java application (GWT is used for my UI).
I have a warehouse management system.I need to scan the barcodes and show them in a textbox.
I am aware that the scanners would send keyboard events. How do I capture these events and populate them in my textbox ? Should the cursor focus be on the textbox while scanning the barcode ?
Can anyone please provide a code snippet of how to capture these events and populate in the textbox ?
Please note that this needs to work across different OS and browsers.
This should work for laptops/desktops. It is not for mobile apps.
I would recommend setting cursor focus on the input textbox if scanning barcodes is the default action for that page, you can then use a KeyPressHandler on the textbox to intercept the scanner's control character if its set up to fire off a carriage return line feed (enter key) after each scan.
This
may be a place to start looking.
A quick search for an example came up with a good one here
Since you cannot distinguish between scanner and keyboard events, just focus on the textbox and wait for the input. Be sure to set up the scanners so they send TAB afterwards, not ENTER.
Depending on you scanner, it is possible to program it to send a predefined prefix before the actual bar code. For example, the scanner I was working with, a Honeywell Voyager 95X0, can be configured to transmit, for example, a Start of TeXt (ASCII 02H) before each bar code (see page Chapter 8, page 42 of the configuration guide). You could then use that prefix to filter out which KeyPressEvents were coming from the scanner (and then move the input to the text box) and which were from the user.
Setting up a "global" KeyPressHandler (so that the user doesn't have to remember to focus the text box before scanning the bar code) should be trivial - see, for example, this thread. The key point is using Event.addNativePreviewHandler to capture the events before they are fired to their handlers.
I was wondering that the textbox itself identifies its type and when clicked inside textbox it gives the suggestion for that. For a instance i am creating a textbox for mobile no and when click inside the textbox it correctly detects it. Can anyone explain me how it was coded. It was browser feature or HTML feature?
Here is the Image explanation
This features of modern browsers is called auto-fill option, where the browser recognizes that you have performed a specific search before and suggests information that you have typed before. For sweepers, auto-fill saves a ton of time. When Roboform doesn't fill out a form for me, I usually only have to double-click in the text field and select the data I want from the drop-down list of options. This is particularly useful for daily sweepstakes that require codes.
This might seem like a very trivial problem but I have spent quite some time on this without finding a viable solution.
Nokia devices have a central select button,which allows us to assign soft keys to it.
According to my requirement, I need to assign a specific command as the soft key. For instance it might be "Play" on one screen and "Select" on other. Note that I have a default select command already set using:
setDefaultCommand((Command) v.elementAt(v.size() - 1));
which is always the first command in the menu at the right and is invoked when central select button is pressed.
From what I read, the way commands are assigned to each soft key is very arbitrary and varies from device to device. Since I have a default command already set, my problem can be solved in two ways:
1.By setting a soft key to the central button using
Display.getInstance().setThirdSoftButton(true);
I tried this, but the way commands are assigned is very random. Also,there is a default command "Select" always added to the menu. Is there a way to customize this so that a very specific command is shown above the central button?
2.By just assigning a label so that the default command set as above is displayed in the central soft key.
The 3rd softbutton mode has default implementations for many focusable components but not for labels. You can customize its label by invoking setSelectCommandText(String) on the component.
I suggest that rather than using a label for a center command just use a button and set it's UIID to Label if you want it to appear as a standard label.
I'm trying to write an application using JavaFX 2.0 that includes a web browser control that allows a user to navigate through the text and images on a HTML page using only the keyboard -- basically like "caret browsing" in Internet Explorer.
The goal is to be able to select bits of text or images and copy them to a variable for further manipulation without using a mouse.
I took a look at the HTMLEditor control here:
http://docs.oracle.com/javafx/2.0/ui_controls/editor.htm#CHDBEGDD
but I don't need any editing capability cluttering up the UI, and the documentation says:
The formatting toolbars are provided in the implementation of the
component. You cannot toggle their visibility.
WebView seems like a logical choice (http://docs.oracle.com/javafx/2.0/webview/jfxpub-webview.htm), but I'm not sure how to get a cursor onto the page.
Any advice would be appreciated.
The current WebView support for caret browsing seems patchy at best to me.
Here is what I found running a quick test:
I can invoke webView.requestFocus to have the WebView request focus for responding to key presses, but it just operates on the WebView as a whole, not individual components within the WebView.
WebView does not implement a selection management API similar to TextInputControl for fine grained programmatic management of selections.
WebView does allow you to select text. However, I had to initiate the selection with a mouse drag, and after that I could use a keyboard to enlarge or shorten the selection (left or right arrow keys for a character by character selection and ctrl + left or right arrow keys for word by word selection - up and down arrows did not affect the selection).
After selecting some text in WebView I could press Ctrl-C on it (in Windows) to copy it to a clipboard and paste the text into another program. Only raw text was copied - associated style/html info and images were not copied.
To copy images I had to right click on an image and select Copy Image from a drop down menu and I could paste the image into MS Paint - I could not find a way to do this without a mouse.
In other browsers I can press TAB and Shift + TAB to go from one hyperlink to the next - in WebView, once it has focus, TAB will just go from one control (e.g. an html text field in the WebView) to the next (e.g. an html button in the text field).
The backspace key works as in other browsers (takes you to the previous page).
The above restrictions, and likely others I didn't test for, will likely make it hard to accomplish what you are trying to do. You could try stuff such as capturing keypress events using an eventfilter, then generating mouse events to initiate the selection and copy process, but that sounds difficult to me, and even then, there is currently no public API in JavaFX to generate mouse events, only an unstable com.sun api.
WebView does expose a document object model, and the document is scriptable by JavaScript. Try capturing key events with an eventfilter, listening to the document property for changes and executing JavaScript against the WebView at appropriate times to get and set the current selection. This also seems a little tricky to implement well.
Accomplish as much as you can with the current WebView control and public API and log issues at http://javafx-jira.kenai.com as and when you encounter short-comings.