-
Notifications
You must be signed in to change notification settings - Fork 210
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
Refactor: Rewrite of the Explorer to use ARIA trees #987
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 looks good over all, but I'm concerned about one thing. The setAria()
function uses buildSpeech()
, which in turn uses ssmlParsing()
, which uses DOMParser
. That is only available in the browser, so that may cause problems when semantic-enrich is used in node, though I haven't actually tried it out.
It may be helpful to put setAria()
behind an option that disables it for use in node, though it might be nice to have it work there as well. For that, you would need to use the document adaptor to parse and manipulate the XML. There are methods for parsing an XML string, and you could use adaptor.kind()
as a substitute for node.nodeType
(sort of). So it looks like it would be possible to make the speech generation even in node. Of course, the explorer will remain browser-dependent, but it would be nice for semantic-enrich to work for node use.
I can use the parsing method from SRE, which selects the correct |
@dpvc I did the review requests. In particular, the I've also rebased from the original no longer existing branch and merged develop. |
I'm good with this, other than two things:
|
I have made a fresh branch If there are other branched based off
The last one is just a single commit from 2cb1708, so easily recreated from the new |
Is really the one |
Closed and reopened as #1035 |
This is the long awaited rewrite of the Explorer to use the ARIA tree paradigm.
aria-label
oraria-braillelabel
. Consequently each element has four additonal attributes:data-semantic-speech
contains speech computed by SRE in ssml markup.data-semantic-braille
contains the braille computed by SRE (this could be in markup as well in the future, e.g., for 2D output).aria-label
with the speech without ssml markuparia-braillelabel
with the braille without markupKeyExplorer
that also handles all subtitle and magnification regions.Enter
or mouse click inside the structure.Enter
SpeechUtil
module for some of the functionality related to speech computation.Note, this works with the current version of SRE.
Known Issues and Next Steps