aria-component

aria-component

Meets the accessibility needs of visually impaired users for Mini-Programs.

Accessibility

To better meet the accessibility needs of visually impaired users for Mini-Programs, partial ARIA labels are supported.

Accessibility features are available in screen reader mode. On iOS, this can be enabled via Settings -> General -> Accessibility -> VoiceOver.

Taking the view component as an example, developers can add the aria-role and aria-label attributes.

  • aria-role indicates the role of the component. When set to 'img', the system will announce "image" when focused in screen reader mode. When set to 'button', the system will announce "button" when focused.
  • aria-label represents additional information attached to the component, which the system will automatically announce when focused.

The Mini-Program framework has built-in accessibility features. For non-native components, developers can add the following accessibility labels.

aria-activedescendant aria-atomic aria-autocomplete
aria-colcount aria-colindex aria-colspan
aria-describedby aria-details aria-disabled
aria-expanded aria-flowto aria-grabbed
aria-invalid aria-keyshortcuts aria-label
aria-live aria-modal aria-multiline
aria-owns aria-placeholder aria-posinset
aria-relevant aria-required aria-role
aria-rowindex aria-rowspan aria-selected
aria-valuemax aria-valuemin aria-valuenow

Sample Code

<view aria-role="button" aria-label="Submit Form">Submit</view>
© FinClip with ❤ , Since 2017