# Javascript: Table.setDescriptiveText Method

> Sets the table's descriptive text. The descriptive text is used by screen readers to describe the table to users with visual impairments. An empty string or null can be passed to remove the descriptive text.

- **Product:** DS Server
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 34.0
- **Path:** DS Server > Reference > JavaScript API > Javascript: Table.setDescriptiveText Method
- **513 words**
- **Web URL:** https://docs.textcontrol.com/ds-server/reference/javascript/table/setdescriptivetext-method/
- **LLMs URL:** https://docs.textcontrol.com/ds-server/reference/javascript/table/setdescriptivetext-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/ds-server/reference/javascript/table/setdescriptivetext-method/llms-full.txt

---

### Description

Sets the table's descriptive text. The descriptive text is used by screen readers to describe the table to users with visual impairments. An empty string or null can be passed to remove the descriptive text.

### Syntax

```javascript
<void> Table.setDescriptiveText(<string> value, [<EmptyRequestCallback> callback], [<ErrorCallback> errorCallback])
```

### Parameters

| Parameter | Description |
|---|---|
| value | The new property value. |
| callback | Optional. Is called when the operation completed. |
| errorCallback | Optional. Is called when the operation failed with an error. |

### Examples

The following example demonstrates `Table.setDescriptiveText` in a practical document-editing workflow. It sets the table's descriptive text. The descriptive text is used by screen readers to describe the table to users with visual impairments. An empty string or null can be passed to remove the descriptive text.

```javascript
function onTxError(error) {
    console.error("TX Text Control error:", error.msg);
    error.handled = true;
}

TXTextControl.textParts.getMainText(function(mainText) {
    const tables = mainText.tables;
    tables.getItem(function(table) {
        if (!table) {
            console.warn("No table is available at the current input position.");
            return;
        }
    
        table.setDescriptiveText(
            "Quarterly report",
            function() {
                console.log("set descriptive text completed.");
            },
            onTxError
        );
    }, onTxError);
}, onTxError);
```

---

## Nearby

- **Previous:** [Javascript: Table.selectCells Method](https://docs.textcontrol.com/ds-server/reference/javascript/table/selectcells-method/llms-full.txt)
- **Next:** [Javascript: Table.setID Method](https://docs.textcontrol.com/ds-server/reference/javascript/table/setid-method/llms-full.txt)
