Skip to content

Commit

Permalink
Don't pass undefined to accessibleOrder
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanolson committed May 15, 2018
1 parent 0884cd0 commit a97c8c7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion js/Dialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,9 @@ define( function( require ) {
this.sim = sim;

// a11y - set the order of content for accessibility, title before content
this.accessibleOrder = [ titleNode, dialogContent ];
this.accessibleOrder = [ titleNode, dialogContent ].filter( function( node ) {
return node !== undefined;
} );

// a11y - set the aria-labelledby relation so that whenever focus enters the dialog the title is read
if ( options.title ) {
Expand Down

0 comments on commit a97c8c7

Please sign in to comment.