Skip to content

Commit

Permalink
Add some doc, reorder getter/setter for accessibleOrder, see #746
Browse files Browse the repository at this point in the history
  • Loading branch information
jessegreenberg committed Apr 24, 2018
1 parent 144d1b6 commit d9508f5
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions js/accessibility/Accessibility.js
Original file line number Diff line number Diff line change
Expand Up @@ -538,8 +538,8 @@ define( function( require ) {
*
* Use null to clear the label sibling element from the pDOM.
*
* NOTE: This method will create a container parent tagName if none has been specified. This is because all siblings
* must be help in the container parent HTML element. If you clear the labelTagName and no longer want any
* NOTE: This method will create a container parent tagName if none has been specified, because all sibling
* elements must be children of the container. If you clear the labelTagName and no longer want any
* content save the primary sibling (this means the container parent as well), then you must manually null out
* the containerTagName option as well. Although this isn't the greatest strategy, it works for now, and
* @zepumph and @jessegreenberg can't think of another way to handle this. See for details: https://github.com/phetsims/scenery/issues/761
Expand Down Expand Up @@ -580,11 +580,12 @@ define( function( require ) {
*
* Passing 'null' will clear away the description sibling.
*
* NOTE: This method will create a container parent tagName if none has been specified. This is because all siblings
* must be help in the container parent HTML element. If you clear the descriptionTagName and no longer want any
* content save the primary sibling (this means the container parent as well), then you must manually null out
* the containerTagName option as well. Although this isn't the greatest strategy, it works for now, and
* @zepumph and @jessegreenberg can't think of another way to handle this. See for details: https://github.com/phetsims/scenery/issues/761
* NOTE: This method will create a container parent tagName if none has been specified. This is because all
* siblings must be children of the parent container element to appear in the DOM. If you clear
* the descriptionTagName and no longer want any content other than the primary sibling, you must manually
* null out the containerTagName option. Although this isn't the greatest strategy, it works for now, and
* @zepumph and @jessegreenberg can't think of another way to handle this. See for
* details: https://github.com/phetsims/scenery/issues/761
*
* @public
* @param {string|null} tagName
Expand Down Expand Up @@ -1227,18 +1228,6 @@ define( function( require ) {
},
get ariaDescriptionContent() { return this.getAriaDescriptionContent(); },

/**
* Returns the accessible (focus) order for this node.
* @public
*
* @returns {Array.<Node>|null}
*/
getAccessibleOrder: function() {
return this._accessibleOrder;
},
get accessibleOrder() { return this.getAccessibleOrder(); },


/**
* Sets the accessible focus order for this node. This includes not only focused items, but elements that can be
* placed in the parallel DOM. If provided, it will override the focus order between children (and
Expand Down Expand Up @@ -1270,6 +1259,17 @@ define( function( require ) {
},
set accessibleOrder( value ) { this.setAccessibleOrder( value ); },

/**
* Returns the accessible (focus) order for this node.
* @public
*
* @returns {Array.<Node>|null}
*/
getAccessibleOrder: function() {
return this._accessibleOrder;
},
get accessibleOrder() { return this.getAccessibleOrder(); },

/**
* Hide completely from a screen reader and the browser by setting the hidden attribute on the node's
* representative DOM element. If the sibling DOM Elements have a container parent, the container
Expand Down

0 comments on commit d9508f5

Please sign in to comment.