-
Notifications
You must be signed in to change notification settings - Fork 0
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
div role="textbox" elements are not spell checked #10
Comments
I think the correct selector is |
One thing is that div won't have a |
It didn't work in the Element's browser client just by adding to see if textContent has a value. The text input area was changed but it was garbage. This trick might work on some other sites that don't work otherwise currently. |
Hmm, OK. Is it possible to read what's between div tags? I mean: Hmm, and actually there is the same kind of issue with the Microsoft Teams as well: The input text appears inside of the So there are: |
Yes, you can read it with textContent attribute.
spellcheck="true" is already used as selector by default. But yes, they can be used.
That wouldn't be necessary in this case. You could use Sometimes they even add dynamically more elements in the div as you write. I didn't think about going through them recursively but you are right, if the div is used as a textbox, the elements it contains, will probably only contain text and can be read. While the text can be read, other needed features might not work. There should be a selectionStart attribute in the div for suggestions, I don't think divs have it. And the highlighting code doesn't work as is, it handles only input and textarea elements. I haven't written it and I'm not that familiar with it. It's very difficult or impossible to handle all the cases with only web APIs. There should be a webextension API for best result. |
I noticed that Element (Matrix client) does use
<div role="textbox">
elements with its input text fields:<div class="mx_BasicMessageComposer_input mx_BasicMessageComposer_input_shouldShowPillAvatar" tabindex="0" aria-label="Send a message…" role="textbox" aria-multiline="true" aria-autocomplete="both" aria-haspopup="listbox" aria-expanded="false" dir="auto" spellcheck="true" style="" contenteditable="true"><div>Input text comes here</div></div>
And even I try to put:
div[role=textbox]
In "Spellchecked Elements" inside the Fin Spell settings it won't perform spell checking for those elements. It correctly disables the Firefox spell checking functionality for those elements when I turn the Fin Spell ON but it does not perform the Finnish (Voikko) spell checking against those fields.
More information about those div type="textbox" elements can be found from here: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/textbox_role
The text was updated successfully, but these errors were encountered: