A well-designed user interface (UI) often has elements that don't require an explicit label to indicate their purpose to the user. A checkbox next to an item in a task list application has a fairly obvious purpose, as does a trash can in a file manager application. However, to your users with vision impairment, other UI cues are needed. Fortunately, both iOS and Android provide APIs for making apps accessible to people with disabilities. Moreover, both platforms provide tools and technologies (like TalkBack and VoiceOver) that can make the lives of the visually impaired easier.
The NativeScript framework produces native apps. Thus, all vendor tools for impaired users work right out of the box. Also, all popular automation tools and frameworks that are based on native Android and iOS accessibility models (like Appium) also just work, with no additional bridging code or programming required. In addition to the entire set of native accessibility capabilities, NativeScript also provides cross-platform APIs designed to assist developers with making more accessible apps.
automationText property that can be set on view:
<GridLayout width="290" automationText="MyGrid" />
On Android this property will set android:contentDescription attribute on specified element, which will help Android accessibility tools and services to work properly. On iOS this will set accessibilityIdentifier which is used to uniquely identify an element in the scripts you write using the UI Automation interfaces.
automationText can also be used with binding in more complex scenarios.
Take a look at the following example from the NativeScript Examples app: Google Play App Store Source
<Repeater.itemTemplate>
<StackLayout touch="tileTouch" tap="navigateToExample" cssClass="example-item"
automationText="{{ title }}"
orientation="{{ $parents['Repeater'].useListLayout, $parents['Repeater'].useListLayout ? 'horizontal' : 'vertical' }}"
visibility="{{ $parents['Repeater'].showOnlyNew, (!$parents['Repeater'].showOnlyNew || isNew) ? 'visible' : 'collapsed' }}">
<GridLayout horizontalAlignment="center" columns="*" rows="*"
cssClass="{{ $parents['Repeater'].useListLayout, $parents['Repeater'].useListLayout ? 'example-img-list' : 'example-img-wrap' }}">
<Image src="{{ image }}" cssClass="{{ isNew ? 'list-example-image-new' : 'list-example-image' }}"
borderColor="{{ $parents['Repeater'].group.tint }}"
stretch="aspectFit" />
<Image src="{{ $parents['Page'].group.id, 'res://ic_new_' + $parents['Repeater'].group.id }}" cssClass="new" visibility="{{ isNew ? 'visible' : 'collapsed' }}" stretch="none" />
</GridLayout>
<StackLayout>
<Label text="{{ title }}"
cssClass="{{ $parents['Repeater'].useListLayout, $parents['Repeater'].useListLayout ? 'example-title-list' : 'example-title-wrap' }}" />
<Label text="{{ controls }}" textWrap="true"
cssClass="{{ $parents['Repeater'].useListLayout, $parents['Repeater'].useListLayout ? 'used-controls-list' : 'used-controls-wrap' }}" />
</StackLayout>
</StackLayout>
</Repeater.itemTemplate>
Result is: Image of Android's UI Atomation Viewer with example above
Keep in mind, NativeScript always gives you full access to all native APIs so you can have full control of native accessibility features.
For example:
var signOutButton = page.getViewById("signOutLabel");
signOutButton.android.setClickable(true);
Many governments and organizations worldwide mandate apps have accessibility features for impaired users. It is important to us to provide you with all native accessibility features out of the box and also the very best in cross-platform abstractions so you can build and deploy a successful app for all users, regardless of physical abilities.
" that can make visually impaired live easier." change to " that can make the lives of the visually impaired easier."
"NativeScript framework produces native apps and all vendor tools for impaired work out-of-box. Same apply also for all popular automation tools and framework based on native Android and iOS accessibility models (like Appium). In addition, NativeScript has included cross-platform APIs designed to provide developers with support for making apps more accessible. NativeScript provides"
change to "The NativeScript framework produces native apps. Thus, all vendor tools for impaired users work right out of the box. Also, all popular automation tools and frameworks that are based on native Android and iOS accessibility models (like Appium) also just work, with no additional bridging code or programming required. In addition to the entire set of native accessibility capabilities, NativeScript also provides cross-platform APIs designed to assist developers with making more accessible apps."
"Following example if from NativeScript Examples app:" change to "Take a look at the following example from the NativeScript Examples app" [Add iOS and Android Links]
iOS: https://itunes.apple.com/us/app/examples-nativescript/id1046772499?ls=1&mt=8
Android: https://play.google.com/store/apps/details?id=org.nativescript.examples
"Have in mind that NativeScript lets you access all native APIs from the underlying platform so you can go deeper and have full control of native accessibility APIs."
change to
"Keep in mind, NativeScript always gives you full access to all native APIs so you can have full control of native accessibility features."
If this is the end of the article, add some closing statement like: "Many governments and organizations worldwide mandate apps have accessibility features for impaired users. It is important to us to provide you with all native accessiblity features out of the box and also the very best in cross-platform abstractions so you can build and deploy a successful app for all users, regardless of physical abilities."