-
Notifications
You must be signed in to change notification settings - Fork 208
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
Fixes issues with firefox and safari. #1058
Conversation
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 is still not working with Firefox, but that seems to be due to the fact that the role
attributes are missing. I think you did something in SRE to fix this, but I don't have that updated SRE, so my Firefox isn't working.
Safari is nearly working. I can click to activate the explorer, and use keyboard to move around the equation, and the speech and braille show up properly. But if the explorer is active, then clicking does not select the clicked item. I tracked this down in the code, and the difference between Safari and Chrome is in how this line
MathJax-src/ts/a11y/explorer/KeyExplorer.ts
Line 180 in d17d8f0
prev.removeAttribute('tabindex'); |
is handled. In Safari (and presumably Firefox for you), when the tabindex
is removed, the browser fires a focus-out even immediately, and the KeyExplorer's FocusOut
method is called immediately before the rest of the Click
handler is run. In particular, that means that the Stop()
method will be run before the rest of the Click
method, and so this.active
will be set to false
before this.Start()
is run at line 184.
In Safari, moving the tabindex
does not fire a focus-out event, so this.active
is still true
when this.Start()
is called, and because Start()
returns if this.active
is true on this line
MathJax-src/ts/a11y/explorer/KeyExplorer.ts
Line 452 in d17d8f0
if (this.active) return; |
in Safari, the rest of the Start()
doesn't run, and the selected node is never switched.
One solution would be to add
this.FocusOut(null);
right after line 180 shown above. That will force the focus-out action in Safari, and for browsers that fire a focus-out event at this point, it should still be OK since FocusOut()
exists if this.active
is false, as it should be after the first FocusOut()
is run. Of course, you might have a better idea for this.
I'll have to check Firefox again once I have the SRE update that allows the role
attributes to be inserted.
Here are the list of continuing issues from our chat today:
|
I figured out the third issue above, and have fixed it in my menu update branch (not yet pushed). |
This was a CHTML error in SRE, which is now being caught (latest develop branch). But note that hover only works when the explorer is active. Otherwise we do not have a highlighter as those are only created when we have an
That is now no longer the case.
That was actually an issue related to how explorers were attached. Previously,
We now have a similar issue with switching speech/braille before retypesettting. This is best fixed once the new Menu structure is integrated. |
I fixed it in the |
…nd to handle exported enums
Update MathJax contextual menus for assistive tools
This is now fixed. However, we still have an issue when changing rule sets/preference settings. I will tackle this in a new PR to simplify review. |
@dpvc as discussed today, this should be ready to merge. |
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 all seems to work now, except that I still can't get hover or flame highlighting to work. But I may not know what I'm doing, so that may be the problem. We can chat about it in our next meeting.
These are the workarounds for the issues regarding voice events on Firefox.
@dpvc can you have a look if this works for Safari as well?