Opened 14 years ago

Closed 14 years ago

#6985 closed defect (wontfix)

TabContainer : can't change tab using keyboard using Safari

Reported by: guest Owned by:
Priority: high Milestone:
Component: Dijit Version: 1.1.1
Keywords: TabContainer Safari Cc: [email protected]…; [email protected]…; [email protected]…;
Blocked By: Blocking:


It is impossible to change tab using keyboard on Safari 3.1.1. As focus can't be given to a span on Safari, tabButton's focusNode don't fire "onkeypress" event. The focusNode in dijit/layout/templates/_TabButton.html must be a link instead of a span to get focus.

Here is a working template :

<div waiRole="presentation" dojoAttachEvent='onclick:onClick,onmouseenter:_onMouse,onmouseleave:_onMouse'>
    <div waiRole="presentation" class='dijitTabInnerDiv' dojoAttachPoint='innerDiv'>
        <div waiRole="presentation" class='dijitTabContent' dojoAttachPoint='tabContent'>
	        <a href="javascript:;" dojoAttachPoint='containerNode,focusNode' class='tabLabel'>${!label}</a>
	        <span dojoAttachPoint='closeButtonNode' class='closeImage' dojoAttachEvent='onmouseenter:_onMouse, onmouseleave:_onMouse, onclick:onClickCloseButton' stateModifier='CloseButton'>
	            <span dojoAttachPoint='closeText' class='closeText'>x</span>

This workaround will only work when defect #6876 on dojo.keys will be fixed.

Change History (1)

comment:1 Changed 14 years ago by bill

Resolution: wontfix
Status: newclosed

Yes, this is expected behavior. Keyboard isn't supported on Safari in general.

Support for tabindex and ARIA is being added to Safari - when that comes out we will create a (mega) ticket to update all the widgets for keyboard support.

(Back when dijit was being designed we decided to only use <a> for true links and <button> for true buttons. Of course we could have done it the way you suggested, but we just decided not to.)

Note: See TracTickets for help on using tickets.