如何使JAWS屏幕阅读器识别和读取cefsharp ChromiumWebBrowser控件的内容? [英] How to make JAWS screen reader recognize and read content of cefsharp ChromiumWebBrowser control?

查看:510
本文介绍了如何使JAWS屏幕阅读器识别和读取cefsharp ChromiumWebBrowser控件的内容?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有包含cefsharp ChromiumWebBrowser组件的winforms应用程序。我希望JAWS可以阅读其中的内容。现在,JAWS仅读取主窗口的标题。有什么办法可以做到这一点?我尝试了 force-renderer-accessibility标志,但对我没有帮助。



这是我尝试的代码:

  var settings = new CefSettings()
{
CefCommandLineArgs = {new KeyValuePair< string,string>( force-renderer-accessibility, true)}
};
Cef.Initialize(settings,performDependencyCheck:false,browserProcessHandler:null);


解决方案

按照amaitland的提示,我们找到了以下解决方案。 / p>

禁用MultiThreadedMessageLoop-然后,您需要根据下面的原始示例定期调用DoMessageLoopWork。

  var settings = new CefSettings()
{
MultiThreadedMessageLoop = false
};
Cef.Initialize(设置);

浏览器=新的ChromiumWebBrowser( https://url.com/);

var t = new Timer {Interval = 5};
t.Start();
t.Tick + = t_Tick;

this.panel1.Controls.Add(浏览器);

}

void t_Tick(对象发送者,EventArgs e)
{
this.BeginInvoke((Action)(()=> Cef。 DoMessageLoopWork()));
}


I have winforms application that contains cefsharp ChromiumWebBrowser component. I want JAWS to read it's content. Now JAWS only read title of main window. Is there any way to achieve this? I tried "force-renderer-accessibility" flag but it didn't help me.

Here is the code i tried:

var settings = new CefSettings()
        {
            CefCommandLineArgs = { new KeyValuePair<string, string>("force-renderer-accessibility", "true") }
        };            
        Cef.Initialize(settings, performDependencyCheck: false, browserProcessHandler: null);

解决方案

Following amaitland's prompting above we found the following solution.

Disable MultiThreadedMessageLoop - you then need to periodically invoke DoMessageLoopWork as per the crude sample below.

        var settings = new CefSettings()
        {
          MultiThreadedMessageLoop = false
        };            
        Cef.Initialize(settings);

        browser = new ChromiumWebBrowser ("https://url.com/");

        var t = new Timer {Interval = 5};
        t.Start();
        t.Tick += t_Tick;

        this.panel1.Controls.Add(browser);

    }

    void t_Tick(object sender, EventArgs e)
    {
        this.BeginInvoke((Action) (() => Cef.DoMessageLoopWork()));
    }

这篇关于如何使JAWS屏幕阅读器识别和读取cefsharp ChromiumWebBrowser控件的内容?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