-
-
Notifications
You must be signed in to change notification settings - Fork 80
Upgrade JSXGraph to the latest version and fix the graphtool for that. #1357
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
base: develop
Are you sure you want to change the base?
Conversation
00141d9 to
00bf372
Compare
00bf372 to
71294b6
Compare
|
I notice that is both the develop version and this branch that in a simple problem with a graph tool, that the tab order starts with tex outside the problem, then any points on any tools, then all of the labels. I was expecting to go through the buttons as well to be able to focus. This doesn't have to do with this PR, but just noticed it. |
|
With the develop branch the tab order is really not working. If you graph a line, for instance, set focus to somewhere before the graph tool, and use the tab button, then focus first moves to the first point on the line, then it moves to the MathJax text and cycles through all of that on the graph (axes labels first, then tick labels), then focus moves to the tool buttons. One of the problems is that it skips over the second point on the graphed line. Another problem is that if you use shift-tab anywhere in that cycle, focus never goes back to either of the points on the graphed line. They are skipped entirely in the reverse order. Furthermore, if you stop with focus on that first point on the line or if you click to focus the other point, and then try to use shift-tab, the focus doesn't even move at all. It is stuck on the point. You can still go forward in the tab order with the tab key, but not backward with shift-tab. With this pull request the issues mentioned above are fixed. Tab order works both forward and backward as it should. I don't know what you mean by "I was expecting to go through the buttons as well to be able to focus". It does go through the tool buttons below, both with the develop branch and this pull request. |
This looks like another Safari quirk/bug. Skips the buttons in Safari. I notice it works as expected in Chrome. |
|
That is certainly odd. The buttons are just standard HTML buttons which should be in the tab order, and should work in all browsers in the expected way. |
The latest version of JXSGraph is 1.12.2. However, that version (and all versions after 1.11.1) have an issue with tab order when keyboard events are enabled. Basically, it is impossible to use shift-tab to progress in reverse in the tab order. See jsxgraph/jsxgraph#773. So to work around that I had to override the board's `keyDownListener` method with one that does not call `preventDefault` on a keydown event that comes from a tab key being used. Another thing that is a bit annoying with versions 1.11.1 and later is that you now have to set the tabindex on elements that are not fixed yourself. By default they set the tabindex to -1, which means they are not in the tab order. So `gt.definingPointAttributes` is now a function, and if it is called with `gt.isStatic` true, a tabindex of -1 is used, but if `gt.isStatic` is false, then a tabindex of 0 is used (and so those points will be keyboard focusable).
71294b6 to
03789f2
Compare
|
I guess it's a setting in Safari. I put that on and all of the buttons now are focusable. |
pstaabp
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good now.
The latest version of JXSGraph is 1.12.2. However, that version (and all versions after 1.11.1) have an issue with tab order when keyboard events are enabled. Basically, it is impossible to use shift-tab to progress in reverse in the tab order. See jsxgraph/jsxgraph#773. So to work around that I had to override the board's
keyDownListenermethod with one that does not callpreventDefaulton a keydown event that comes from a tab key being used.Another thing that is a bit annoying with versions 1.11.1 and later is that you now have to set the tabindex on elements that are not fixed yourself. By default they set the tabindex to -1, which means they are not in the tab order. So
gt.definingPointAttributesis now a function, and if it is called withgt.isStatictrue, a tabindex of -1 is used, but ifgt.isStaticis false, then a tabindex of 0 is used (and so those points will be keyboard focusable).