Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move setting of accessible slider attributes to ISLCObjectNode #60

Closed
jessegreenberg opened this issue Mar 3, 2018 · 1 comment
Closed
Assignees

Comments

@jessegreenberg
Copy link
Contributor

For #49. In GravityForceLabBasicsScreenView:

    // a11y - TODO: could move to a common type for inverse square law common sims
    var objectProperties = [ model.object1.positionProperty, model.object1.radiusProperty, model.object2.positionProperty, model.object2.radiusProperty ];
    Property.multilink( objectProperties, function( position1, radius1, position2, radius2 ) {
      mass1Node.setAccessibleAttribute( 'min', model.getObjectMinPosition( model.object1 ) );
      mass1Node.setAccessibleAttribute( 'max', model.getObjectMaxPosition( model.object1 ) );
      mass2Node.setAccessibleAttribute( 'min', model.getObjectMinPosition( model.object2 ) );
      mass2Node.setAccessibleAttribute( 'max', model.getObjectMaxPosition( model.object2 ) );
    } );

I think it would be nice to address this, this will be necessary for the other ISLCObjectNodes. @mbarlow12 would you mind working on this?

@jessegreenberg
Copy link
Contributor Author

Wait... maybe this can be deleted entirely. In AccessibleSlider.js

          // listeners, must be unlinked in dispose
          var enabledRangeObserver = function( enabledRange ) {

            // a11y - update enabled slider range for AT, required for screen reader events to behave correctly
            self.setAccessibleAttribute( 'min', enabledRange.min );
            self.setAccessibleAttribute( 'max', enabledRange.max );
          };
          this._enabledRangeProperty.link( enabledRangeObserver );

@mbarlow12 can you see if the code in GravityForceLabBasicsScreenView can safely be removed and make sure the accessible attributes are being set correctly in the a11y slider trait?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants