我正在尝试使用 flash 检测辅助技术的存在。当 Flash 电影在第 1 帧上加载了下面的动作脚本时(并且屏幕阅读器通过 MSAA 与 IE 或 Firefox 聊天是活动的——JAWS 或 NVDA),Accessibility.isActive()
在电影获得焦点之前不会返回“true”。好吧,实际上直到一些“事件”发生。电影只会坐在那里,直到我右键单击它并显示 Flash 播放器的上下文菜单......似乎只有这样才会Accessibility.isActive()
返回 true。右键单击是我可以让电影“唤醒”的唯一方法。
如何让电影自行做出反应并检测 MSAA?我已经尝试使用 Javascript 将焦点发送到它...可以在 javascript 或 actionscript 中伪造右键单击吗?或者您是否知道在 Flash 电影中右键单击触发的事件——也许我可以通过编程方式使该事件发生?
我的动作脚本:
var x = 0;
//check if Microsoft Active Accessibility (MSAA) is active.
//Setting takes 1-2 seconds to detect -- hence the setTimeout loop.
function check508(){
if ( Accessibility.isActive() ) {
//remove this later... just visual for testing
logo.glogo.logotext.nextFrame();
//tell the page's javascript this is a 508 user
getURL("javascript:setAccessible();")
} else if (x<100) {
trace ("There is currently no active accessibility aid. Attempt " + x);
x++;
setTimeout(check508,200);
}
}
/*
//FYI: only checks if browser is MSAA compliant, not that A.T. is actually running. Sigh.
//This returns true immediately though.
if (System.capabilities.hasAccessibility) {
logo.glogo.logotext.nextFrame();
getURL("javascript:setAccessible();")
};
*/
check508();
stop();
我的 HTML:
<embed id="detector" width="220" height="100" quality="high" wmode="window" type="application/x-shockwave-flash" src="/images/detect.swf" pluginspage="http://www.adobe.com/go/getflashplayer" flashvars="">