-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[Accessibility] Stripping Markdown should not remove HTML tags (related to #3615) #3360
Comments
@compulim in your second bullet under Potential Solutions, you said "I think we fixed that in 4.9.2". What do you mean? The Should we consider setting the
I'm investigating this topic and I will edit this message with notes. Thoughts? |
For the "we fixed that in 4.9.2", IIRC:
No
There are 2 cases here: live region and interactive. Right now, interactive is fine. The problem is the activity in live region. When an activity come in as Markdown of But when the end-user navigate to that (interactive version of) activity, they can hear "Hello". |
@corinagum do you think we can use
I am thinking, |
Wow, this is a good idea. I really like it and it's a simple solution. The only drawback I see is that customers would be unhappy if |
IMO, if the bot developer set However, they should be able to set
We can still keep the "strip Markdown" feature with best-effort:
What do you think? |
Agree. It's more a matter of what the user expects, where
Related to #3780, FYI. Web Chat is currently non-compliant.
Looks good. Not relevant quite yet, but how to deal with for RN? |
I think it's not too difficult to find a DOMParser that works in RN. I have seen HTML parser in pure Node.js in the past. Yes, #3780 need to be fixed differently away from this as we are not using |
Screenshots
Version
4.9.2
Describe the bug
tl;dr a Markdown activity with content
"Hello, <b>World!</b>"
, the screen reader will narrate it as "Hello" only.When a Markdown-based message activity arrived and it contains HTML tags, the content of the HTML tags are not narrated by screen reader.
The screen reader-only text prefers plain text instead of Markdown. Since the activity schema does not support alt-text, Web Chat use
remark
/strip-markdown
to strip out Markdown syntax into plain text.The
strip-markdown
engine do not parse the content of HTML and simply remove everything in it.Steps to reproduce
type
set to"message"
text
set to"Hello, <b>World!</b>"
textFormat
set tomarkdown
Expected behavior
The screen reader should read "Hello, World!" or indicate there is a HTML part that cannot be narrated.
Today, it narrating "Hello" only.
Additional context
Customer impact
As reported by the Omnichannel team, PVA send everything enclose with
<p>
tag, essentially muting screen reader.Potential solutions
There are multiple solutions, not limited to:
<dl><dt>Name</dt><dd>John Doe</dd></dl>
, how should it present in plain text?<ScreenReaderText>
, just use the normal HTML version insteadstrip-markdown
[Bug]
The text was updated successfully, but these errors were encountered: