tabindex

How can I make my modified radio buttons tabbable?

放肆的年华 提交于 2019-12-19 06:37:10
问题 I've used some CSS to make mobile-friendly 'radio' buttons by hiding the input s and using the label elements instead. The code is below, but I've made a jsFiddle for convenience. My problem is that a major usability issue arises when using a keyboard to navigate the form: the fields are no longer tabbable. I've tried adding tabindex attributes to the hidden input s, the labels and to the div . The first two do not work at all, adding tabindex to the div works (the div is highlighted), but I

Can I ignore some website element when navigating using the tab key?

自古美人都是妖i 提交于 2019-12-19 05:01:51
问题 As question really. I have an input box on my page that I would like to ignore when navigating using the keyboard tab key. I'm using this input box as a simple bot honeytrap and positioning it off the page, so at the moment when using the tab key, it looks to the user as though nothing has focus when they tab to this element. 回答1: You can set the tabindex="-1" on this element so it's ignored in the tab order. 0 tells the browser to figure out the tab order on it's own, -1 tells the browser to

Is it possible to let :after pseudo element get focus when press tab

北城以北 提交于 2019-12-18 07:02:44
问题 I have one h1 element, which has a :after pseudo element, when firstly press tab, this h1 element will get focus, but when I press tab again, the focus will go to next REAL element, how could I make the focus go to the pseudo element? HTML: <h1 class="title" tabindex="0">Some text</h1> CSS: title::after { width: 16px; height: 16px; background: url('image') } I want to let focus go to this 16X16 image, is it possible? 回答1: The ::before and ::after pseudo-elements are not focusable. If you

TabIndex changed to Enter for all forms in C#

人走茶凉 提交于 2019-12-13 21:13:31
问题 How can i change TabIndex from "tab" to "enter" for all forms in my win application. I know i can use event for every textbox like: If (Keys.Enter Then) { SendKeys.Send("{TAB}") } but i don't want to do this 1000 times. Can i make this by default for all textboxes and forms? 回答1: You can try to enable forms KeyPreview property. Then you'll be able to handle keystroke before controls get it private void Form_KeyDown(object sender, KeyEventArgs e) { if(Keys.Enter == e.KeyCode) { SendKeys.Send("

Setting a WebControls TabIndex based on the ControlId of another control

℡╲_俬逩灬. 提交于 2019-12-13 19:22:12
问题 I have an ASP.NET Webforms site that is regularly having features added. The majority of time a new WebControl is added to the page and I need to increment the TabIndex to all subsequent controls on the page. I'd prefer a more robust solution than choosing an arbitrary gap between the initial assigned tab indexes. Setting the tab indexes using the designer tab order functionality is one option but I'd prefer to stay in the source view. Ideally, if I had, for example, three check boxes I'd

Is Javascript's tabIndex property cross-browser?

依然范特西╮ 提交于 2019-12-12 11:08:17
问题 I had a problem, and this answer solved it. It uses the property tabIndex . Is this property cross-browser? Which browsers support it? Normally I would use Google for this, but oddly, nothing about this (except w3schools) appeared in my search query, and w3schools is terrible and doesn't show which browser versions are supported, only which browsers. MDN doesn't say anything about it either. 回答1: tabIndex is so old, it has been standard since the earliest versions of browsers. In fact, it

VBS: target fields by div and tabIndex from external .vbs

两盒软妹~` 提交于 2019-12-11 18:09:21
问题 I am struggling to set the values of some very awkward fields on a webpage (one that I do not control), would value a boffin's input, please. I have made a mock up of the webpage, demonstrating the issue. Here goes: <html> <body> <div id="mydiv1" style="position: none; display: block; z-index: 1; width: 800px;"> <p>First div (mydiv1) starts here.</p> <br /> <div id="mydiv2" style="position: none; display: block; z-index: 6; width: 800px;"> <p>Second div (mydiv2) starts here. The following

Base Class for Tab Index in ASP.NET

你离开我真会死。 提交于 2019-12-11 17:36:31
问题 I'm trying to create a nice generic way of setting the tab index on many elements in a page of an ASP.NET app (using VB.NET). As a result I was wondering if there was a base class that controls implementing the TabIndex property inherited from so I could generate the following code: Public Sub GenerateTabIndex(order as List(Of TabIndexBaseClass)) ... Blah Blah Blah code... End Sub Thanks for the help. N.B. I cannot use View -> Tab Order; unfortunately. 回答1: I'm going to answer my own question

From tabindex include <selects>

ⅰ亾dé卋堺 提交于 2019-12-11 09:47:00
问题 Is it possible to tab to a <select> element? I am creating a rather intensive form that would greatly benefit from being able to tab through everything not just the text fields. <input type="text" name="date" value="00/00/0000" tabindex="1" /> <select name="hour" tabindex="2"> <option value="1">01</option> <!-- Blah more --> </select>  :  <select name="minute" tabindex="3"> <option value="0">00</option> <!-- Blah --> </select> Above code does not work in Firefox (at least for me). 来源: https:/

How to tab through RadioButton group in Windows Forms without selecting

本小妞迷上赌 提交于 2019-12-11 04:47:34
问题 I have a Windows Forms GUI that has a bunch of controls, one of which is a FlowLayoutPanel containing a group of RadioButtons. I can tab to the first RadioButton (TabIndex and TabStop set properly), but when I hit tab again it takes me to the next control on the form, not the next radio button in the FlowLayoutPanel. Once the first RadioButton has focus, the only way to go through the group is to use up/down arrows, but that actually selects the RadioButton. Selecting a RadioButton kicks off