我的网页在开放放大器(200%)时自动向后移动
我有一个网页,当我单击一个按钮时(同时使用鼠标单击或使用Tab和按下键盘),它将显示一些项目,通常,它可以完美。
但是,如果我 1>开放式Windows放大器为200%, 和
2>将键盘与选项卡一起使用,然后按 为了触发按钮,
项目仍然正确显示, 但是,整个页面会自动在地平线上来回移动,直到我移动mmouse或按任何键为止。
++++++ 我有根本原因: 当我在控制台中输入以下代码
document.addEventListener('focus',
function()
{ console.log('focused: ', document.activeElement)
},
true);
以监视聚焦元素时, 它表明焦点是两个元素之间的切换, 但是,我尝试使用Tabindex = 0或-1设置两个元素, 以及所有4个组合, 但这无效。
I have a web page, when I click one button(by both using mouse click or using keyboard with tab and press), it will show some items, normally, it works perfect.
However, if I
1> open windows magnifier with 200%,
AND
2> use keyboard with tab and press
to trigger the button,
the items still shows correctly,
but the whole page moves back and forth in horizon automatically until I move mmouse or press any key.
++++++
I got the root cause:
As I input the follow code
document.addEventListener('focus',
function()
{ console.log('focused: ', document.activeElement)
},
true);
in console to monitor the focused element,
it shows the focus are switch between two elements,
however, I try to set the two element with tabindex = 0 or -1,
and all the 4 combinations,
but it doesn't work.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是否正在使用放大镜的“停靠”,“全屏”或“镜头”视图?
我猜“全屏”,因为在该模式下,当您通过页面选项卡时,放大镜将尝试将键盘焦点保持在视图中。您可能会遇到一个问题,即您的焦点在两个元素之间移动,这两个元素都不能同时显示在放大镜中。通常,它只会将放大镜移至具有焦点的元素。
我建议您先尝试“停靠”和“镜头”查看,以查看您是否仍然有问题。
Are you using "docked", "full screen", or "lens" view for the magnifier?
I'm guessing "full screen" because in that mode, as you tab through a page, the magnifier will try to keep the keyboard focus within view. You might have an issue where your focus is moving between two elements that both can't be displayed in the magnifier at the same time. Usually it will just move the magnifier to the element that has focus.
I'd suggest trying "Docked" and "Lens" view first to see if you still have an issue.