I was running some tests on the <output> element and noticed that in Opera when tabbing over the inputs, it selects the <output> property.

It kind of took me off guard because I wouldn't expect it to be a selectable element because you can't do anything with it.

Has anyone done any serious research on this?

I would love to know what would be considered best practice.

  • 1
    Worth noting that it may be something that Opera users are used to, if distraction/jarring is a point of contention. – dhmstark Aug 3 '12 at 14:02
  • 3
    You are 100% right @dhmholley I have fallen into that trap that normal users don't change browser every 5 seconds like web devs do. – Toby Aug 3 '12 at 14:06
  • 1
    @dhmholley I have edited my question to make it more about is Opera right to do this. – Toby Aug 3 '12 at 14:08
  • @dhmholley however in breaking browser conventions, it's quite possible Opera is annoying their users that use more than one browser. – Ben Brocka Aug 3 '12 at 16:00
  • 1
    Just to point out my comment was made in the context of the question pre-editing, where it was framed as "should we override Opera's default behaviour". – dhmstark Aug 3 '12 at 16:41

The whole point of tabbing in keyboard navigation is to move to the next control or interactive item. It doesn't make any more sense to tab into an <output> string than it does to tab to a <p> paragraph. You're basically breaking logical form order (move to the next input field) to select something you can't interact with.

Tabbing should move from input elements/links/the address bar to focus the keyboard cursor wherever keyboard input can be used. This includes form fields (typing, arrow keys to move sliders/dropdowns), links (enter to open) and any form of control. Static elements shouldn't be selected like this, and even if it's "standard" in opera, it's not familiar to users of the dozens of other applications which use tab to mean "next control" rather than "next control...and also the <output> tag".

Also when considering "standards" in opera, note that your users aren't going to know what an <output> tag is. Even if they do, they probably won't know when you're using one; they're not visually distinct, they just look like text. I'd say even regular opera users would be confused by tabbing randomly into non-input fields like this, and if they weren't confused, they'd be annoyed, because it's just an extra keypress I have to do.

I recommend using tabindex of -1 to make the element unfocusable when tabbing through (if that works in opera...). Normally you shouldn't mess with the tabindex (tabbing order) of elements unless you have very good reason of course, but I think this qualifies, as no one would ever need to tab into an <output> they can't directly manipulate.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.