Skip to content

Commit

Permalink
Bug 365363 - add HTML5 section elements and ARIA role regions
Browse files Browse the repository at this point in the history
  • Loading branch information
Max Li committed Feb 3, 2012
1 parent 6c8bfde commit be0689d
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,9 @@ function displaySettings( id ){

for( var sub = 0; sub < subcategory.length; sub++ ){

var section = dojo.create( "section", { id: subcategory[sub].label }, tableNode );
var section = dojo.create( "section", { id: subcategory[sub].label, role: "region", "aria-labelledby": subcategory[sub].label.replace(/ /g,"") + "-header"}, tableNode );

dojo.create( "h3", { innerHTML: subcategory[sub].ui }, section );
dojo.create( "h3", { id: subcategory[sub].label.replace(/ /g,"") + "-header", innerHTML: subcategory[sub].ui }, section );

var outer = dojo.create( "div", null, section );

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ orion.GitStatusTableRenderer = (function() {
this._cmdSpan = dojo.create("span", {}, localTools, "last");
dojo.addClass(this._cmdSpan, "paneHeadingCommands");
this._statusContentId = this._parentId + "_" + this._type;
dojo.create("div", {id:this._statusContentId}, this._parentId, "last");
dojo.create("section", {id:this._statusContentId, role: "region", "aria-labelledby": this._type + "_header"}, this._parentId, "last");
},

select: function(selected){
Expand Down Expand Up @@ -319,8 +319,8 @@ orion.GitCommitZoneRenderer = (function() {
}
GitCommitZoneRenderer.prototype = {
render: function (renderSeparator) {
this._commitZone = dojo.create("div", null, this._parentId, "last");
var headingSection = dojo.create("div", null, this._commitZone);
this._commitZone = dojo.create("section", {role: "region", "aria-labelledby":"commitheader"}, this._parentId, "last");
var headingSection = dojo.create("div", {id: "commitheader"}, this._commitZone);
dojo.addClass(headingSection, "auxpaneHeading paneHeadingFixed");
var title = dojo.create("span", {innerHTML: "Commit message"}, headingSection);

Expand Down Expand Up @@ -483,7 +483,7 @@ orion.GitLogTableRenderer = (function() {
}
GitLogTableRenderer.prototype = {
render: function (renderSeparator) {
var section = dojo.create("div", {id:this._sectionId}, this._parentId);
var section = dojo.create("section", {id:this._sectionId, role:"region", "aria-labelledby":this._type + "_header"}, this._parentId);
var headingSection = mUtil.createPaneHeading(section, this._type + "heading", this._header, true, this._type + "_header", this._type + "commands");
dojo.addClass(headingSection, "paneHeadingFixed");
this._cmdSpanAdditional = dojo.create("span", {}, this._type + "commands", "last");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ exports.GitRepositoryExplorer = (function() {
}

var content =
'<div class="git-table">' +
'<div class="git-table" role="region" aria-labelledby="repositoryHeader">' +
'<div class="plugin-settings">' +
'<list id="repositoryNode" class="plugin-settings-list"></list>' +
'</div>' +
Expand Down Expand Up @@ -294,7 +294,7 @@ exports.GitRepositoryExplorer = (function() {
dojo.create( "div", item, titleWrapper );

var content =
'<div class="git-table">' +
'<div class="git-table" role="region" aria-labelledby="workingDirectoryHeader">' +
'<div class="plugin-settings">' +
'<list id="workingDirectoryNode" class="plugin-settings-list"></list>' +
'</div>' +
Expand Down Expand Up @@ -371,7 +371,7 @@ exports.GitRepositoryExplorer = (function() {
dojo.create( "div", { id: "viewAllBranchSectionActionsArea", "class":"additions-light", "style":"padding-top:10px"}, titleWrapper );

var content =
'<div class="git-table">' +
'<div class="git-table" role="region" aria-labelledby="branchHeader">' +
'<div class="plugin-settings">' +
'<list id="branchNode" class="plugin-settings-list"></list>' +
'</div>' +
Expand Down Expand Up @@ -440,7 +440,7 @@ exports.GitRepositoryExplorer = (function() {
dojo.create( "div", { id: "remoteBranchSectionProgress", "class": "sectionProgress", innerHTML: "..."}, titleWrapper );

var content =
'<div class="git-table">' +
'<div class="git-table" role="region" aria-labelledby="remoteBranchHeader">' +
'<div class="plugin-settings">' +
'<list id="remoteBranchNode" class="plugin-settings-list"></list>' +
'</div>' +
Expand Down Expand Up @@ -521,7 +521,7 @@ exports.GitRepositoryExplorer = (function() {
dojo.create( "div", { id: "viewAllCommitSectionActionsArea", "class":"additions-light", "style":"padding-top:10px"}, titleWrapper );

var content =
'<div class="git-table">' +
'<div class="git-table" role="region" aria-labelledby="commitHeader">' +
'<div class="plugin-settings">' +
'<list id="commitNode" class="plugin-settings-list"></list>' +
'</div>' +
Expand Down Expand Up @@ -721,7 +721,7 @@ exports.GitRepositoryExplorer = (function() {
dojo.create( "div", { id: "viewAllTagSectionActionsArea", "class":"additions-light", "style":"padding-top:10px"}, titleWrapper );

var content =
'<div class="git-table">' +
'<div class="git-table" role="region" aria-labelledby="tagHeader">' +
'<div class="plugin-settings">' +
'<list id="tagNode" class="plugin-settings-list"></list>' +
'</div>' +
Expand Down Expand Up @@ -831,7 +831,7 @@ exports.GitRepositoryExplorer = (function() {
this.registry.getService("orion.page.command").renderCommands(dojo.byId("remoteSectionActionsArea"), "dom", repository, this, "tool", false);

var content =
'<div class="git-table">' +
'<div class="git-table" role="region" aria-labelledby="remoteHeader">' +
'<div class="plugin-settings">' +
'<list id="remoteNode" class="plugin-settings-list"></list>' +
'</div>' +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ define(['require', 'dojo', 'dijit', 'orion/commands', 'orion/auth', 'orion/bread


for(var i=0; i<pluginsList.length; i++){
var pluginDiv = dojo.create("div", {style: "clear: both", innerHTML: "Loading " + pluginsList[i].Url + "..."}, userProfile.profileForm.get("domNode"));
var pluginDiv = dojo.create("section", {style: "clear: both", innerHTML: "Loading " + pluginsList[i].Url + "...", role: "region"}, userProfile.profileForm.get("domNode"));
var pluginReference= this.pluginRegistry.getPlugin(pluginsList[i].Url);
if(pluginReference===null){
var registry = this.registry;
Expand Down Expand Up @@ -280,7 +280,7 @@ define(['require', 'dojo', 'dijit', 'orion/commands', 'orion/auth', 'orion/bread
});
sectionPane.placeAt(placeholder);


dojo.attr(placeholder,"aria-labelledby", content.sections[0].id);

var sectionContents = dojo.create("div", null, placeholder);

Expand Down

0 comments on commit be0689d

Please sign in to comment.