I was just starting to think about how to make this accessible, and so I tried adding graph controls. This definitely won’t work for this activity, for a couple of reasons:
the default precision shown means that the function reaches its limit before it should, which is especially problematic when there’s a hole. For example, dragging near x=0 lets me get to x=-0.04 y=4.
The trick we used for dealing with an undefined value doesn’t work here - the controls display y=200, which is the valueOnNaN. When I delete that attribute, the result is even worse. Setting the x-value in the controls to 2 means the controls disappear. Using the slider to drag x-values past 2 also means the controls disappear.
I also don’t like the Point 6 title. I think it’d be better if it were called Draggable Point (or Movable Point), and if there are multiple draggable points without labels, then use numbers to distinguish them in that case. I tried giving the point a shortDescription to see if the title changed in the controls without appearing on the graph itself, but no surprise that that didn’t work.
My plan is to do what I can without using controls, but I figured I’d make a report.
I was noticing that tabbing through the activity does stop on the x and y values that appear in the upper right corner of the graph, so I thought that maybe I could at least add a short description to those. But when I tried making the y-value a disabled textInput, it didn’t actually seem to stop on tab, and I also don’t like that it doesn’t look any different from a regular textInput. Disabled mathInputs look different so sighted readers can tell they’re not supposed to type something, but mathInputs can’t go on a graph. Could disabled textInputs get the same visual treatment so as not to confuse sighted readers? Or maybe even better, could I add a shortDescription to an element other than an input, like an <m> or <math>?
This is what I have now, so you can see what I mean: Doenet
This is very interesting. The addControls feature is just my first attempt to get something usable; I appreciate people trying it out to see what works well and what doesn’t.
I added a bug report about the control disappearing when the point coordinate becomes NaN.
I added a bug report about a disabled text input not appearing disabled in a graph. (It does appear disabled outside a graph.)
I’m not entirely sure I understand your comment #1 about default precision. I was not able to drag the slider or use the arrow keys to get the point to (0, 1). I had to type in 0 directly to get it there. I added this issue, but it may not be on the mark.
I added a feature request for a <controlsLabel> to independently specify a label for the controls.
I’m not sure about what the default (currently “Point 6”) label should be if there is no label or controls label. The reason I kept it counting including non-draggable points was to make the labels be stable ifdraggable attributes were changed. But, maybe that’s too confusing for the more common use-case of just having the 6th point be the draggable one. I added an issue to track this question, though it becomes less critical if we get a <controlsLabel> that allows one to specify this label.
We currently have a non-prefigure <graph> marked as an image, which is supposed to tell screen readers to ignore the contents inside. I’m not sure what they do with text inputs inside a graph. @Virginia_Mae, do you have ideas how this works and if inputs inside a graph are accessible? The better answer is to just fix the controls sot hey work better. Otherwise, would it work better to put such controls in a <description>?
I’m not sure what a screen reader would do if one added an aria-label (i.e., what a <shortDesription> produces) to a non-input like a <math>. They may well just ignore it.
Did I address all the issues raised? Thanks again for the report.
The github issue you made is also an issue, but one I was already dealing with in the non-controls version. I think for exploring limits it’s pedagogically important to have smooth dragging, without steps or constrainToGrid. I could maybe add some attracts with small thresholds, but I’m okay with just making them type in the box to get the exact value. My gut says that it might actually help reinforce the closer-and-closer-but-not-equal-to idea!
The issue I was actually raising is that it’s not good for the controls to show them that y=4 when x=-.04. It doesn’t. The limit is 4 but there’s a hole at x=0 and the y-values don’t reach 4 as x approaches 0. My comment about precision referred to needing more decimal places so as not to mislead students.
I experimented with a few different things, and I can tell you that at least sometimes the shortDescription appeared visible and overlapping other things on the graph. If it was simply ignored I might have left it, but it wasn’t.
Adding a shortDescription to the textInput will not help with accessibility, unfortunately, because the screenreader only sees the main shortDescription that is associated with the graph (I did retest with voiceover just to be sure). I think the only way to make this type of situation fully accessible (that we can do now) would be to use renderer=“prefigure” and to create annotations for all the features of interest. Then, instead of a draggable point, the user could navigate between annotations to explore.