Building accessibility into your app

The Momentics IDE for BlackBerry lets you build accessibility into your app quickly and easily.

The QML Editor in the QML Editing perspective validates your code for accessibility. If your code is missing accessibility properties, you see an accessibility warning marker or an information marker next to each component that does not have accessibility properties set. You can add accessibility properties quickly by clicking on a component and selecting one of the suggested accessibility properties.

The QML Accessibility Problems view in the Momentics IDE shows you a report of accessibility problems in your app. You can customize this view to show you accessibility warnings for a single project or for all your projects.

The Accessibility category of the QML Properties view lets you change the accessibility properties of any control. Just click on or within a component in your code and the properties are displayed in the QML Properties view. When you add or change a value in this view, the code in the editor is updated automatically.

Validating your code for accessibility

To make sure that your app meets accessibility guidelines, you can use the QML editor to check whether your code contains required accessibility properties. By default, this validation is turned on in the QML editor.

The ability to validate your code for accessibility is available only for projects that use the 10.2 API level. This validation applies to QML code only.

In the QML editor, you will see an accessibility warning marker or an information marker next to code that does not have accessibility properties set. You can hover over the component to see which accessibility properties are missing.

Screen showing validation of accessibility properties in the Editor.

You can easily add accessibility properties to your code if they are missing. If you have a component that does not have accessibility properties set, click the component in the QML editor to view your options. You can add the accessibility properties that are appropriate for your component or you can disable accessibility property validation.

Screen showing the dialog box that allows you to add suggested accessibility properties.

You can turn off accessibility validation if you don't want to see accessibility warnings in the Editor. To turn off accessibility validation:

  1. In Windows and Linux, on the Window menu, click Preferences. In Mac OS, on the Momentics menu, click Preferences.
  2. Expand BlackBerry.
  3. Expand QML Editor and click Errors/Warnings.
  4. Expand QML objects.
  5. In the Component does not have any properties set for accessibility drop-down list, select Ignore so that accessibility warnings are not shown in the Editor.
  6. Click Apply and click OK.

QML Accessibility Problems view

You can use the QML Accessibility Problems view to see a report of accessibility problems in your app in one place.

The ability to validate your code for accessibility is available only for projects that use the 10.2 API level. This validation applies to QML code only.

To show the QML Accessibility Problems view:

  1. In Windows and Linux, click Window > Show View. In Mac OS, click Momentics > Show View.
  2. Click QML Accessibility Problems.

Screen showing the Cascades QML Accessibility Problems view.

You can limit this view to show only those warnings associated with the current project by selecting the filter in the upper-right corner of the QML Accessibility View. To learn more about accessibility, click the Accessibility Guide.

Accessibility properties

You can use the Accessibility category of the QML Properties view to change the accessibility properties of a Control.

The ability to add properties for accessibility is available only for projects that use the 10.2 API level.

For example, you can enter values for the accessibility.name, accessibility.description and accessibility.labelledBy properties.

You can also set the accessibilityMode to define how a control is exposed to assistive technologies such as screen readers.

Last modified: 2014-06-24



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus