diff --git a/src/Combobox.jsx b/src/Combobox.jsx index 8e4b27081..f99fc481c 100644 --- a/src/Combobox.jsx +++ b/src/Combobox.jsx @@ -40,6 +40,7 @@ let propTypes = { onSelect: React.PropTypes.func, + autoFocus: React.PropTypes.bool, disabled: CustomPropTypes.disabled, readOnly: CustomPropTypes.readOnly, @@ -202,6 +203,7 @@ var ComboBox = React.createClass({ suggest={suggest} name={name} role='combobox' + autoFocus={this.props.autoFocus} aria-owns={listID} aria-busy={!!busy} aria-autocomplete={completeType} diff --git a/src/DateTimePicker.jsx b/src/DateTimePicker.jsx index 1e162a9f7..ee31ffcf6 100644 --- a/src/DateTimePicker.jsx +++ b/src/DateTimePicker.jsx @@ -63,6 +63,7 @@ let propTypes = { initialView: React.PropTypes.oneOf(viewEnum), finalView: React.PropTypes.oneOf(viewEnum), + autoFocus: React.PropTypes.bool, disabled: CustomPropTypes.disabled, readOnly: CustomPropTypes.readOnly, @@ -184,6 +185,7 @@ var DateTimePicker = React.createClass({ id={inputID} tabIndex={tabIndex || 0} role='combobox' + autoFocus={this.props.autoFocus} aria-labelledby={ariaLabelledby} aria-expanded={!!open} aria-busy={!!busy} diff --git a/src/Multiselect.jsx b/src/Multiselect.jsx index 1006362ca..13acd3912 100644 --- a/src/Multiselect.jsx +++ b/src/Multiselect.jsx @@ -57,6 +57,7 @@ var propTypes = { placeholder: React.PropTypes.string, + autoFocus: React.PropTypes.bool, disabled: CustomPropTypes.disabled.acceptsArray, readOnly: CustomPropTypes.readOnly.acceptsArray, @@ -118,7 +119,8 @@ var Multiselect = React.createClass({ getInitialState(){ var { data, value, valueField, searchTerm } = this.props , dataItems = splat(value).map( item => dataItem(data, item, valueField)) - , data = this.process(data, dataItems, searchTerm) + + data = this.process(data, dataItems, searchTerm) return { focusedTag: null, @@ -215,7 +217,7 @@ var Multiselect = React.createClass({ ref='status' id={instanceId(this, '__notify')} role="status" - className='sr-only' + className='rw-sr' aria-live='assertive' aria-atomic="true" aria-relevant="additions removals text" @@ -248,6 +250,7 @@ var Multiselect = React.createClass({ role='listbox' aria-expanded={open} aria-busy={!!busy} + autoFocus={this.props.autoFocus} aria-owns={listID + ' ' + instanceId(this, '__notify') + (shouldRenderTags ? (' ' + tagsID) : '') diff --git a/src/NumberPicker.jsx b/src/NumberPicker.jsx index 0994124fe..42ad74389 100644 --- a/src/NumberPicker.jsx +++ b/src/NumberPicker.jsx @@ -39,6 +39,7 @@ let propTypes = { parse: React.PropTypes.func, + autoFocus: React.PropTypes.bool, disabled: CustomPropTypes.disabled, readOnly: CustomPropTypes.readOnly, @@ -145,6 +146,7 @@ let NumberPicker = React.createClass({ name={this.props.name} role='spinbutton' min={this.props.min} + autoFocus={this.props.autoFocus} aria-valuenow={val} aria-valuemin={isFinite(this.props.min) ? this.props.min : null } aria-valuemax={isFinite(this.props.max) ? this.props.max : null }