-
-
Notifications
You must be signed in to change notification settings - Fork 76
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
Mathquill accessibility improvements #1142
Mathquill accessibility improvements #1142
Conversation
Testing it out, and so far it is working (had a little trouble getting the link to work, for some reason it didn't update the version in I tested that tab works as described, enter works as described, select works with losing focus as described. I tested the space working as tab, and it allows some movement around the mathquill input, but sometimes just enters in a space, which I found odd, but understandable. If the cursor is in a position in which tab would have moved to the next element, a space is inserted instead. I don't have a setup to test the actual mathspeak, but so far the changes are working and haven't noticed any real issues with my tests. Last I am noticed deprecated warnings when I ran |
The link command will not add anything to the
That is how it is supposed to work and is not a change with this. If you are in a block that is at depth 2 or more (for instance inside a square root, or in the numerator or denominator of a fraction), then space moves to the next block. But if you are in the root block (the only block at depth 1), then space is space. There is also one exception inside a depth 2 or more block. That is if the cursor is after a comma. Then a space is also a space.
Yes. There isn't anything that we can do about those. We have to wait until mocha fixes its issues with using deprecated dependencies. There is an issue on their github project for this. Apparently it is going to require some changes that break compatibility, and so they won't fix it until the next time they have a macro increase in their version. |
Also note that the deprecated packages are only used for unit tests via mocha. So there is nothing particularly concerning. In fact, all of MathQuill's dependencies are dev dependencies. So the only security vulnerabilities are in development tools, and nothing in the production build. |
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.
Everything worked in my limited testing (I don't have a setup to test the mathspeak part, but everything else worked as described).
After the quick comment in the meeting, would there be any disadvantages to just push |
As I also mentioned there are some disadvantages. Generally, they are minor though, and mostly clerical in nature. It means that a beta version exists that is published from a fork instead of from the main branch. It could mean that a beta version is published that might later need to be reverted to a previous beta version but republished with a new higher beta version. Either that or deleting a beta version, and then needing to wait 24 hours before you can publish a package with that same beta version again. I will publish this, and add it here, so that it is simpler for others to test. Although, if someone wants to help with development of MathQuill and test with webwork2 you might note the process, as that is a good way to do this. If someone wants to help with development of the CodeMirror 6 PG problem editor as well, you actually need to use approach with the |
a665721
to
62befa6
Compare
The npm package is now published and installed in this pull request. So now all you need to do is run |
2f56176
to
752413b
Compare
752413b
to
974503c
Compare
The "enter" handler is fixed now. It has never worked before. This allows the mqeditor to do what it did before without needed yet another event listener.
974503c
to
2211244
Compare
I set out to test this. I got as far as
Do you know what this might be about? |
Actually before that, I have lots of npm warnings. Like this first one (followed by dozens more like it):
I'm not sure what this means. |
Er, I guess it means I have an old version of node or npm that I need to upgrade. I will look into that now. |
Are you trying to follow the original instructions? They shouldn't be needed now, just clone the branch and build like normal with |
Oh, I see that now at the end. FWIW, I upgraded node to the latest 22, and had even more errors. Then I installed version 18, and I was making progress. |
So, I'm confused then because the mathquill PR is still open: openwebwork/mathquill#33 For testing this now, is there anything more to do that checking out this branch, running npm ci, and restarting webwork2? |
My understanding is there shouldn't be. A beta version was published and this will download that version to test. |
You might have to undo any local link you were trying to setup depending on how far you got. |
I did all the cleanup steps in the original instructions. OK, I got to testing. I can test with Apple VoiceOver. When I enter a math input, I typed When focus is in the input and I hit tab, it is still cycles me through the toolbar buttons. So I am wondering if I have not done something right. I have this pg branch, I ran |
I convinced myself the other things I mentioned about tabbing are just from a discussion, not part of this PR. I tested all the things mentioned in the mathquill PR and it all works. I'm going to merge this and also that PR. That PR has no approvals but I'm assuming it's the right thing to do if this one is merged. |
That is the expected behavior in terms of how this is implemented. I think the idea is that it voices what you have just deleted, and not what is now showing. I don't know that it is correct, but that is how the Desmos code is set up to work. I think the Desmos implementation is still a work in progress on this also. I was watching their changes as I worked on this, and saw several changes to their code as I did so. I pulled in their changes, when I saw them. I will continue to monitor what they do and integrate their changes into our code, but we can also change things as needed. This is just a start, and I am sure lots more work will be needed.
I did not implement the arrow key cycling through the buttons. You told me not to put effort into that until you looked into whether or not that is the right thing to do. I did notice that with Gnome Orca when focus moves to the toolbar when you type tab from the input, that it switches to "browse mode", and then the arrow keys actually already work to move between buttons in the toolbar. |
This makes changes to the
mqeditor.js
code to use the changes in openwebwork/mathquill#33.There are no actual changes needed to use the "mathspeak" addition for screen reader usage. However, there are changes needed for the focus/blur behavior change.
Also, this takes advantage of the fixed "enter" handler.
Note that since the npm package was not published (and shouldn't be until after the MathQuill pull request is merged), it takes a bit of effort to test this. The commands to do this on an Ubuntu system are below. Those commands should generally work on any system though.
First check out this pull request.
Next, it is recommended that you set npm to install global packages in your user's home directory. You can do this by running
npm config set prefix="~/.local"
. This is not required, but if you don't then global packages (and links used here) will be installed to the global location (/usr/lib/node_modules
on Ubuntu). Note that if you don't do this then you will need to usesudo
to install a global package or link.For the rest run the following commands (you may need or want to adapt locations in some cases):
Clean up afterward. From the /opt/webwork/pg/htdocs directory run:
Once the MathQuill pull request is merged, I will publish the npm package and update the package.json file in this pull request. So this should not be merged until after that is done.