Skip to content

Commit

Permalink
work on making accessible attributes mutable, added tests, see #814
Browse files Browse the repository at this point in the history
  • Loading branch information
zepumph committed Jul 14, 2018
1 parent fb588ac commit 8e925dc
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions js/accessibility/Accessibility.js
Original file line number Diff line number Diff line change
Expand Up @@ -2011,13 +2011,16 @@ define( function( require ) {

// {string|null} - If non-null, will remove the attribute with the specified namespace. This can be required
// for removing certain attributes (e.g. MathML).
namespace: null
namespace: null,

elementName: AccessiblePeer.PRIMARY_SIBLING // see AccessiblePeer.getElementName() for valid values, default to the primary sibling
}, options );

var attributeRemoved = false;
for ( var i = 0; i < this._accessibleAttributes.length; i++ ) {
if ( this._accessibleAttributes[ i ].attribute === attribute &&
this._accessibleAttributes[ i ].options.namespace === options.namespace ) {
this._accessibleAttributes[ i ].options.namespace === options.namespace &&
this._accessibleAttributes[ i ].options.elementName === options.elementName ) {
this._accessibleAttributes.splice( i, 1 );
attributeRemoved = true;
}
Expand Down

0 comments on commit 8e925dc

Please sign in to comment.