-
Notifications
You must be signed in to change notification settings - Fork 6
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
LaserPointerNode: support for accessibleName
and helpText
#877
Comments
@jessegreenberg I'd be happy to handle this one. But which of these APIs (or something else?) do you think is most appropriate? // API 1: accessibleName and helpText are specified via nested options to LaserPointerNode's button.
const laserPointerNode = new LaserPointerNode( ..., {
buttonOptions: {
accessibleName: ...
helpText: ...
}
} );
// API 2: accessibleName and helpText are top-level options, and LaserPointerNode is responsible for propagating them to its button.
const laserPointerNode = new LaserPointerNode( ..., {
accessibleName: ...
helpText: ...
} ); |
I also see |
@jessegreenberg and I discussed the 2 APIs in #877 (comment), and we think that API 2 might be the better general choice for PhET UI components. My certainty is ~75%. In the meantime, I made a couple of small fixes and improvements in 1b893ec, so that these features work in MOTHA. The only other sim affected was Rutherford Scattering, and it does not have a complete description implementation. |
In the above commits I replaced |
The above commits use nested options for the button of LaserPointerNode. @pixelzoom can you please review 1c8b15f? In particular using |
This looks great, including |
Related to phetsims/models-of-the-hydrogen-atom#67 and phetsims/sun#901 ...
LaserPointerNode currently has problems with support of ParallelDOM
accessibleName
andhelpText
options. You have to do something like this, and both options are ignored; they do not appear in the A11y View:LaserPointerNode has many options related to its button. Instead of using nested options
buttonOptions
, there are individual options at the top-level of LaserPointerNodeOptions. The first task will be to convert this to nested options.The second task is to fix the support for accessible name. This diff seems to fix the problem:
The text was updated successfully, but these errors were encountered: