Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/js/core/RowManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export default class RowManager extends CoreFeature{

el.classList.add("tabulator-table");
el.setAttribute("role", "rowgroup");
el.setAttribute("id", "tabulator-table-body");
el.setAttribute("id", "tabulator-table-body-" + this.table.instanceId);

return el;
}
Expand Down
8 changes: 7 additions & 1 deletion src/js/core/Tabulator.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,12 @@ class Tabulator extends ModuleBinder{

if(this.initializeElement(element)){

if (this.element.id) {
this.instanceId = this.element.id;
} else {
this.instanceId = Math.random().toString(36).slice(2, 7);
}

this.initializeCoreSystems(options);

//delay table creation to allow event bindings immediately after the constructor
Expand Down Expand Up @@ -232,7 +238,7 @@ class Tabulator extends ModuleBinder{

element.classList.add("tabulator");
element.setAttribute("role", "grid");
element.setAttribute("aria-owns", "tabulator-table-body");
element.setAttribute("aria-owns", "tabulator-table-body-" + this.instanceId);

//empty element
while(element.firstChild) element.removeChild(element.firstChild);
Expand Down