This repository has been archived by the owner on Feb 25, 2023. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This change updates the implementation of the Google Docs accessibility scripts and restores some support for scanning on Google Docs pages. It currently lacks the ability to select text, since there is no real text, but it otherwise functions similar to how scanning input elements works: by creating a temporary "imposter" element and then scanning it.
Google exposes some structural text information in a hidden
<svg>
element ifwindow._docs_annotate_canvas_by_ext
is assigned to a whitelisted extension ID. This change registers an extension toDocumentUtil
which will handle the scanning on Google Docs webpages.The extension ID whitelist can be found by viewing the source of the main Google Docs script and searching for an ID which is known to be on the list, at least at the time of writing this. There is a big array of extension IDs, and Yomichan's ID
ogmnaimimemjmbakcfefmnahgdfhfami
is on that list, which is nice. (Maybe filling out that form mentioned in this comment actually did something!)This implementation is still subject to the whims of Google's changes, which are unpredictable and undocumented.
Resolves #2231.
Related: #2093, #305 (comment).