Test programmatic focus changes. All items in the list can receive focus but only one at a time will be a tab stop. Tab to first list item (Item one) and then press down arrow or click on any list item. Expect to see normal browser focus outline. The links above and below the list are to help test focus management while tabbing.
IE8 is very picky about when it will show the focus of an element using the standard focus outline. Unless a css outline style is explicitly set:
- If focus() is called while the element has a negative tabIndex no outline is shown unless a class is added in onfocus after the tabIndex is set to 0.
- If you click on an element with tabIndex=-1 no outline is shown unless the className is updated (even if value doesn't change).
- If the className is updated in the onfocus handler while the tabIndex=-1 then no focus outline is shown.
- Item one
- Item two
- Item three
- More items
- One more
List item with focus: