Skip to content

aria-component

Meet the access needs of the visually impaired for small programs.

Barrier-free access

In order to better meet the access needs of the visually impaired for small programs, some ARIA tags are supported.

Accessibility is accessible in screen reading mode, and iOS can be turned on by going to Settings > General > Accessibility > Narration.

In the view component, for example, developers can add aria-role and aria-label attributes. aria-role indicates the role of the component. When it is set to 'img', the system will read the 'image' after focusing in screen reading mode. When set to 'button', the system reads the 'button' after focusing. aria-label indicates additional information that comes with the component and is automatically read out by the system when it is focused.

Applets already have some accessibility features built in, and for non-native components, developers can add the following accessibility tags.

|||| ----|----|----|----|---- aria-activedescendant|aria-atomic|aria-autocomplete|aria-busy|aria-checked aria-colcount|aria-colindex|aria-colspan|aria-controls|aria-current aria-describedby|aria-details|aria-disabled|aria-dropeffect|aria-errormessage aria-expanded|aria-flowto|aria-grabbed|aria-haspopup|aria-hidden aria-invalid|aria-keyshortcuts|aria-label|aria-labelledby|aria-level aria-live|aria-modal|aria-multiline|aria-multiselectable|aria-orientation aria-owns|aria-placeholder|aria-posinset|aria-pressed|aria-readonly aria-relevant|aria-required|aria-role|aria-roledescription|aria-rowcount aria-rowindex|aria-rowspan|aria-selected|aria-setsize|aria-sort aria-valuemax|aria-valuemin|aria-valuenow|aria-valuetext| Sample code

html
<view aria-role="button" aria-label="Submit form">submit</view>