arnog / mathlive

A web component for easy math input
https://cortexjs.io/mathlive
MIT License
1.54k stars 269 forks source link

Can not input data with NVDA screen reader + Firefox #1444

Open lamhuynhorient opened 2 years ago

lamhuynhorient commented 2 years ago

Hi, User can not input any content on mathlive with NVDA + Firefox. User can normally input on NVDA + Chrome/Edge. I tested on https://cortexjs.io/mathlive/demo/

arnog commented 2 years ago

Thanks for the report. To make it easier to track down the problem, could you provide some step by step instructions on how to reproduce the problem? Does the problem only occur only with NVDA or can it be reproduced with JAWS? Does it happen on macOS with VoiceOver and Firefox?

NSoiffer commented 2 years ago

I just gave it a try and if you click in the area, "delete" will work but the other keys seem to have their browse-mode meanings. To me, this indicates that NVDA+Firefox is not seeing this as a textbox despite role="textbox" being set.

As reported, this works fine with NVDA+Chrome.

I think this is a Firefox or NVDA bug. Checking NVDA's bug reports, this seems like it might be the same as this recently reported NVDA bug. If it is the same problem, then they say it is related to a read-only state and so maybe there is a work around that somehow gets around a read-only state being set (don't ask me how...)

arnog commented 2 years ago

Thanks, Neil. Interesting. Not sure why NVDA thinks there's a readonly attribute. The readonly attribute is admittedly weird, its mere presence, regardless of its value, indicate a read-only state, but I checked and I don't see a readonly attribute or property on the element. Hmm...

I wonder if setting the contenteditable attribute to true on the mathfield would work as a workaround...

NSoiffer commented 2 years ago

I only said it might be the same as the linked bug. It could well be something else. I think the bug report implied readonly was computed, not explicitly set by Firefox.

I tried adding contentEditable in the debugger on various elements and no luck. However, I was playing around with readonly and typed something wrong and ended up somehow with width/height set to 100% (I think it was 100%,) set on some element (i.e., the style was set on whatever element I was on). After that accident, editing worked. Unfortunately I can't replicate it despite trying a bunch of things, My frustration level started to mount, so I'm giving up on that for now, but maybe that is some hint.

arnog commented 2 years ago

Version 0.73.3 has some attempts to work around this issue. Could someone give it a try and report?

huytranorient commented 2 years ago

Unfortunately, I'm still getting the issue on version 0.74.0.

arnog commented 2 years ago

@huytranorient ok, thanks. It looks like we'll have to wait for a fix for https://github.com/nvaccess/nvda/issues/13642