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

Estimate the cost to add accessible names. #71

Closed
4 tasks done
pixelzoom opened this issue Oct 7, 2024 · 5 comments
Closed
4 tasks done

Estimate the cost to add accessible names. #71

pixelzoom opened this issue Oct 7, 2024 · 5 comments

Comments

@pixelzoom
Copy link
Contributor

pixelzoom commented Oct 7, 2024

Requested by @kathy-phet on 10/4/24:

  • Estimate the cost to add accessible names to MOTHA.
  • Review what was done in MSaB with @marlitas.
  • Discuss the general approach and issues with @jessegreenberg.

And to the above list, I will add:

  • Understand what "add acessible names" really means. Does it mean add the accessibleName option, or is the scope larger?
@pixelzoom
Copy link
Contributor Author

pixelzoom commented Oct 7, 2024

Here's a summary of my Slack#DM discussion with @marlitas (slightly reordered for readability) about accessible names in MSaB.

@pixelzoom:
What should I look at in MSaB before scheduling a time to meet with you?

@marlitas:
https://github.com/phetsims/mean-share-and-balance/blob/08ecdcd3ba4d641ea56f60d6bcc563fcece3ff5e/js/distribute/view/DistributeScreenView.ts#L1[…]9C8
That code snippet shows a bit of how we dynamically handled accessible names changing. Pretty basic, but we felt like it added a lot of value.

@pixelzoom:
If I search for “accessibleName =” and “accessibleName:” in repos mean-share-and-balance and soccer-common, will that give me an accurate feel for the nature and scope of the implementation?

@marlitas:
Yes that seems correct.

@pixelzoom:
How about the design aspect of accessibleNames? Where was the design on the straightforward-complicated continuum? Who was involved? Was there much iterating?

@marlitas:
As far as design that was between AM and TS. There was a bit of iterating between them. The most complex aspect was the fact that we hadn’t talked about it ahead of time. So there were names of things that had been established in phet-io as well as the visual design of MSaB that AM & TS felt could have been modified if we had thought about accessible names earlier.

@pixelzoom How did you decide which accessibleNames were translatable? MSaB has a mix of translatable and non-translatable.

@marlitas:
I believe accessible names shouldn’t be translatable… they should all come from the a11y section of the strings file. I learned that halfway through, but I’m surprised there’s still instances of that because I thought JB and I cleaned that all up. from my understanding all accessibleNames should live under the a11y tag in the strings file to not get mixed up with translated strings.

@pixelzoom:
Yes, it does look like the majority are from MeanShareAndBalanceStrings.a11y. So the preferred pattern is that all strings used for accessibleName should be from {REPO}Strings.ally ?

@marlitas:
yes. correct

@pixelzoom
Copy link
Contributor Author

pixelzoom commented Oct 7, 2024

I reviewed the uses of accessibleName in MSaB, here's a summary:

  • All of the values for accessibleName are instances of string Properties, no string literals.
  • Most of the uses of accessibleName are static -- set and never changed. 15 in mean-share-and-balance, 1 in soccer-common.
  • There are 4 cases that are dynamic and involve logic: 3 in mean-share-and-balance, 1 in soccer-common. The logic is simple if-then-else based on the values of dependent Properties.
  • So the total looks like ~20 accessible names (16 static + 4 dynamic).

In MSaB, the scope is limited to the accessibleName attribute, and I'm therefore going to assume that we're considering doing the same in MOTHA. We are not considering adding helpText or other aspects of description.

So the implementation of accessible names looks relatively low-cost. What is likely to be the bigger cost is design: the identification of what elements need an accessible name, what the accessible name should be, and (if dynamic) what logic is involved.

@pixelzoom
Copy link
Contributor Author

pixelzoom commented Oct 7, 2024

I had a Zoom discussion with @jessegreenberg to confirm my summary in #71 (comment), and to evaluate MOTHA as a candidate for accessible names. MOTHA has only basic UI components and nothing custom, so implementation should be straightforward. Most of the cost will be in design.

@pixelzoom
Copy link
Contributor Author

pixelzoom commented Oct 7, 2024

Assuming that MOTHA and MSaB have similar scale of needs for accessible names, somewhere around 20 accessibleName attributes will need to be added. There may be some code refactoring involved to accommodate, and there will certainly be some iteration. So my guess is that implementation of accessible names will add ~20 hours.

The larger cost (as noted in #71 (comment)) will be design: the identification of what elements need an accessible name, what the accessible name should be, and (if dynamic) what logic is involved. I have no feel for that design cost, or how to estimate. Note that design of accessibleNames is the topic of #67, which is currently assigned to @DianaTavares as "deferred".

Assigning to @kathy-phet for instructions on how to proceed. @DianaTavares @arouinfar FYI.

@pixelzoom
Copy link
Contributor Author

In Slack#models-of-the-hydrogen-atom, @kathy-phet asked us to proceed. Her instructions are in #67 (comment).

Closing.

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