src/aria/widgets/form/Select.js
function (out) {
            var cfg = this._cfg;
            var width = this._frame.innerWidth;
            var disabledOrReadonly = cfg.disabled || cfg.readOnly;
            var tabIndex = disabledOrReadonly ? '' : ' tabindex="' + this._calculateTabIndex() + '"';
            if (this._skinObj.simpleHTML) {
                var stringUtils = ariaUtilsString;
                var options = cfg.options;
                var selectedValue = cfg.value;
                /*
                 * The _ariaInput attribute is present so that pressing ENTER on this widget raises the onSubmit event
                 * of the fieldset:
                 */
                var html = ['<select', Aria.testMode ? ' id="' + this._domId + '_input"' : '',
                        (width > 0) ? ' style="width: ' + width + 'px;" ' : '', tabIndex,
                        disabledOrReadonly ? ' disabled="disabled"' : '', this._getAriaLabelMarkup(),
                        ' _ariaInput="1">'];

                for (var i = 0, l = options.length; i < l; i++) {
                    // string cast, otherwise encoding will fail
                    var optValue = '' + options[i].value;
                    html.push('<option value="', stringUtils.encodeForQuotedHTMLAttribute(optValue), '"', optValue == selectedValue
                            ? ' selected="selected"'
                            : '', '>', stringUtils.escapeHTML(options[i].label), '</option>');
                }

                html.push('</select>');

                out.write(html.join(''));
            } else {
                var report = this.controller.checkValue(cfg.value);
                var text = report.text;
                report.$dispose();
                // The _ariaInput attribute is present so that pressing ENTER on this widget raises the onSubmit event
                // of the fieldset:
                out.write(['<span', Aria.testMode ? ' id="' + this._domId + '_input"' : '', ' class="xSelect" style="',
                        (width > 0) ? 'width:' + width + 'px;' : '', '"', tabIndex, this._getAriaLabelMarkup(),
                        ' _ariaInput="1">', ariaUtilsString.escapeHTML(text), '&nbsp;</span>'].join(''));
                // the &nbsp; at the end of the label is useful to make sure there is always something in the line so
                // that the height does not change
            }

        }
function (out) {
            var cfg = this._cfg;
            var width = this._frame.innerWidth;
            var disabledOrReadonly = cfg.disabled || cfg.readOnly;
            var tabIndex = disabledOrReadonly ? '' : ' tabindex="' + this._calculateTabIndex() + '"';
            if (this._skinObj.simpleHTML) {
                var stringUtils = ariaUtilsString;
                var options = cfg.options;
                var selectedValue = cfg.value;
                /*
                 * The _ariaInput attribute is present so that pressing ENTER on this widget raises the onSubmit event
                 * of the fieldset:
                 */
                var html = ['<select', Aria.testMode ? ' id="' + this._domId + '_input"' : '',
                        (width > 0) ? ' style="width: ' + width + 'px;" ' : '', tabIndex,
                        disabledOrReadonly ? ' disabled="disabled"' : '', this._getAriaLabelMarkup(),
                        ' _ariaInput="1">'];

                for (var i = 0, l = options.length; i < l; i++) {
                    // string cast, otherwise encoding will fail
                    var optValue = '' + options[i].value;
                    html.push('<option value="', stringUtils.encodeForQuotedHTMLAttribute(optValue), '"', optValue == selectedValue
                            ? ' selected="selected"'
                            : '', '>', stringUtils.escapeHTML(options[i].label), '</option>');
                }

                html.push('</select>');

                out.write(html.join(''));
            } else {
                var report = this.controller.checkValue(cfg.value);
                var text = report.text;
                report.$dispose();
                // The _ariaInput attribute is present so that pressing ENTER on this widget raises the onSubmit event
                // of the fieldset:
                out.write(['<span', Aria.testMode ? ' id="' + this._domId + '_input"' : '', ' class="xSelect" style="',
                        (width > 0) ? 'width:' + width + 'px;' : '', '"', tabIndex, this._getAriaLabelMarkup(),
                        ' _ariaInput="1">', ariaUtilsString.escapeHTML(text), '&nbsp;</span>'].join(''));
                // the &nbsp; at the end of the label is useful to make sure there is always something in the line so
                // that the height does not change
            }

        }
function ( out ) { var cfg = this . _cfg ; var width = this . _frame . innerWidth ; var disabledOrReadonly = cfg . disabled || cfg . readOnly ; var tabIndex = disabledOrReadonly ? '' : ' tabindex="' + this . _calculateTabIndex ( ) + '"' ; if ( this . _skinObj . simpleHTML ) { var stringUtils = ariaUtilsString ; var options = cfg . options ; var selectedValue = cfg . value ; /*
                 * The _ariaInput attribute is present so that pressing ENTER on this widget raises the onSubmit event
                 * of the fieldset:
                 */ var html = [ '<select' , Aria . testMode ? ' id="' + this . _domId + '_input"' : '' , ( width > 0 ) ? ' style="width: ' + width + 'px;" ' : '' , tabIndex , disabledOrReadonly ? ' disabled="disabled"' : '' , this . _getAriaLabelMarkup ( ) , ' _ariaInput="1">' ] ; for ( var i = 0 , l = options . length ; i < l ; i ++ ) { // string cast, otherwise encoding will fail var optValue = '' + options [ i ] . value ; html . push ( '<option value="' , stringUtils . encodeForQuotedHTMLAttribute ( optValue ) , '"' , optValue == selectedValue ? ' selected="selected"' : '' , '>' , stringUtils . escapeHTML ( options [ i ] . label ) , '</option>' ) ; } html . push ( '</select>' ) ; out . write ( html . join ( '' ) ) ; } else { var report = this . controller . checkValue ( cfg . value ) ; var text = report . text ; report . $dispose ( ) ; // The _ariaInput attribute is present so that pressing ENTER on this widget raises the onSubmit event // of the fieldset: out . write ( [ '<span' , Aria . testMode ? ' id="' + this . _domId + '_input"' : '' , ' class="xSelect" style="' , ( width > 0 ) ? 'width:' + width + 'px;' : '' , '"' , tabIndex , this . _getAriaLabelMarkup ( ) , ' _ariaInput="1">' , ariaUtilsString . escapeHTML ( text ) , '&nbsp;</span>' ] . join ( '' ) ) ; // the &nbsp; at the end of the label is useful to make sure there is always something in the line so // that the height does not change } }
Creates the markup for the select for both the simple HTML and AT skin versions.
@param {aria.templates.MarkupWriter} out Markup writer
@protected
Creates the markup for the select for both the simple HTML and AT skin versions .