Skip to content

Commit

Permalink
Control Area before Play Area in rendering order, but keep the PDOM o…
Browse files Browse the repository at this point in the history
…rder the same, see #722
  • Loading branch information
jessegreenberg committed Jun 17, 2021
1 parent a581d3a commit 17645a7
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions js/ScreenView.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,25 @@ class ScreenView extends Node {

// @private
this.pdomParentNode = new Node( {

// order of Nodes for the PDOM that makes most sense for graphical rendering, "Play Area" components
// on top of "Control Area" components.
children: options.includePDOMNodes ? [
this.pdomTitleNode,
this.pdomScreenSummaryNode,
this.pdomPlayAreaNode,
this.pdomControlAreaNode
this.pdomControlAreaNode,
this.pdomPlayAreaNode
] : [ this.pdomTitleNode ]
} );
this.addChild( this.pdomParentNode );

// pdom - "Play Area" comes before "Control Area" in PDOM
this.pdomParentNode.pdomOrder = options.includePDOMNodes ? [
this.pdomTitleNode,
this.pdomScreenSummaryNode,
this.pdomPlayAreaNode,
this.pdomControlAreaNode
] : [ this.pdomTitleNode ];
}

/**
Expand Down

0 comments on commit 17645a7

Please sign in to comment.