{hero}

columns.ariaTitle

Since: DataTables 1.10.25

Set the columns' aria-label attribute value.

Description

This option can be used to provide a custom string for the aria-label attribute used for column headers to provide enhanced accessibility for screenreaders. By default, DataTables will use an existing aria-label attribute or the column title (columns.title, or read from the document), but this option provides customisation for that.

Please note that the value given here will have language.aria.sortAscending or language.aria.sortDescending appended to it if the column can be ordered by the end user, to give an indication to screenreader users that this is the case.

Type

This option can be given in the following type(s):

Default

Uses columns.title by default.

Examples

Set the first column's aria-label with columnDefs:

new DataTable('#myTable', {
	columnDefs: [
		{
			ariaTitle: 'Screenreader title',
			targets: 0
		}
	]
});

Set the first column's aria-label with columns:

new DataTable('#myTable', {
	columns: [{ title: 'Screenreader title' }, null, null, null, null]
});

Related

The following options are directly related and may also be useful in your application development.