Skip to content

Commit

Permalink
Bug 526282 - Some table elements on git page need role=presentation
Browse files Browse the repository at this point in the history
  • Loading branch information
carmacleod committed Oct 19, 2017
1 parent 27c95b2 commit 4b3dc8c
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,7 @@ define([
section: this.section
});
this.createTree(this.parentId, model, {
role: "presentation", // table element is only being used for row/column presentation
setFocus: false, // do not steal focus on load
preCollapse: function(rowItem, row) {
if(rowItem && rowItem.children && rowItem.children.length === 1 && rowItem.children[0].resourceComparer) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ define([
holderDiv.className = "commitInfoHolder"; //$NON-NLS-0$
var tableDiv = document.createElement("div"); //$NON-NLS-0$
var table = document.createElement("table"); //$NON-NLS-0$
table.setAttribute("role", "presentation"); // table element is only being used for row/column presentation
tableDiv.appendChild(table);
var tableBody = document.createElement("tbody"); //$NON-NLS-0$
var row = document.createElement("tr"); //$NON-NLS-0$
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -820,6 +820,7 @@ define([
});
this.createFilter(this.parentId);
this.createTree(this.parentId, model, {
role: "presentation", // table element is only being used for row/column presentation
setFocus: false, // do not steal focus on load
selectionPolicy: this.selectionPolicy,
onComplete: function() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ exports.Explorer = (function() {
}
this.myTree = new mTreeTable.TableTree({
id: treeId,
role: options.role,
model: model,
parent: parentId,
onComplete: options ? options.onComplete : undefined,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ define(['i18n!orion/nls/messages', 'orion/webui/littlelib', 'orion/Deferred'], f
this._onCollapse = options.onCollapse;
this._labelColumnIndex = options.labelColumnIndex === undefined ? 0 : options.labelColumnIndex;
this._id = options.id === undefined ? "treetable" : options.id; //$NON-NLS-0$
this._role = options.role;
this._tableStyle = options.tableStyle;
this._tableElement = options.tableElement || "table"; //$NON-NLS-0$
this._tableBodyElement = options.tableBodyElement || "tbody"; //$NON-NLS-0$
Expand Down Expand Up @@ -110,6 +111,9 @@ define(['i18n!orion/nls/messages', 'orion/webui/littlelib', 'orion/Deferred'], f
this._renderer.tableCallback(table);
}
table.id = this._id;
if (this._role) {
table.setAttribute("role", this._role); //$NON-NLS-0$
}
if (this._tableStyle) {
table.classList.add(this._tableStyle);
}
Expand Down

0 comments on commit 4b3dc8c

Please sign in to comment.