Skip to content

Function: accessibleText() ​

ts
function accessibleText(value): string;

Experimental

Plotly rich text (<b>, <br>, <a href>, entities) as plain text for assistive technology: line breaks become spaces, tags are dropped, entities decoded, whitespace collapsed.

Parameters ​

ParameterType
valueunknown

Returns ​

string

Example ​

ts
accessibleText('Revenue<br><i>(USD)</i> &amp; costs'); // 'Revenue (USD) & costs'

Released under the MIT License.