Handling keyboard navigation in nsDialogs - accessibility

I'm using nsDialogs to create a custom page in the installer of my app, where users can decide between standard and portable installation.
For this, I create two radio button controls via NSD_CreateRadioButton so that users can decide between the two installation modes.
After receiving feedback from blind users, I'd like to add the possibility to navigate via keyboard between those two radio buttons. So far, pressing the Tab key navigates directly to the next button in the lower navigation bar and not to the . Arrow up / Arrow down have no effect.
How can I add this possibility for keyboard navigation using nsDialogs?

If you use the ${NSD_Create*} macros in nsDialogs.nsh then the WS_TABSTOP style will be set for button controls and you can Tab to them. However, the tab order is: the bottom buttons before the buttons in your dialog.
Assign a access key to allow a user to access a control directly. You do that by adding a ampersand (&) to the text label before a specific character:
${NSD_CreateRadioButton} 0 13u 100% 15u "Click &Me" ; Activate by pressing Alt+M
Pop $0
${NSD_CreateRadioButton} 0 30u 100% 15u "&Or Me"
Pop $0
The arrow keys should also work once one of the radio buttons have focus. The WS_GROUP style also plays a role in keyboard navigation if you have multiple groups of unrelated radio buttons.

I've found a solution to this problem, by experimenting with the suggestions #Anders provided.
In between the two calls to NSD_CreateRadioButton I had another call to NSD_CreateLabel which apparently mixed up the grouping between the two radio buttons.
When I create the radio buttons by two subsequent calls to NSD_CreateRadioButton and then add the describing labels, navigation via Arrow up and Arrow down works. If there is another call to NSD_Create* in between, it breaks the grouping.

Related

Toogle single radiobutton (on and off) in bokeh radiobutton group

I am using bokeh single radio button with single title . Initially it is inactive and when i click on radio button it changed to active but if I click again in active it is not changing to inactive state.
How i need to acheive this functionality??
Whether it's RadioGroup or RadioButtonGroup, neither of those two widgets is meant for a single element usage. Per design they are meant to be used as a group of elements. I advice you to use Toggle for your application. Other alternatives are CheckboxButtonGroup and CheckboxGroup. See Bokeh documentation for specific examples.

Is it possible to set a drop down widget to be required?

Was wondering if it was possible to have a drop down widget in app maker be required. In other words, users could not click submit unless they had selected a value from a down down menu. Kind of like how validation on text boxes.
When looking at the property editor for a drop down widget I don't see anything that will allow me to set the above requirement out of the box.
Below is the property editor for a drop down, you will notice there is no validation options.
Below that is the text box property editor with the validation option expanded. I basically need the same functionality for my drop down menu.
If anyone dealt with a similar issue I would appreciate any input.
Of course you have that option.
Look under DropDown menu you will find option called allowNull, deselect that option. Also select validationDisplay check box from 'Other' menu and users will have to choose from a drop down menu always.
Below are the screen for your reference,
Dropdown menu allowNull option,
Other menu validationDisplay option,

If spacebar opens dropdowns across all browsers, why is my onchange triggered menu considered inaccessible

Background: for Windows users on Chrome and IE, dropdowns that reload or change the page are no good for accessibility. As soon as a user presses the down arrow button, the page reloads. This means that the user can only access the very first menu option. Here is an example: http://html.cita.illinois.edu/script/onchange/onchange-example.php
This is covered in the WCAG rule:
“Changing the setting of any user interface component does not automatically cause a change of context unless the user has been advised of the behavior before using the component. (Level A)”
EXCEPT the user can very easily open up the dropdown and explore all the options without triggering an onchange event. The user does this with a space bar press. This is a very commonly known keyboard trick that I've seen all tested users to already be aware of or be able to figure out quickly.
In my system, we are using a dropdown for pagination in long directories.
EG: "you are on page [1^] of 16" (with the [1^] being a browser default dropdown menu). The designers will not allow any kind of visual [go] button. This happens across thousands of pages, javascript fixes I've seen need to account for every dropdown, and this is impossible on our case.
Using space bar, the user can see all the options and make a selection from anywhere on the list using only the keyboard. So why are dropdown page menus that automatically reload onchange still considered inaccessible? And would they be considered accessible if we included screen-reader only text which said "press space bar to open this menu, making a selection will load your next page"
Well except that in Firefox, the keyboard command is actually F4, you are correct - this is not a WCAG 2 violation but rather a best practice
Here is a page where you can test this: http://dylanb.github.io/onchange_select.html

Getting buttons data into different labels

I'm new. I've determined I cannot make a label "active" and accept keyboard input, so I am trying text fields instead. Seeking advice as to how to kill off the built in keyboard when the user taps the text field, as I want to use my own keyboard (a series of images).
I can determine the active text field (textfield.editing == yes), but when I will kill of the keyboard it seems it also kills off the ability to enter any data into that text field.
Maybe I need to just "hide" the keyboard? Send it off the screen?
OK, I found a way to make this happen. I created some transparent buttons, and laid those over the top of the labels. When the button gets clicked, it designates the label below it should be the active label.
In a separate method, the users text runs thru a few conditions to determine which label (as designated by the transparent button) is active, and the text goes into that label.

What is the proper name for a multibutton?

I'm trying to design a UI in Qt and I can't find anywhere in the designer a button which can be "droped down" like combobox. What I mean by that is that I would like to have this button with his "default" option choosen so if I like it I would have to just click on it but if I would like to choose different option I would be able to clik the little arrow on the right side of this button and then pick option suitable for me at that moment.
You're looking for a QToolButton that has a set of actions or a menu set on it. From the documentation, the QToolButton::ToolButtonPopupMode...
Describes how a menu should be popped up for tool buttons that has a menu set or contains a list of actions.
Of it's values, the two that I see most frequently are DelayedPopup:
After pressing and holding the tool button down for a certain amount of time (the timeout is style dependant, see QStyle::SH_ToolButton_PopupDelay), the menu is displayed. A typical application example is the "back" button in some web browsers's tool bars. If the user clicks it, the browser simply browses back to the previous page. If the user presses and holds the button down for a while, the tool button shows a menu containing the current history list
And MenuButtonPopup:
In this mode the tool button displays a special arrow to indicate that a menu is present. The menu is displayed when the arrow part of the button is pressed.

Resources