How to add accessible text to datatable label

How to add accessible text to datatable label

mileymiley Posts: 1Questions: 1Answers: 0
edited September 2021 in DataTables

i have this :smile:

 "language": {
                    lengthMenu: "_MENU_"
                },

on which I get this result below:

<div class="dataTables_length" id="dataTable_length">
    <label>
        <select name="dataTable_length" aria-controls="dataTable" class="form-control">
            <option value="10">10</option>
            <option value="25">25</option>
        </select>
    </label>
</div>

but I want to add aria-label to the label tag:

<div class="dataTables_length" id="dataTable_length">
    <label aria-label="table length">
        <select name="dataTable_length" aria-controls="dataTable" class="form-control">
            <option value="10">10</option>
            <option value="25">25</option>
        </select>
    </label>
</div>

Answers

Sign In or Register to comment.