Skip to content

Commit

Permalink
use removeAttribute instead of clearing attribute content for #701 and
Browse files Browse the repository at this point in the history
  • Loading branch information
jessegreenberg committed Jun 11, 2018
1 parent 8625d8f commit 78c140a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions js/accessibility/Accessibility.js
Original file line number Diff line number Diff line change
Expand Up @@ -1325,10 +1325,10 @@ define( function( require ) {
// clear the current aria-labelledby attribute and recreate it from stored associations
// TODO: make this more efficient
this.updateAccessiblePeers( function( peer ) {
peer.primarySibling && peer.primarySibling.setAttribute( 'aria-labelledby', '' );
peer.labelSibling && peer.labelSibling.setAttribute( 'aria-labelledby', '' );
peer.descriptionSibling && peer.descriptionSibling.setAttribute( 'aria-labelledby', '' );
peer.containerParent && peer.containerParent.setAttribute( 'aria-labelledby', '' );
peer.primarySibling && peer.primarySibling.removeAttribute( 'aria-labelledby' );
peer.labelSibling && peer.labelSibling.removeAttribute( 'aria-labelledby' );
peer.descriptionSibling && peer.descriptionSibling.removeAttribute( 'aria-labelledby' );
peer.containerParent && peer.containerParent.removeAttribute( 'aria-labelledby' );
} );

for ( var i = 0; i < this._ariaLabelledbyAssociations.length; i++ ) {
Expand Down

0 comments on commit 78c140a

Please sign in to comment.