Make the graphtool screen reader friendly.#1396
Conversation
92283bf to
70614ab
Compare
70614ab to
7d862ea
Compare
pstaabp
left a comment
There was a problem hiding this comment.
Didn't test this, but looking at the code, looks like an improvement.
|
As I tab through the graph, the tab sequence is a bit weird:
This is really impressive. As you noted, this is good as a starting point. If you are taking observations now (perhaps for later work):
|
|
I didn't clarify that I found the sequence of traversing the tick marks to be weird. But thinking about it more, maybe it's just as good as anything else. |
That is MathJax that generates the string you are looking at. I don't know how to change that. Perhaps @dpvc could suggest something. Yeah, that should be read as an ordered pair, not an interval. |
|
I just noticed that something isn't working right. I am not on this branch, but it probably is the same with this branch. As the help states "Shift-N" can be used to graph another object when something you have already graphed is focused. What that really does (or is supposed to but isn't) is moves focus directly to the buttons, but leaves the object that was focused active. Then you can select the "Delete" button and delete the currently focused object. You can use the "Delete" button on the keyboard when an object is focused also. That will delete the focused object. That is already implemented. |
|
Wait, Shift-N is working. I don't know what was going wrong when I tested it a moment ago. |
|
It seems I have to use By the way, I recently when into MacOS System Settings and restored all keyboard bindings to defaults. A few had migrated away from default settings, although not in ways that I think would affect anything. Shift-N is working for me, thanks for the heads up. |
Are you sure that is not just a laptop thing? Often laptops require using a |
|
I'm not sure. I don't have easy access to a Mac OS desktop, but I'll try next time I am at campus. Off topic some, but for a while now, the ctrl-enter trick in the editor to render the problem code has not worked. It used to. Now in Firefox, that opens a menu. And in Chrome, it does nothing at all. And then just now based on the @pstaabp, does that feature still work for you on your Mac? What version of Mac OS and web browser do you have? |
This sets the `aria` option from the JSXGraph library for all graphed objects. Thus objects are described as they are graphed. I am sure this will still need some work, but this makes the graphtool at least basically accessible. There is also a need to specifically set the tabindex for objects (usually to the empty string which is the closest thing to unsetting it that the JSXGraph library allows). Otherwise JSXGraph now sets that to -1 for everything and tries to focus those things with javascript and that is interfering with the graphtools own focus behavior. This is more of what was done in openwebwork#1357. Note that the aria labels are not translated. Although nothing for the graphtool is. The usual data attribute approach really would be a mess for this. There are a lot of strings. Translating the graphtool would take a lot of effort with the current methods for javascript translation.
Also, using `Ctrl-Backspace` will clear the graph. This is not documented or in the help, but I susped that some keyboards label what is really the Backspace key as Delete. So this will make those work.
|
I made the |
|
@Alex-Jordan: The tab order of the graphtool you describe is the natural tab order of the browser. I really don't want to mess with that, and it is nearly impossible to do so and get it right. It is also strongly discouraged to do so. As I mentioned In short, I think that everything you suggested is already implemented, and is stated in the help. Do you have the help disabled? |
|
Not disabled. Just rendering below the iframe boundary in the PG editor, so I wasn't seeing it. I agree, everything has a way to get the job done accessibly now. There is one small thing, in that the dashed object tool is tab focusable even when there are no objects yet in the graph to make dashed. Hardly worth mentioning, but it is something I noticed. |
That is how it should be. That controls the state of what will be graphed. So you can click on the dashed object tool button before graphing anything, and then when you graph anything after that it will be dashed to begin with. |


This sets the
ariaoption from the JSXGraph library for all graphed objects. Thus objects are described as they are graphed.I am sure this will still need some work, but this makes the graphtool at least basically accessible.
There is also a need to specifically set the tabindex for objects (usually to the empty string which is the closest thing to unsetting it that the JSXGraph library allows). Otherwise JSXGraph now sets that to -1 for everything and tries to focus those things with javascript and that is interfering with the graphtools own focus behavior. This is more of what was done in #1357.
Note that the aria labels are not translated. Although nothing for the graphtool is. The usual data attribute approach really would be a mess for this. There are a lot of strings. Translating the graphtool would take a lot of effort with the current methods for javascript translation.