如何在Firefox中允许链接的键盘焦点? [英] How to allow keyboard focus of links in Firefox?

查看:150
本文介绍了如何在Firefox中允许链接的键盘焦点?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

eK4TT /> http://jsfiddle.net/eK4TT/ $ b

 < ; input type =text> 
< input type =text>
< input type =text>
< a href =#>我的第一个连结< / a>
< a href =#>我的第二个连结< / a>
< a href =#>我的第三个连结< / a>然后,请注意,您可以使用标签在输入和链接上键盘导航键( Shift + Tab 以相反顺序导航)。

在Mac OS的Firefox上也是一样的,并且做同样的事情。输入获得焦点,但链接将不会获得焦点。这不是一个CSS显示问题。重点从最后一个输入到网址栏。



我已经尝试过无数组合 tabindex 声明标记,并无济于事,例如:

http:// jsfiddle。 net / eK4TT / 1 /



这里到底发生了什么?我会接受任何答案:

a)一个在Firefox中工作的小提琴

b)在这里在Mozilla的头上究竟是怎么回事。这似乎与规范相矛盾。

解决方案

好的,有人向我解释这个。这是一个Mac问题。 Mozilla在Mac OS上对于操作系统设置是真实的。



在用户端有两种不同的方式。这两个似乎工作:1)在系统偏好设置>键盘,在键盘快捷方式窗格中,检查所有控制收音机。



<2>在Firefox中,在URL栏中输入 about:config 。在Mac上没有 accessibility.tabfocus 首选项,所以你必须做一个。右键单击窗口,创建一个新的整数前缀,并将其设置为7.



这些都不是非常明显。另外,这些都不是开发者的服务器端解决方案,这是令人沮丧的。

Go to this ultra-simple fiddle in a Webkit browser and click on on of the inputs:

http://jsfiddle.net/eK4TT/

<input type="text">
<input type="text">
<input type="text">
<a href="#">my first link</a>
<a href="#">my second link</a>
<a href="#">my third link</a>

Then, notice that you can keyboard navigate through both the inputs and the links using the Tab key (and Shift+Tab to navigate in reverse order).

Now, look at the same fiddle in Firefox on Mac OS and do the same thing. The inputs receive focus, but the links won't receive focus. It's not a CSS display problem. The focus leaps from the last input to the URL bar.

I've tried endless combinations of tabindex declarations in the markup, and to no avail, e.g.:

http://jsfiddle.net/eK4TT/1/

What the heck is going on here? I will accept any answer that has:

a) a fiddle working in Firefox
b) an explanation of what exactly is going on here in Mozilla's head. It appears to contradict the spec.

解决方案

Ok, somebody explained this to me. It's a Mac problem. Mozilla is being true to operating system settings in Mac OS.

There are two distinct ways around this on the user side. Both seem to work:

1) In System Preferences>Keyboard, in the keyboard shortcuts pane, check the "all controls" radio.

2) In Firefox, type "about:config" in the URL bar. There is no accessibility.tabfocus preference on the mac, so you'll have to make one. Right click in the window, create a new "integer" pref, and set it to 7.

Neither of these are terribly obvious. Also, neither of these are a server-side solution for developers, which is frustrating.

这篇关于如何在Firefox中允许链接的键盘焦点?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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