-
Notifications
You must be signed in to change notification settings - Fork 6
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
Consider use of innerHTML
in ariaHerald
#441
Comments
I think this is a good idea, could we handle this like we handle setting inner content for accessible content in the PDOM? What if ariaHerald.updateLiveElement were changed to use AccessibilityUtil.setTextContent? |
innerHTML
in ariaHeraldinnerHTML
in ariaHerald
I committed this and it seems OK with NVDA. @mbarlow12 can you please review and test if this fixes things in VO? |
Thanks @jessegreenberg. My only hesitation would be whether we want to fully support all HTML features in our alerts. The most significant use case I can think of would be for MathML, which may be a valid consideration as we move onto a11y tooling in more math-heavy sims. Can you think of a situation where it would be useful to include generic HTML in an |
Results are mixed. The entity is now correctly rendered, but VO appears to contextually read "multiplication" or "times" depending on some unknown parameters. |
OK understood, thanks for testing. In that case we may have to go back to passing in "times" as a full string. We do not have control over how VO interprets the context unfortunately. |
@jessegreenberg I'll do a little testing/digging this week to see if there might be a way for us to tweak what VO reads. |
Closing this issue for now, we will work on this naturally when we require more complicated entities in alerts. |
From phetsims/gravity-force-lab#131.
We're currently setting the
textContent
of thearia-live
elements which strips HTML Entities (e.g.×
) instead of rendering them.It may be more pertinent to simply spell out such cases, but we could also consider adding a flag to the config object that indicates the inclusion of HTML in the alert.
The text was updated successfully, but these errors were encountered: