Added tabIndex option to viewer

This commit is contained in:
Mark Salsbery 2015-01-21 12:47:42 -08:00
parent b639f1e168
commit 43d8924513
3 changed files with 6 additions and 1 deletions

View File

@ -98,6 +98,7 @@ $.Navigator = function( options ){
sizeRatio: $.DEFAULT_SETTINGS.navigatorSizeRatio sizeRatio: $.DEFAULT_SETTINGS.navigatorSizeRatio
}, options, { }, options, {
element: this.element, element: this.element,
tabIndex: -1, // No keyboard navigation, omit from tab order
//These need to be overridden to prevent recursion since //These need to be overridden to prevent recursion since
//the navigator is a viewer and a viewer has a navigator //the navigator is a viewer and a viewer has a navigator
showNavigator: false, showNavigator: false,

View File

@ -126,6 +126,10 @@
* The element to append the viewer's container element to. If not provided, the 'id' property must be provided. * The element to append the viewer's container element to. If not provided, the 'id' property must be provided.
* If both the element and id properties are specified, the viewer is appended to the element provided in the element property. * If both the element and id properties are specified, the viewer is appended to the element provided in the element property.
* *
* @property {Number} [tabIndex=0]
* Tabbing order index to assign to the viewer element. Positive values are selected in increasing order. When tabIndex is 0
* source order is used. A negative value omits the viewer from the tabbing order.
*
* @property {Array|String|Function|Object[]|Array[]|String[]|Function[]} [tileSources=null] * @property {Array|String|Function|Object[]|Array[]|String[]|Function[]} [tileSources=null]
* As an Array, the tileSource can hold either Objects or mixed * As an Array, the tileSource can hold either Objects or mixed
* types of Arrays of Objects, Strings, or Functions. When a value is a String, * types of Arrays of Objects, Strings, or Functions. When a value is a String,

View File

@ -268,7 +268,7 @@ $.Viewer = function( options ) {
style.left = "0px"; style.left = "0px";
}(this.canvas.style)); }(this.canvas.style));
$.setElementTouchActionNone( this.canvas ); $.setElementTouchActionNone( this.canvas );
this.canvas.tabIndex = 0; this.canvas.tabIndex = options.tabIndex || 0;
//the container is created through applying the ControlDock constructor above //the container is created through applying the ControlDock constructor above
this.container.className = "openseadragon-container"; this.container.className = "openseadragon-container";