提交 f9b89d85 编写于 作者: E ester.zhou

Update docs (16423)

Signed-off-by: Nester.zhou <ester.zhou@huawei.com>
上级 c13bab30
...@@ -68,20 +68,20 @@ Describes the target action supported by an accessibility application. ...@@ -68,20 +68,20 @@ Describes the target action supported by an accessibility application.
| -------- | -------- | | -------- | -------- |
| click | Clicking.| | click | Clicking.|
| longClick | Long pressing.| | longClick | Long pressing.|
| scrollForward | Scrolling forward.| | scrollForward | Scrolling forward. Not supported currently. |
| scrollBackward | Scrolling backward.| | scrollBackward | Scrolling backward. Not supported currently. |
| focus | Obtaining focus.| | focus | Obtaining focus. Not supported currently. |
| clearFocus | Clearing focus.| | clearFocus | Clearing focus. Not supported currently. |
| clearSelection | Clearing selection.| | clearSelection | Clearing selection. Not supported currently. |
| accessibilityFocus | Obtaining the accessibility focus.| | accessibilityFocus | Obtaining the accessibility focus. |
| clearAccessibilityFocus | Clearing the accessibility focus.| | clearAccessibilityFocus | Clearing the accessibility focus. |
| cut | Cut.| | cut | Cut. Not supported currently. |
| copy | Copy.| | copy | Copy. Not supported currently. |
| paste | Paste.| | paste | Paste. Not supported currently. |
| select | Select.| | select | Select. Not supported currently. |
| setText | Setting the text.| | setText | Setting the text. Not supported currently. |
| delete | Delete.| | delete | Delete. Not supported currently. |
| setSelection | Setting the selection.| | setSelection | Setting the selection. Not supported currently. |
## Capability ## Capability
...@@ -94,7 +94,7 @@ Enumerates the capabilities of an accessibility application. ...@@ -94,7 +94,7 @@ Enumerates the capabilities of an accessibility application.
| retrieve | Capability to retrieve the window content.| | retrieve | Capability to retrieve the window content.|
| touchGuide | Capability of touch guide mode.| | touchGuide | Capability of touch guide mode.|
| keyEventObserver | Capability to filter key events.| | keyEventObserver | Capability to filter key events.|
| zoom | Capability to control the display zoom level.| | zoom | Capability to control the display zoom level. Not supported currently. |
| gesture | Capability to perform gesture actions.| | gesture | Capability to perform gesture actions.|
## CaptionsFontEdgeType<sup>8+</sup> ## CaptionsFontEdgeType<sup>8+</sup>
...@@ -279,15 +279,15 @@ Describes a GUI change event. ...@@ -279,15 +279,15 @@ Describes a GUI change event.
| bundleName | string | Yes| Yes| Target application name.| | bundleName | string | Yes| Yes| Target application name.|
| componentType | string | Yes| Yes| Type of the event source component, for example, button or chart.| | componentType | string | Yes| Yes| Type of the event source component, for example, button or chart.|
| pageId | number | Yes| Yes| Page ID of the event source.| | pageId | number | Yes| Yes| Page ID of the event source.|
| description | string | Yes| Yes| Event description.| | description | string | Yes| Yes| Event description. Not supported currently. |
| triggerAction | [Action](#action) | Yes| Yes| Action that triggers the event.| | triggerAction | [Action](#action) | Yes| Yes| Action that triggers the event.|
| textMoveUnit | [TextMoveUnit](#textmoveunit) | Yes| Yes| Text movement unit.| | textMoveUnit | [TextMoveUnit](#textmoveunit) | Yes| Yes| Text movement unit. Not supported currently. |
| contents | Array&lt;string&gt; | Yes| Yes| Array of contents.| | contents | Array&lt;string&gt; | Yes| Yes| Array of contents.|
| lastContent | string | Yes| Yes| Latest content.| | lastContent | string | Yes| Yes| Latest content.|
| beginIndex | number | Yes| Yes| Sequence number of the first item displayed on the page.| | beginIndex | number | Yes| Yes| Sequence number of the first item displayed on the page. Not supported currently. |
| currentIndex | number | Yes| Yes| Sequence number of the current item.| | currentIndex | number | Yes| Yes| Sequence number of the current item. Not supported currently. |
| endIndex | number | Yes| Yes| Sequence number of the last item displayed on the page.| | endIndex | number | Yes| Yes| Sequence number of the last item displayed on the page. Not supported currently. |
| itemCount | number | Yes| Yes| Total number of items.| | itemCount | number | Yes| Yes| Total number of items. Not supported currently. |
### constructor ### constructor
...@@ -323,13 +323,13 @@ Enumerates accessibility event types. ...@@ -323,13 +323,13 @@ Enumerates accessibility event types.
| -------- | -------- | | -------- | -------- |
| click | Event of clicking a component.| | click | Event of clicking a component.|
| longClick | Event of long-pressing a component.| | longClick | Event of long-pressing a component.|
| select | Event of selecting a component.| | select | Event of selecting a component. Not supported currently. |
| focus | Event indicating that the component obtains the focus.| | focus | Event indicating that the component obtains the focus. Not supported currently. |
| textUpdate | Event indicating that the component text has been updated.| | textUpdate | Event indicating that the component text has been updated. Not supported currently. |
| hoverEnter | Event indicating that the hover enters a component.| | hoverEnter | Event indicating that the hover enters a component. Not supported currently. |
| hoverExit | Event indicating that the hover exits a component.| | hoverExit | Event indicating that the hover exits a component. Not supported currently. |
| scroll | Event of the scroll view.| | scroll | Event of the scroll view. Not supported currently. |
| textSelectionUpdate | Event indicating that the selected text has been updated.| | textSelectionUpdate | Event indicating that the selected text has been updated. Not supported currently. |
| accessibilityFocus | Event indicating that the accessibility focus has been obtained.| | accessibilityFocus | Event indicating that the accessibility focus has been obtained.|
| accessibilityFocusClear | Event indicating that the accessibility focus has been cleared.| | accessibilityFocusClear | Event indicating that the accessibility focus has been cleared.|
......
...@@ -16,9 +16,9 @@ import AccessibilityExtensionAbility from '@ohos.application.AccessibilityExtens ...@@ -16,9 +16,9 @@ import AccessibilityExtensionAbility from '@ohos.application.AccessibilityExtens
**System capability**: SystemCapability.BarrierFree.Accessibility.Core **System capability**: SystemCapability.BarrierFree.Accessibility.Core
| Name | Type| Readable| Writable| Description | | Name | Type | Readable | Writable | Description |
| --------- | -------- | ---- | ---- | ------------------------- | | ------- | ---------------------------------------- | ---- | ---- | ------------ |
| context | [AccessibilityExtensionContext](js-apis-inner-application-accessibilityExtensionContext.md) | Yes| No| Context of the accessibility extension ability.| | context | [AccessibilityExtensionContext](js-apis-inner-application-accessibilityExtensionContext.md) | Yes | No | Context of the accessibility extension ability.|
## AccessibilityEvent ## AccessibilityEvent
...@@ -28,10 +28,10 @@ Defines an accessibility event. ...@@ -28,10 +28,10 @@ Defines an accessibility event.
### Attributes ### Attributes
| Name | Type | Readable | Writable | Description | | Name | Type | Readable| Writable| Description |
| --------- | ---------------------------------------- | ---- | ---- | ---------- | | --------- | ------------------------------------------------------------ | ---- | ---- | ------------------------------------------------------------ |
| eventType | [accessibility.EventType](js-apis-accessibility.md#EventType) \| [accessibility.WindowUpdateType](js-apis-accessibility.md#WindowUpdateType) \| [TouchGuideType](#touchguidetype) \| [GestureType](#gesturetype) \| [PageUpdateType](#pageupdatetype) | Yes | No | Event type. | | eventType | [accessibility.EventType](js-apis-accessibility.md#EventType) \| [accessibility.WindowUpdateType](js-apis-accessibility.md#WindowUpdateType)\| [TouchGuideType](#touchguidetype) \| [GestureType](#gesturetype) \| [PageUpdateType](#pageupdatetype) | Yes | No | Event type.<br>**EventType**: accessibility event type.<br>**WindowUpdateType**: Window update type.<br>**TouchGuideType**: touch guide event type.<br>**GestureType**: gesture type.<br>**PageUpdateType**: page update type, which is not supported currently.|
| target | [AccessibilityElement](js-apis-inner-application-accessibilityExtensionContext.md#accessibilityelement9) | Yes | No | Target component where the event occurs.| | target | [AccessibilityElement](js-apis-inner-application-accessibilityExtensionContext.md#accessibilityelement9) | Yes | No | Target component where the event occurs. |
| timeStamp | number | Yes | No | Timestamp of the event. | | timeStamp | number | Yes | No | Timestamp of the event. |
## GestureType ## GestureType
...@@ -41,34 +41,34 @@ Enumerates gesture types. ...@@ -41,34 +41,34 @@ Enumerates gesture types.
**System capability**: SystemCapability.BarrierFree.Accessibility.Core **System capability**: SystemCapability.BarrierFree.Accessibility.Core
| Name | Description | | Name | Description |
| ------------- | ------------ | | ------------- | ------------------- |
| left | Left gesture. String type. | | left | Left gesture. String type. |
| leftThenRight | Left-then-right gesture. String type. | | leftThenRight | Left-then-right gesture. String type.|
| leftThenUp | Left-then-up gesture. String type. | | leftThenUp | Left-then-up gesture. String type.|
| leftThenDown | Left-then-down gesture. String type. | | leftThenDown | Left-then-down gesture. String type.|
| right | Right gesture. String type. | | right | Right gesture. String type. |
| rightThenLeft | Right-then-left gesture. String type. | | rightThenLeft | Right-then-left gesture. String type.|
| rightThenUp | Right-then-up gesture. String type. | | rightThenUp | Right-then-up gesture. String type.|
| rightThenDown | Right-then-down gesture. String type. | | rightThenDown | Right-then-down gesture. String type.|
| up | Up gesture. String type. | | up | Up gesture. String type. |
| upThenLeft | Up-then-left gesture. String type. | | upThenLeft | Up-then-left gesture. String type.|
| upThenRight | Up-then-right gesture. String type. | | upThenRight | Up-then-right gesture. String type.|
| upThenDown | Up-then-down gesture. String type. | | upThenDown | Up-then-down gesture. String type.|
| down | Down gesture. String type. | | down | Down gesture. String type. |
| downThenLeft | Down-then-left gesture. String type. | | downThenLeft | Down-then-left gesture. String type.|
| downThenRight | Down-then-right gesture. String type. | | downThenRight | Down-then-right gesture. String type.|
| downThenUp | Down-then-up gesture. String type. | | downThenUp | Down-then-up gesture. String type.|
## PageUpdateType ## PageUpdateType
Enumerates the page update types. Enumerates the page update types. This API is not supported currently.
**System capability**: SystemCapability.BarrierFree.Accessibility.Core **System capability**: SystemCapability.BarrierFree.Accessibility.Core
| Name | Description | | Name | Description |
| ----------------- | --------- | | ----------------- | ---------------- |
| pageContentUpdate | Update of the page content. String type. | | pageContentUpdate | Update of the page content. String type.|
| pageStateUpdate | Update of the page status. String type. | | pageStateUpdate | Update of the page status. String type.|
## TouchGuideType ## TouchGuideType
...@@ -77,9 +77,9 @@ Enumerates the touch guide event types. ...@@ -77,9 +77,9 @@ Enumerates the touch guide event types.
**System capability**: SystemCapability.BarrierFree.Accessibility.Core **System capability**: SystemCapability.BarrierFree.Accessibility.Core
| Name | Description | | Name | Description |
| ---------- | ------------ | | ---------- | ------------------- |
| touchBegin | Start of touch in touch guide mode. String type. | | touchBegin | Start of touch in touch guide mode. String type.|
| touchEnd | End of touch in touch guide mode. String type. | | touchEnd | End of touch in touch guide mode. String type.|
## AccessibilityExtensionAbility.onConnect ## AccessibilityExtensionAbility.onConnect
......
...@@ -92,7 +92,7 @@ Sets the concerned target bundle. This API uses a promise to return the result. ...@@ -92,7 +92,7 @@ Sets the concerned target bundle. This API uses a promise to return the result.
**Return value** **Return value**
| Type | Description | | Type | Description |
| ---------------------- | --------------------- | | ------------------- | ---------------- |
| Promise&lt;void&gt; | Promise that returns no value.| | Promise&lt;void&gt; | Promise that returns no value.|
**Example** **Example**
...@@ -121,8 +121,8 @@ Sets the concerned target bundle. This API uses an asynchronous callback to retu ...@@ -121,8 +121,8 @@ Sets the concerned target bundle. This API uses an asynchronous callback to retu
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| ----------- | ------------------- | ---- | -------- | | ----------- | ------------------------- | ---- | ---------------------------------------- |
| targetNames | Array&lt;string&gt; | Yes | Name of the target bundle.| | targetNames | Array&lt;string&gt; | Yes | Name of the target bundle. |
| callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the result. If the operation fails, **error** that contains data is returned.| | callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the result. If the operation fails, **error** that contains data is returned.|
**Example** **Example**
...@@ -166,8 +166,8 @@ Obtains the focus element. This API uses a promise to return the result. ...@@ -166,8 +166,8 @@ Obtains the focus element. This API uses a promise to return the result.
For details about the error codes, see [Accessibility Error Codes](../errorcodes/errorcode-accessibility.md). For details about the error codes, see [Accessibility Error Codes](../errorcodes/errorcode-accessibility.md).
| ID| Error Message| | ID | Error Message |
| ------- | -------------------------------- | | ------- | ---------------------------------------- |
| 9300003 | Do not have accessibility right for this operation. | | 9300003 | Do not have accessibility right for this operation. |
**Example** **Example**
...@@ -196,16 +196,16 @@ Obtains the focus element. This API uses an asynchronous callback to return the ...@@ -196,16 +196,16 @@ Obtains the focus element. This API uses an asynchronous callback to return the
**Parameters** **Parameters**
| Name| Type| Mandatory| Description| | Name | Type | Mandatory | Description |
| -------- | -------- | -------- | -------- | | -------- | ---------------------------------------- | ---- | ----------------- |
| callback | AsyncCallback&lt;AccessibilityElement&gt; | Yes | Callback used to return the current focus element.| | callback | AsyncCallback&lt;AccessibilityElement&gt; | Yes | Callback used to return the current focus element.|
**Error codes** **Error codes**
For details about the error codes, see [Accessibility Error Codes](../errorcodes/errorcode-accessibility.md). For details about the error codes, see [Accessibility Error Codes](../errorcodes/errorcode-accessibility.md).
| ID| Error Message| | ID | Error Message |
| ------- | -------------------------------- | | ------- | ---------------------------------------- |
| 9300003 | Do not have accessibility right for this operation. | | 9300003 | Do not have accessibility right for this operation. |
**Example** **Example**
...@@ -237,8 +237,8 @@ Obtains the focus element. This API uses an asynchronous callback to return the ...@@ -237,8 +237,8 @@ Obtains the focus element. This API uses an asynchronous callback to return the
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| -------------------- | ------- | ---- | ------------------- | | -------------------- | ---------------------------------------- | ---- | ----------------- |
| isAccessibilityFocus | boolean | Yes | Whether the obtained focus element is an accessibility focus.| | isAccessibilityFocus | boolean | Yes | Whether the obtained focus element is an accessibility focus. |
| callback | AsyncCallback&lt;AccessibilityElement&gt; | Yes | Callback used to return the current focus element.| | callback | AsyncCallback&lt;AccessibilityElement&gt; | Yes | Callback used to return the current focus element.|
**Example** **Example**
...@@ -270,7 +270,7 @@ Obtains the root element of a window. This API uses a promise to return the resu ...@@ -270,7 +270,7 @@ Obtains the root element of a window. This API uses a promise to return the resu
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| -------------------- | ------- | ---- | ------------------- | | -------- | ------ | ---- | ---------------------- |
| windowId | number | No | Window for which you want to obtain the root element. If this parameter is not specified, it indicates the current active window.| | windowId | number | No | Window for which you want to obtain the root element. If this parameter is not specified, it indicates the current active window.|
**Return value** **Return value**
...@@ -283,8 +283,8 @@ Obtains the root element of a window. This API uses a promise to return the resu ...@@ -283,8 +283,8 @@ Obtains the root element of a window. This API uses a promise to return the resu
For details about the error codes, see [Accessibility Error Codes](../errorcodes/errorcode-accessibility.md). For details about the error codes, see [Accessibility Error Codes](../errorcodes/errorcode-accessibility.md).
| ID| Error Message| | ID | Error Message |
| ------- | -------------------------------- | | ------- | ---------------------------------------- |
| 9300003 | Do not have accessibility right for this operation. | | 9300003 | Do not have accessibility right for this operation. |
**Example** **Example**
...@@ -313,16 +313,16 @@ Obtains the root element of a window. This API uses an asynchronous callback to ...@@ -313,16 +313,16 @@ Obtains the root element of a window. This API uses an asynchronous callback to
**Parameters** **Parameters**
| Name| Type| Mandatory| Description| | Name | Type | Mandatory | Description |
| -------- | -------- | -------- | -------- | | -------- | ---------------------------------------- | ---- | ------------------ |
| callback | AsyncCallback&lt;AccessibilityElement&gt; | Yes | Callback used to return the root element.| | callback | AsyncCallback&lt;AccessibilityElement&gt; | Yes | Callback used to return the root element.|
**Error codes** **Error codes**
For details about the error codes, see [Accessibility Error Codes](../errorcodes/errorcode-accessibility.md). For details about the error codes, see [Accessibility Error Codes](../errorcodes/errorcode-accessibility.md).
| ID| Error Message| | ID | Error Message |
| ------- | -------------------------------- | | ------- | ---------------------------------------- |
| 9300003 | Do not have accessibility right for this operation. | | 9300003 | Do not have accessibility right for this operation. |
**Example** **Example**
...@@ -354,16 +354,16 @@ Obtains the root element of a window. This API uses an asynchronous callback to ...@@ -354,16 +354,16 @@ Obtains the root element of a window. This API uses an asynchronous callback to
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| -------------------- | ------- | ---- | ------------------- | | -------- | ---------------------------------------- | ---- | ---------------------- |
| windowId | number | Yes | Window for which you want to obtain the root element. If this parameter is not specified, it indicates the current active window.| | windowId | number | Yes | Window for which you want to obtain the root element. If this parameter is not specified, it indicates the current active window.|
| callback | AsyncCallback&lt;AccessibilityElement&gt; | Yes | Callback used to return the root element.| | callback | AsyncCallback&lt;AccessibilityElement&gt; | Yes | Callback used to return the root element. |
**Error codes** **Error codes**
For details about the error codes, see [Accessibility Error Codes](../errorcodes/errorcode-accessibility.md). For details about the error codes, see [Accessibility Error Codes](../errorcodes/errorcode-accessibility.md).
| ID| Error Message| | ID | Error Message |
| ------- | -------------------------------- | | ------- | ---------------------------------------- |
| 9300003 | Do not have accessibility right for this operation. | | 9300003 | Do not have accessibility right for this operation. |
**Example** **Example**
...@@ -396,21 +396,21 @@ Obtains the list of windows on a display. This API uses a promise to return the ...@@ -396,21 +396,21 @@ Obtains the list of windows on a display. This API uses a promise to return the
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| -------------------- | ------- | ---- | ------------------- | | --------- | ------ | ---- | --------------------- |
| displayId | number | No | ID of the display from which the window information is obtained. If this parameter is not specified, it indicates the default main display.| | displayId | number | No | ID of the display from which the window information is obtained. If this parameter is not specified, it indicates the default main display.|
**Return value** **Return value**
| Type | Description | | Type | Description |
| ----------------------------------- | ---------------------- | | ---------------------------------------- | ---------------------- |
| Promise&lt;Array&lt;AccessibilityElement&gt;&gt; | Promise used to return the window list.| | Promise&lt;Array&lt;AccessibilityElement&gt;&gt; | Promise used to return the window list.|
**Error codes** **Error codes**
For details about the error codes, see [Accessibility Error Codes](../errorcodes/errorcode-accessibility.md). For details about the error codes, see [Accessibility Error Codes](../errorcodes/errorcode-accessibility.md).
| ID| Error Message| | ID | Error Message |
| ------- | -------------------------------- | | ------- | ---------------------------------------- |
| 9300003 | Do not have accessibility right for this operation. | | 9300003 | Do not have accessibility right for this operation. |
**Example** **Example**
...@@ -439,16 +439,16 @@ Obtains the list of windows on a display. This API uses an asynchronous callback ...@@ -439,16 +439,16 @@ Obtains the list of windows on a display. This API uses an asynchronous callback
**Parameters** **Parameters**
| Name| Type| Mandatory| Description| | Name | Type | Mandatory | Description |
| -------- | -------- | -------- | -------- | | -------- | ---------------------------------------- | ---- | ----------------- |
| callback | AsyncCallback&lt;Array&lt;AccessibilityElement&gt;&gt; | Yes | Callback used to return the window list.| | callback | AsyncCallback&lt;Array&lt;AccessibilityElement&gt;&gt; | Yes | Callback used to return the window list.|
**Error codes** **Error codes**
For details about the error codes, see [Accessibility Error Codes](../errorcodes/errorcode-accessibility.md). For details about the error codes, see [Accessibility Error Codes](../errorcodes/errorcode-accessibility.md).
| ID| Error Message| | ID | Error Message |
| ------- | -------------------------------- | | ------- | ---------------------------------------- |
| 9300003 | Do not have accessibility right for this operation. | | 9300003 | Do not have accessibility right for this operation. |
**Example** **Example**
...@@ -480,16 +480,16 @@ Obtains the list of windows on a display. This API uses an asynchronous callback ...@@ -480,16 +480,16 @@ Obtains the list of windows on a display. This API uses an asynchronous callback
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| -------------------- | ------- | ---- | ------------------- | | --------- | ---------------------------------------- | ---- | --------------------- |
| displayId | number | Yes | ID of the display from which the window information is obtained. If this parameter is not specified, it indicates the default main display.| | displayId | number | Yes | ID of the display from which the window information is obtained. If this parameter is not specified, it indicates the default main display.|
| callback | AsyncCallback&lt;Array&lt;AccessibilityElement&gt;&gt; | Yes | Callback used to return the window list.| | callback | AsyncCallback&lt;Array&lt;AccessibilityElement&gt;&gt; | Yes | Callback used to return the window list. |
**Error codes** **Error codes**
For details about the error codes, see [Accessibility Error Codes](../errorcodes/errorcode-accessibility.md). For details about the error codes, see [Accessibility Error Codes](../errorcodes/errorcode-accessibility.md).
| ID| Error Message| | ID | Error Message |
| ------- | -------------------------------- | | ------- | ---------------------------------------- |
| 9300003 | Do not have accessibility right for this operation. | | 9300003 | Do not have accessibility right for this operation. |
**Example** **Example**
...@@ -522,21 +522,21 @@ Inject a gesture. This API uses a promise to return the result. ...@@ -522,21 +522,21 @@ Inject a gesture. This API uses a promise to return the result.
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| ----------- | ---------------------------------------- | ---- | -------------- | | ----------- | ---------------------------------------- | ---- | ---------- |
| gesturePath | [GesturePath](js-apis-accessibility-GesturePath.md#gesturepath) | Yes | Path of the gesture to inject. | | gesturePath | [GesturePath](js-apis-accessibility-GesturePath.md#gesturepath) | Yes | Path of the gesture to inject.|
**Return value** **Return value**
| Type | Description | | Type | Description |
| ----------------------------------- | ---------------------- | | ------------------- | ---------------- |
| Promise&lt;void&gt; | Promise that returns no value.| | Promise&lt;void&gt; | Promise that returns no value.|
**Error codes** **Error codes**
For details about the error codes, see [Accessibility Error Codes](../errorcodes/errorcode-accessibility.md). For details about the error codes, see [Accessibility Error Codes](../errorcodes/errorcode-accessibility.md).
| ID| Error Message| | ID | Error Message |
| ------- | -------------------------------- | | ------- | ---------------------------------------- |
| 9300003 | Do not have accessibility right for this operation. | | 9300003 | Do not have accessibility right for this operation. |
**Example** **Example**
...@@ -570,7 +570,7 @@ Inject a gesture. This API uses an asynchronous callback to return the result. ...@@ -570,7 +570,7 @@ Inject a gesture. This API uses an asynchronous callback to return the result.
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| ----------- | ---------------------------------------- | ---- | -------------- | | ----------- | ---------------------------------------- | ---- | ------------------- |
| gesturePath | [GesturePath](js-apis-accessibility-GesturePath.md#gesturepath) | Yes | Path of the gesture to inject. | | gesturePath | [GesturePath](js-apis-accessibility-GesturePath.md#gesturepath) | Yes | Path of the gesture to inject. |
| callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the result.| | callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the result.|
...@@ -578,8 +578,8 @@ Inject a gesture. This API uses an asynchronous callback to return the result. ...@@ -578,8 +578,8 @@ Inject a gesture. This API uses an asynchronous callback to return the result.
For details about the error codes, see [Accessibility Error Codes](../errorcodes/errorcode-accessibility.md). For details about the error codes, see [Accessibility Error Codes](../errorcodes/errorcode-accessibility.md).
| ID| Error Message| | ID | Error Message |
| ------- | -------------------------------- | | ------- | ---------------------------------------- |
| 9300003 | Do not have accessibility right for this operation. | | 9300003 | Do not have accessibility right for this operation. |
**Example** **Example**
...@@ -621,7 +621,7 @@ Obtains all attribute names of this element. This API uses a promise to return t ...@@ -621,7 +621,7 @@ Obtains all attribute names of this element. This API uses a promise to return t
**Return value** **Return value**
| Type | Description | | Type | Description |
| ---------------------------------------- | ------------------------ | | ----------------------------- | ------------------------ |
| Promise&lt;Array&lt;T&gt;&gt; | Promise used to return all attribute names of the element.| | Promise&lt;Array&lt;T&gt;&gt; | Promise used to return all attribute names of the element.|
**Example** **Example**
...@@ -647,7 +647,7 @@ Obtains all attribute names of this element. This API uses an asynchronous callb ...@@ -647,7 +647,7 @@ Obtains all attribute names of this element. This API uses an asynchronous callb
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| ----------- | ---------------------------------------- | ---- | -------------- | | -------- | ----------------------------------- | ---- | ------------------- |
| callback | AsyncCallback&lt;Array&lt;T&gt;&gt; | Yes | Callback used to return all attribute names of the element.| | callback | AsyncCallback&lt;Array&lt;T&gt;&gt; | Yes | Callback used to return all attribute names of the element.|
**Example** **Example**
...@@ -675,21 +675,21 @@ Obtains the attribute value based on an attribute name. This API uses a promise ...@@ -675,21 +675,21 @@ Obtains the attribute value based on an attribute name. This API uses a promise
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| ----------- | ---------------------------------------- | ---- | -------------- | | ------------- | ---- | ---- | -------- |
| attributeName | T | Yes | Attribute name. | | attributeName | T | Yes | Attribute name.|
**Return value** **Return value**
| Type | Description | | Type | Description |
| ---------------------------------------- | ------------------------ | | ---------------------------------------- | --------------------------- |
| Promise&lt;ElementAttributeValues[T]&gt; | Promise used to return the attribute value.| | Promise&lt;ElementAttributeValues[T]&gt; | Promise used to return the attribute value.|
**Error codes** **Error codes**
For details about the error codes, see [Accessibility Error Codes](../errorcodes/errorcode-accessibility.md). For details about the error codes, see [Accessibility Error Codes](../errorcodes/errorcode-accessibility.md).
| ID| Error Message| | ID | Error Message |
| ------- | -------------------------------- | | ------- | ----------------------------- |
| 9300004 | This property does not exist. | | 9300004 | This property does not exist. |
**Example** **Example**
...@@ -721,7 +721,7 @@ Obtains the attribute value based on an attribute name. This API uses an asynchr ...@@ -721,7 +721,7 @@ Obtains the attribute value based on an attribute name. This API uses an asynchr
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| ----------- | ---------------------------------------- | ---- | -------------- | | ------------- | ---------------------------------------- | ---- | ---------------------- |
| attributeName | T | Yes | Attribute name. | | attributeName | T | Yes | Attribute name. |
| callback | AsyncCallback&lt;ElementAttributeValues[T]&gt; | Yes | Callback used to return the attribute value.| | callback | AsyncCallback&lt;ElementAttributeValues[T]&gt; | Yes | Callback used to return the attribute value.|
...@@ -729,8 +729,8 @@ Obtains the attribute value based on an attribute name. This API uses an asynchr ...@@ -729,8 +729,8 @@ Obtains the attribute value based on an attribute name. This API uses an asynchr
For details about the error codes, see [Accessibility Error Codes](../errorcodes/errorcode-accessibility.md). For details about the error codes, see [Accessibility Error Codes](../errorcodes/errorcode-accessibility.md).
| ID| Error Message| | ID | Error Message |
| ------- | -------------------------------- | | ------- | ----------------------------- |
| 9300004 | This property does not exist. | | 9300004 | This property does not exist. |
**Example** **Example**
...@@ -763,7 +763,7 @@ Obtains the names of all actions supported by this element. This API uses a prom ...@@ -763,7 +763,7 @@ Obtains the names of all actions supported by this element. This API uses a prom
**Return value** **Return value**
| Type | Description | | Type | Description |
| ---------------------------------------- | ------------------------ | | ---------------------------------- | -------------------------- |
| Promise&lt;Array&lt;string&gt;&gt; | Promise used to return the names of all actions supported by the element.| | Promise&lt;Array&lt;string&gt;&gt; | Promise used to return the names of all actions supported by the element.|
**Example** **Example**
...@@ -789,7 +789,7 @@ Obtains the names of all actions supported by this element. This API uses an asy ...@@ -789,7 +789,7 @@ Obtains the names of all actions supported by this element. This API uses an asy
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| ----------- | ---------------------------------------- | ---- | -------------- | | -------- | ---------------------------------------- | ---- | --------------------- |
| callback | AsyncCallback&lt;Array&lt;string&gt;&gt; | Yes | Callback used to return the names of all actions supported by the element.| | callback | AsyncCallback&lt;Array&lt;string&gt;&gt; | Yes | Callback used to return the names of all actions supported by the element.|
**Example** **Example**
...@@ -818,21 +818,21 @@ Performs an action based on the specified action name. This API uses a promise t ...@@ -818,21 +818,21 @@ Performs an action based on the specified action name. This API uses a promise t
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| ----------- | ---------------------------------------- | ---- | -------------- | | ----------- | ---------------------------------------- | ---- | -------------- |
| actionName | string | Yes | Action name. For details, see [Action](./js-apis-accessibility.md#action). | actionName | string | Yes | Action name. For details, see [Action](./js-apis-accessibility.md#action). |
| parameters | object | No | Parameter required for performing the target action. | | parameters | object | No | Parameters required for performing the target action. Not supported currently. |
**Return value** **Return value**
| Type | Description | | Type | Description |
| ---------------------------------------- | ------------------------ | | ------------------- | ---------------- |
| Promise&lt;void&gt; | Promise that returns no value.| | Promise&lt;void&gt; | Promise that returns no value.|
**Error codes** **Error codes**
For details about the error codes, see [Accessibility Error Codes](../errorcodes/errorcode-accessibility.md). For details about the error codes, see [Accessibility Error Codes](../errorcodes/errorcode-accessibility.md).
| ID| Error Message| | ID | Error Message |
| ------- | -------------------------------- | | ------- | ----------------------------- |
| 9300005 | This action is not supported. | | 9300005 | This action is not supported. |
**Example** **Example**
...@@ -861,15 +861,15 @@ Performs an action based on the specified action name. This API uses an asynchro ...@@ -861,15 +861,15 @@ Performs an action based on the specified action name. This API uses an asynchro
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| ----------- | ---------------------------------------- | ---- | -------------- | | ----------- | ---------------------------------------- | ---- | -------------- |
| actionName | string | Yes | Action name. For details, see [Action](./js-apis-accessibility.md#action). | actionName | string | Yes | Action name. For details, see [Action](./js-apis-accessibility.md#action). |
| callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the result.| | callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the result.|
**Error codes** **Error codes**
For details about the error codes, see [Accessibility Error Codes](../errorcodes/errorcode-accessibility.md). For details about the error codes, see [Accessibility Error Codes](../errorcodes/errorcode-accessibility.md).
| ID| Error Message| | ID | Error Message |
| ------- | -------------------------------- | | ------- | ----------------------------- |
| 9300005 | This action is not supported. | | 9300005 | This action is not supported. |
**Example** **Example**
...@@ -899,17 +899,17 @@ Performs an action based on the specified action name. This API uses an asynchro ...@@ -899,17 +899,17 @@ Performs an action based on the specified action name. This API uses an asynchro
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| ----------- | ---------------------------------------- | ---- | -------------- | | ---------- | ------------------------- | ---- | ---------------------------------------- |
| actionName | string | Yes | Action name. For details, see [Action](./js-apis-accessibility.md#action).| | actionName | string | Yes | Action name. For details, see [Action](./js-apis-accessibility.md#action).|
| parameters | object | Yes | Parameter required for performing the target action. | | parameters | object | Yes | Parameters required for performing the target action. Not supported currently. |
| callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the result.| | callback | AsyncCallback&lt;void&gt; | Yes | Callback used to return the result. |
**Error codes** **Error codes**
For details about the error codes, see [Accessibility Error Codes](../errorcodes/errorcode-accessibility.md). For details about the error codes, see [Accessibility Error Codes](../errorcodes/errorcode-accessibility.md).
| ID| Error Message| | ID | Error Message |
| ------- | -------------------------------- | | ------- | ----------------------------- |
| 9300005 | This action is not supported. | | 9300005 | This action is not supported. |
**Example** **Example**
...@@ -943,14 +943,14 @@ Queries the element information of the **content** type. This API uses a promise ...@@ -943,14 +943,14 @@ Queries the element information of the **content** type. This API uses a promise
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| ----------- | ---------------------------------------- | ---- | -------------- | | --------- | ------ | ---- | ----------------------------- |
| type | string | Yes | Information type. The value is fixed at **'content'**. | | type | string | Yes | Information type. The value is fixed at **'content'**.|
| condition | string | Yes | Search criteria. | | condition | string | Yes | Search criteria. |
**Return value** **Return value**
| Type | Description | | Type | Description |
| ---------------------------------------- | ------------------------ | | ---------------------------------------- | ----------------------------- |
| Promise&lt;Array&lt;AccessibilityElement&gt;&gt; | Promise used to return the result.| | Promise&lt;Array&lt;AccessibilityElement&gt;&gt; | Promise used to return the result.|
**Example** **Example**
...@@ -982,10 +982,10 @@ Queries the element information of the **content** type. This API uses an asynch ...@@ -982,10 +982,10 @@ Queries the element information of the **content** type. This API uses an asynch
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| ----------- | ---------------------------------------- | ---- | -------------- | | --------- | ---------------------------------------- | ---- | ---------------------------- |
| type | string | Yes | Information type. The value is fixed at **'content'**. | | type | string | Yes | Information type. The value is fixed at **'content'**.|
| condition | string | Yes | Search criteria. | | condition | string | Yes | Search criteria. |
| callback | AsyncCallback&lt;Array&lt;AccessibilityElement&gt;&gt; | Yes | Callback used to return the result.| | callback | AsyncCallback&lt;Array&lt;AccessibilityElement&gt;&gt; | Yes | Callback used to return the result. |
**Example** **Example**
...@@ -1018,14 +1018,14 @@ Queries the element information of the **focusType** type. This API uses a promi ...@@ -1018,14 +1018,14 @@ Queries the element information of the **focusType** type. This API uses a promi
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| ----------- | ---------------------------------------- | ---- | -------------- | | --------- | ----------------------- | ---- | ---------------------------------- |
| type | string | Yes | Information type. The value is fixed at **'focusType'**. | | type | string | Yes | Information type. The value is fixed at **'focusType'**.|
| condition | [FocusType](#focustype) | Yes | Enumerates the focus types. | | condition | [FocusType](#focustype) | Yes | Enumerates the focus types. |
**Return value** **Return value**
| Type | Description | | Type | Description |
| ---------------------------------------- | ------------------------ | | ----------------------------------- | ------------------------------ |
| Promise&lt;AccessibilityElement&gt; | Promise used to return the result.| | Promise&lt;AccessibilityElement&gt; | Promise used to return the result.|
**Example** **Example**
...@@ -1057,10 +1057,10 @@ Queries the element information of the **focusType** type. This API uses an asyn ...@@ -1057,10 +1057,10 @@ Queries the element information of the **focusType** type. This API uses an asyn
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| ----------- | ---------------------------------------- | ---- | -------------- | | --------- | ---------------------------------------- | ---- | ---------------------------------- |
| type | string | Yes | Information type. The value is fixed at **'focusType'**. | | type | string | Yes | Information type. The value is fixed at **'focusType'**.|
| condition | [FocusType](#focustype) | Yes | Enumerates the focus types. | | condition | [FocusType](#focustype) | Yes | Enumerates the focus types. |
| callback | AsyncCallback&lt;AccessibilityElement&gt; | Yes | Callback used to return the result.| | callback | AsyncCallback&lt;AccessibilityElement&gt; | Yes | Callback used to return the result. |
**Example** **Example**
...@@ -1093,14 +1093,14 @@ Queries the element information of the **focusDirection** type. This API uses a ...@@ -1093,14 +1093,14 @@ Queries the element information of the **focusDirection** type. This API uses a
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| ----------- | ---------------------------------------- | ---- | -------------- | | --------- | --------------------------------- | ---- | ---------------------------------------- |
| type | string | Yes | Information type. The value is fixed at **'focusDirection'**. | | type | string | Yes | Information type. The value is fixed at **'focusDirection'**.|
| condition | [FocusDirection](#focusdirection) | Yes | Enumerates the focus directions. | | condition | [FocusDirection](#focusdirection) | Yes | Enumerates the focus directions. |
**Return value** **Return value**
| Type | Description | | Type | Description |
| ---------------------------------------- | ------------------------ | | ----------------------------------- | -------------------------------- |
| Promise&lt;AccessibilityElement&gt; | Promise used to return the result.| | Promise&lt;AccessibilityElement&gt; | Promise used to return the result.|
**Example** **Example**
...@@ -1132,10 +1132,10 @@ Queries the element information of the **focusDirection** type. This API uses an ...@@ -1132,10 +1132,10 @@ Queries the element information of the **focusDirection** type. This API uses an
**Parameters** **Parameters**
| Name | Type | Mandatory | Description | | Name | Type | Mandatory | Description |
| ----------- | ---------------------------------------- | ---- | -------------- | | --------- | ---------------------------------------- | ---- | ---------------------------------------- |
| type | string | Yes | Information type. The value is fixed at **'focusDirection'**. | | type | string | Yes | Information type. The value is fixed at **'focusDirection'**.|
| condition | [FocusDirection](#focusdirection) | Yes | Direction of the next focus element. | | condition | [FocusDirection](#focusdirection) | Yes | Direction of the next focus element. |
| callback | AsyncCallback&lt;AccessibilityElement&gt; | Yes | Callback used to return the result.| | callback | AsyncCallback&lt;AccessibilityElement&gt; | Yes | Callback used to return the result. |
**Example** **Example**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册