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

Sun buttons should discover a default for accessibleName. #928

Open
pixelzoom opened this issue Feb 26, 2025 · 1 comment
Open

Sun buttons should discover a default for accessibleName. #928

pixelzoom opened this issue Feb 26, 2025 · 1 comment
Assignees

Comments

@pixelzoom
Copy link
Contributor

pixelzoom commented Feb 26, 2025

Over in MOTHA phetsims/models-of-the-hydrogen-atom#140, I discovered that sun buttons do not discover a default accessibleName.

This could be handled in ButtonNode by adding:

    // If no accessibleName is provided, look for one in the content Node
    if ( !options.accessibleName && this.content ) {
      this.accessibleName = findStringProperty( this.content );
    }

I also see the code below in RectangularRadioButtonGroup. This should be removed -- it definitely not be handled by the group, it should have been handled in RectangularRadioButton. And by making the change above for ButtonNode (superclass of RectangularRadioButton), it should be totally unnecessary.

      // pdom - If the radio button was not assigned an accessibleName, search for a default one
      // in the button. It may come from the button content or its label.
      if ( !radioButton.accessibleName ) {
        radioButton.accessibleName = findStringProperty( button );
      }

It would be great to address this before MOTHA 1.0 RC testing, which will likely begin the week of 3/3/2025.

@pixelzoom
Copy link
Contributor Author

We're running into this problem again in MOTHA, see phetsims/models-of-the-hydrogen-atom#148.

pixelzoom added a commit to phetsims/models-of-the-hydrogen-atom that referenced this issue Feb 27, 2025
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