phetsims / mean-share-and-balance

"Mean: Share and Balance" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
2 stars 1 forks source link

Add accessible names to pdom components #307

Open marlitas opened 1 week ago

marlitas commented 1 week ago

@amanda-phet and I talked about adding in accessible names throughout the sim. We think this could be done quickly without much fuss (but add a lot of value), before QA testing.

terracoda commented 1 week ago

Great News!

@marlitas, please make note of any implementation pain points because having accessible names on interactions is essential for several WCAG Level A and AA criteria.

terracoda commented 1 week ago

Also, please reach out if you get stuck or have questions.

marlitas commented 1 week ago

@terracoda this is great to know. I will prioritize to get your input sooner rather than later.

terracoda commented 1 week ago

The names are directly related to making Alternative Input non-visually accessible. I'll add how description and alt input labels since we do not have an accessible names label. Please adjust as you see fit.

marlitas commented 1 week ago

This has been done in the above commits. I tried to reference other sims for the naming, but please let me know if there are any you'd like to adjust.

terracoda commented 1 week ago

Screen 1

Pipe Switch Interactions

Oh sorry, the Pipe Switch outside the notebook is already implemented with the on/off switch role. Nice! In order to not repeat the actual role in the action's name, consider how the following sound:

Predict mean pencil, slider

Pencil slider is currently missing a name. I suggest some ideas:

The Cup Water Level sliders have names. Awesome! I suggest changes:

The water level and predict mean values (SCOPE SCREEP!)

Number of Cups

Edited to add another name option. Edited again for clarity and to fix typos.

Screen 2

The Notebook Candy Bars

The Plates of Candy Bars on the Table

There are lots of possibilities here! What's the simplest and clearest path for now? The most meaningful words for the interaction?

Number of People, Number of People with Plates, or People with Plates

Sync Button

Info button role

Screen 3

The Apple Action Radio Buttons

I don't think think the group name repeats, so upon selection of the next radiobutton, they might hear:

I recommend taking the simplest route above as radio button groups can get quite nuanced when help text and context responses are added with full description.

Plate {{plateNumber}} Apples

Number of People

Total Checkboxes (screens 2, 3, and 4)

The name, "Total" is too vague, actually meaningless without context. In previous description work on sims, we have always changed vague names to be more explicit, adding a word about what the checkbox hides and shows. For example, "Values" was changes to "Force Values" in GFLB, and "Solution Values" in Molarity. "Total" needs to be more explicit. I highly recommend the following for screens 2, 3, and 4. It will help everyone:

Predict Mean Indicators (screens 1, 2 and 4)

Predict Mean Checkboxes (screen 1 and 2)

I didn't think too hard about these on-screen checkbox names at first, but as I progressed through the screens, I think it makes better sense to NOT use an "action-oriented" name for the checkboxes. The checkbox does not predict the mean, it makes the pencil slider available, and that tool can be used to predict the mean. The words in the names for the checkbox and the added slider should make it clear these actions are related.

So upon rethinking these interactions, I suggest either of these names for the checkbox:

AND then depending on the above one of the following names for the added pencil slider. Each of these goes nicely with a numeric value in front of it:

Name design can be made shorter when more context is added through help text, object responses, and context responses. Without that context, I am trying to make a clear connection between the action that turns the pencil on, and the action that changes the value of the mean prediction.

Screen 4

Here are my ideas and suggestions based on what I have learned from all the screens. H2: Play Area

Before and after grab:

H2: Control Area H3: Fulcrum Options

marlitas commented 6 days ago

I went ahead and applied some of the above notes.

@terracoda I have a question about the button for Grab Candy Bar though. What if there are not candy bars? We can still focus on that area as was requested for GroupSortInteraction, but there are no candy bars to grab. We have this same situation in Balance Point.

marlitas commented 6 days ago

The read out of the value is automatic and with no rounding, the number is read out to like 10 decimal places. Any chance the values on the sliders can be rounded to two decimal places before being read out? I realize this is not an accessible, but rather a value.

