-
Notifications
You must be signed in to change notification settings - Fork 2
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
How to handle the same a11y documentation for different components #11
Comments
Maybe clearer to add AccessibleSlider.md, then have both HSlider and Faucet point to that? |
From an implementation standpoint, that seems to me like we would have to (a) parse files to determine what mixins they use, or (b) somehow detect that during runtime. Both of those seem gross to me, do you have any other thoughts @samreid? |
The documentation HSlider.md would have a manually-written section that reads: HSlider gets its accessibility features from AccessibleSlider.md (hyperlinked). Here are some more specific things HSlider adds above and beyond that... |
Well, when you put it that way, it seems really nice. Is there anything automated involving |
I think that part should be manual. The automatic part will track which sims use Faucet and HSlider, the documentation will manually refer to AccessibleSlider. |
@samreid, I like your idea of Accessible{InteractionName}}.md. I was thinking along the same lines, but in the reverse direction (links in the md file to the actual covered js components, or comments in the top of the js file). I think this will work just fine from the accessible documentation side of things. |
That seems like a good first step. One possible improvement that we could do, would be to somehow mark the a11y links in the main markdown files, perhaps with templated vars on either side, and then load that a11y markdown into that spot in the main markdown. Example HSlider would look like: ## General Design
* blag
## Accessibiliy
{{template}}See [AccessibleSlider.js](github.com/phetsims/scenery-phet/js/AccessibleSlider.js){{template}}
Then on build that file get's put into the |
@zepumph if you look at the RadioGroup.md file would you say that everything under ## Accessibility Considerations down to the end would be in a separate MD file? |
Very good question! Currently radio button groups have two PhET implementations:
Currently their implementation is different in terms of a11y, and there is no talk of separating out that functionality into their own To clear up some confusion from this morning, we were naming accessible markdown files, to be linked to by the main markdowns, but I was only recommending that strategy for places where that pattern exists in the code. So currently that would only apply to |
I agree, less straight forward to use mixin pattern here because instrumentation is required on the button group and the individual buttons. But we could look into it, depends on implementation of
I agree. Would be a good way to refactor documentation, but difficult step to remember. Maybe we should add a step to the common code review checklist to do this? |
I'm not sure what's best. I don't want to add a big step in an already large checklist before we really know what the best workflow is, because we are still figuring it out. @terracoda, here is a draft about the protocol with documenting these a11y interactions in the style guide
Appendix: I would love to have majority consensus on this approach, since it seems pretty big to the style guide moving forward. Tagging @amanda-phet @samreid @jessegreenberg @mbarlow12 @terracoda provide suggestions in comments below OR react to this comment with something stating their feelings. |
Sounds great, but can you please provide an example of
|
#11 (comment) sounds great @zepumph. |
https://github.com/phetsims/sun/blob/master/docs/accessibility/AccessibleSlider.md |
Is that superior to https://phetsims.github.io/binder/accessibility/AccessibleSlider.md ? |
It is easier. as the link doesn't have to be processed on build to point to binder's version (and binder has to copy it over on build too). @samreid your link seems like a nice step 2 improvement. Step 3 to me would be to load that markdown, and the parse it with the |
@zepumph, I think this is sounding ok. The heading hierarchy of the content in the md files is important, so I agree if an md file is part of some other documentation, I (or the writer) will need to make sure the heading hierarchy remains consistent. |
@zepumph and @samreid, I just came across something a little different for the Accordion Box pattern. There are two js components that are used to create the full experience:
For the general and accessible design documentation, I don't think it makes sense to separate them. They seem like they would always go together. Is this same issue as the issue? Or a different issue? |
Assuming for the moment that AccordionBox used ExpandCollapseBar, we should still have However, looking in the implementation of AccordionBox, it appears it does not use ExpandCollapseBar at all. Either way, we would still document each file separately with its own .md file. That makes our process simpler, straightforward and composable. |
I can link to the PhET components in the docs. Perhaps there should be a section near the top listing what components are covered by the documentation. |
@zepumph This seems like a good way to move forward for now. It will also be useful to find a way to automatically generate some kind of flag or reference when these cases arise |
Right, like a templating var perhaps |
Let me know if you need any more help. |
In this morning's a11y meeting, we decided that for right now, we will treat |
Removing @samreid assignment for now |
The examples and design patterns in these 2 tip sheets that I created for the Description Design Course (2022) may be an example of a more general alternative for documentation, rather than doing the design pattern PhET component by PhET component.
In my documentation, I refer to "Interaction Types" and then leave the documentation to define the exact details of interaction. For example, here's the design pattern for a toggle interaction, of which there are many sub types...
Here's the design pattern for a slider interaction...
|
Un-assigning myself from this issue until we have time to discuss this further. |
From phetsims/sun#361, I see a need for single a11y documentation (like interaction pattern and sample html) to document
AccessibleSlider.js
. But that file is mixed into many different common code types (and more to come). Currently the way that binder is set up, we are generating documentation by component, because of the way thatInstanceRegistry
is set up.I think the best way to proceed is to have a single component md file that has this content, and then in all the other files, we point to the one saying, "a11y interaction is the same as {{base-component}}." So in
Faucet.md
you will be pointed toHSlider
, since it is the same interaction. This will also be good to do withRadioButtonGroup
vsVerticalAquaRadioButtonGroup
.The text was updated successfully, but these errors were encountered: