I’m working for Nota, the Danish Library and Expertise Center for people with print disabilities.
My team and I are working on an soon-to-be-release App for our members, a little over 14.000 of those have some form of visually impairment, this makes accessibility a very important feature for our App.
This post intended partially as shameless promotion of the plugin, but mostly in the hope to encourage others in the community to try it out and provide some feedback and hopefully help with making the plugin even better.
Using the plugin:
npm i --save @nota/nativescript-accessibility-ext
And add this to your
app.ts/js, if you’re using angular do it right after you import the
With this plugin you can mark any element as a button, this allows you to make far more advanced buttons than NativeScript’s built-in
A simple example here:
<StackLayout accessible="true" automationText="This now a button" accessibilityComponentType="button" accessibilityTraits="button" > <Label text="First button" (tap)="tapped($event)"></Label> </StackLayout>
This StackLayout will be shown with the label “First button”, but the screen reader will read it as “This now a button” - “button”.
Sometimes you need to hide an element from the screen reader (TalkBack/VoiceOver), this can be done like this:
<Label text="Text that would only confuse the user" accessibilityElementsHidden="yes" importantForAccessibility="no"></Label>
For more you can try the demo in the github project.
The plugin is far from finished, we’ve implemented features as we needed them.
I hope this has peaked your interest and I hope to hear some feedback