I'm not sure how comfortable I feel about doing this without messing up the rest of the model of the sim... Let me look into it.

terracoda commented 6 days ago

@marlitas , I realize rounding can cause issues. I have plenty of experience there. Let’s just focus on the names for now. I still need to listen to screens 2,3 and 4.

terracoda commented 4 days ago

@marlitas asked:

@terracoda I have a question about the button for Grab Candy Bar though. What if there are not candy bars? We can still focus on that area as was requested for GroupSortInteraction, but there are no candy bars to grab. We have this same situation in Balance Point.

On the Balance Point screen, you have a message. I would suggest doing the same on screens 2 and 3.

terracoda commented 4 days ago

@marlitas, I made several iterations to the big comment above as I worked through the screens.

To Summarize these ideas, here's a table. Screenshot 2024-06-30 at 15 22 18 Screenshot 2024-06-30 at 15 22 31

marlitas commented 3 days ago

Changes to apply:

Take Aways:

jbphet commented 3 days ago

Over in #227 I applied some changes that help the situation that @terracoda identified above when she said:

With no rounding, slider values are read out to like 10 decimal places.

The water level sliders now read out to a max of 4 decimal places, and only do that in unusual circumstances. For the most part they are now reading out to 1 or 2 decimal places.

marlitas commented 3 days ago

I went ahead and changed the group sort interaction for candy bars to be: Before Grabbing: "Grab or select candy bar" After Grabbing: "Move candy bar"

I know we were still nailing that down, but that should be pushed up it @terracoda or @amanda-phet want to take a look.

marlitas commented 2 days ago
marlitas commented 2 days ago

I believe everything has been addressed as requested now. Over to @amanda-phet and @terracoda for design review.

Next up will be me moving the strings into the strings file, so please do not close quite yet.

terracoda commented 1 day ago

@amanda-phet and @marlitas, the "Check" button that checks the balance on screen 4 was not in my table. I suggest changing both the visual name and the accessible name to "Check Balance." I can't imagine any pedagogically harmful side-effect of adding "Balance" to that name. It just makes the action much clearer.

I would suggest making that the accessible name regardless of whether if fits on the screen or not. Which makes me want to circle back to the "Total" check box.

terracoda commented 1 day ago

@marlitas and @marlitas if you are ammenable, I would like the following updates:

terracoda commented 1 day ago

I am opening a separate issue for Group Sort. It is more complicated.

marlitas commented 1 day ago

I am opening a separate issue for Group Sort. It is more complicated.

I do want to emphasize, though I do believe that nailing down the group sort behavior is important, I am not considering it blocking for MSaB. It may be out of scope for this particular publication. Not to say that we shouldn't do the work, it just might not be prioritized right now depending on the lift required.

amanda-phet commented 1 day ago

@marlitas and @marlitas if you are ammenable, I would like the following updates:

"Total Number of Candy Bars" for accessible name "Total Number of Apples" for accessible name

That sounds good to me!

I think "Check Balance" is too long for the button. Did you notice it also turns into "Reset" once pressed? I wonder if we should do "Check Prediction" or "Check Balance" for the accessible name. And "Reset Pillars" for the other button?

marlitas commented 1 day ago

@terracoda & @amanda-phet should I also change to accessible name in the Balance Point screen to "Total Distance"?

marlitas commented 1 day ago

I went ahead and changed the total on the Balance Point screen as well. It felt more consistent.

terracoda commented 1 day ago

@marlitas, Re "Total Distance" I forgot to put it in the list (sorry). I wanted to ask if it could be both accessible and visual names, since it wasn't confusing like the other totals. I leave that decision to you both.

@amanda-phet - re the check balance button, I have not fully played with it. I need to look at all the words to decide the check balance name, but I do like "Reset Pillars". That adds another detail to the words.

marlitas commented 1 day ago

I wanted to ask if it could be both accessible and visual names, since it wasn't confusing like the other totals. I leave that decision to you both.

I think the decision was to keep it consistent between all the screens. @amanda-phet can you confirm?