iOS: Accessibility support for dynamic labels / validation errors? - ios

I want to enable accessibility support in my app where i have In-line validation message (e.g As per below screenshot) when user enters something invalid data. My app doesn't show any error message.
What can be best and intuitive way to inform visual impaired/blind user about wrong data entries. e.g. Username & password mismatch, invalid.

First off, there is no "correct" way to do this. There are just a bunch of ways that work. The "best" way to do this, would be for iOS to have a "required" trait (IMO). But this is not supported, so we have to work with what iOS has given us... hints and labels.
Step 1:
Tell the user what is required. I would do this by adding the information to the hint. I like to add information to the hint that only non-familiar users need. "Power users" of your application will get use to what fields are required (assuming you're going to have return users, some views are just "hit and run" types). But, point being, don't flood users with unnecessary information. Users who visit a particular view frequently will get use to what is required, so keep non-crucial information in the hint. What you want is voiceover to read out the text input fields like this: "Email(accessibilityLabel) text field (the type of object), (pause) This field is required.(hint)" Don't wait until after a failure to provide this information to VoiceOver users. It should just always be set this way. If the type of failure changes, change the hint to adapt to this particular type of failure. If you'd like to keep the hint in sync with the Red highlighted labels, you can consider overriding the functions from the UIAccessibilityProtocol to pull out this information EX:
- (NSString*)accessibilityHint {
return myUILabel.text;
}
This should cause to keep the hint of the object, and the text of your UILabel in sync.
Step 2:
Mark all elements that are not the text input fields, as not accessibility elements. All of the information a user needs about those fields is either stored in the type of the field (a text input field), the label (email/password), or the hint (whether or not it is required). Therefore, we don't want VoiceOver to look at the other elements, because this would be duplicate information.
Step 3:
Use the following line of code:
UIAccessibilityPostNotification(UIAccessibilityScreenChangedNotification, anAccessibilityElement);
In your login action. On a failed login action, you should shift voiceover focus to the element that caused the failure. This informs the user that their action was attempted, and that it failed. It also allows them to easily know which element caused the failure, and that it needs fixed. In the event of multiple failures, make sure you shift focus to the first failure!

Related

BigDecimalField validation bug

BigDecimalField has a nice feature: it allows only digits, "+" and "-" signs, and a decimal separator defined by the current locale ("." or ","). It works fine until someone tries to enter a combination that is not a number or cannot be directly converted to the java BigDecimal type (e.g "123...45.6+++7-89--").
For sach combinations, the validation passes without any warning, and the background business object gets a null value.
Field is in the dialog and every time before opening the dialog there is a call to Binder.readBean() method (in order to set the appropriate data for editing), on "save" button in dialog I call Binder.writeBean(). Problem is that the next time I open the dialog, the problematic BigDecimalField still contains an invalid number entered,
actually Binder.readBean() stops working for that field.
There is a similar bug with IntegerField which I noticed: IntegerField validation bug.
How can I validate BigDecimalField and avoid this bug? How do i get the BigDecimalField to work again and not keep showing invalid data? Is there a elegant way to catch the NumberFormatException that probably occurs somewhere inside the vaadin api, and proces it i.e. warn the user that he has to enter a valid decimal number. Is there a way to do it via Binder?
I am using Vaadin 23.3.0
Checking format error is not yet by default on. You need to enable it by setting enforceFieldValidation=true in feature flags in src/main/resources/vaadin-featureflags.properties file.
com.vaadin.experimental.enforceFieldValidation=true
See more at: https://github.com/vaadin/platform/issues/3066

Google Sheets - Run script based on value

I'm very new to scripting and really need some help getting started.
Basically I'm trying to develop a simple script to show a warning message when a certain value in a cell has been selected from a drop down list.
When the option 'Behind' has been selected I just want a simple popup window or something to say 'Review is needed'.
I've explored 'toast' but I'm not sure how I'd get the script to run based on the value.
Any help would be much appreciated, I'm going bald :(
Emma
You can also achieve this kind of behavior without writing your own script. See Data validation.
Select the cells for which you want this to apply
Click on Data -> Data Validation in the menu
Set your criteria for allowed values
On invalid data, select either Show Warning or Reject Input (the latter will reject the input and show a toast)
Put a checkbox in Show validation help text to add a custom warning text

abas-ERP: Command in user menu for specific screen priority

I need a command which calls a screen in a specific priority.
In detail:
I'd like to offer a menu entry to our users were they can simple change the work day calendar in employee data sets and nothing else. I know the correct way would be creating a lower prio screen and grand the user such prio for accessing employees. But these users are allowed to change more than the work day calendar! I just like to reduce the fields in screen for a more simple recording and maintaining of absence from work.
So they should be able to view and change the normal employee screen but with a special command (from command view) the should open the same employee but with reduced number of field. Simple: separated screens for different use cases.
I believe I have to solve it by providing a service program in infosystem or similar but I'd like to ask you for a better way of solution before.
In this case you can work with different screen context modes.
Please keep in mind, that screen modes works just within new screen descriptions.
(almost) Every element in the screen editor has an option called visibility scope (Sichbarkeit -> Geltungsbereich)
For example you could define a scope called EXTENDEDPERMISSION.
Then the element would be only visible, when you set the screencontext in FO to "EXTENDEDPERMISION"
..: set one screen context
.formula P|maskkontextfop = "EXTENDEDPERMISION"
..
..: set some screen contexts
.formula P|maskkontextfop = "VIEW1 VIEW2 LIGHTVIEW"
You can set the screen context in every event you'd like to.
For more infos you can search for "maskkontextfop" in the online help.
But keep in mind, that the user still can access all variables over the dynamic selection as long as you grant them the permission to these fields!
So if you really want, that a user (under no circumstances) gains access to some fields, you'll have to configure the right permissions.

List all the invalid controls in Orbeon forms

I have 30 fields in my form. At the bottom of the form I have a button where if I click on it, it should display all the fields which are invalid. Invalid includes not filling the mandatory fields also.
Using xforms:trigger I can create a button and using DOMActivate even I can write xforms:action. But what should I write inside the xforms:action to list all invalid fields.
You can implement your own error summary by listening to events like xforms-valid and xforms-invalid, keeping track of which controls are valid and invalid. But this is not a trivial task, especially if you want to handle repeats, and even nested repeats. Fortunately, this work has been done already for you, and the code has been put in a reusable component: <fr:error-summary>.
If you are using Form Runner, the error summary is setup for you by default. Otherwise, see this documentation on how to use the error summary component.

SharePoint - checking Content Approval change status in event receiver

I have a SharePoint list with Content Approval enabled. The business requirement is that once the new list item is approved it should stay approved despite further updates by any user.
My first thought was to handle the ItemUpdating method, and if the corresponding before property is Approved then set the after property to Approved. This doesn't work however.
In the ItemUpdating method the "Approval Status" column does not show up in properties.BeforeProperties or properties.AfterProperties. properties.ListItem["Approval Status"] and properties.ListItem.ModerationInformation.Status both show the "before" value. In the ItemUpdated method the situation is the same, except instead the values shown are the "after" values.
Is there a way in either method to identify both the before and after methods? I can work around this by creating a new hidden column that I set when the item is approved but that doesn't seem best.
Should I be approaching this from a workflow perspective?
Would this help?
http://www.synergyonline.com/blog/blog-moss/Lists/Posts/Post.aspx?ID=25
Use field's internal name with AfterProperties or BeforeProperties.
i.e. properties.AfterProperties["internal name"].
It works for me
Please refer to the following properties in the AfterProperties section for a document library.
Document libraries are a bit different than lists. the doc libraries have .AfterProperties["vti_doclibmodstat"] and .AfterProperties["vti_doclibmodcomm"].

Resources