How to use the ariatemplates/utils/Array.map function in ariatemplates

To help you get started, we’ve selected a few ariatemplates examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ariatemplates / ariatemplates / test / aria / widgets / form / multiautocomplete / navigation / RobotBase.js View on Github external
asynchronous : true,
            trace : {
                enable : this.enableTracing,
                collapsed : false,
                logTask : this.logTaskInTrace,
                color : 'blue'
            }
        });
        this.sequencer = sequencer;

        // ---------------------------------------------------------- processing

        // Registers methods that are synchronous
        // The other ones will be considered asynchronous by default regarding the property set above
        // Also, not all methods need that, only those that are going to be used directly in task definitions
        sequencer.registerMethodsProperties(ariaUtilsArray.map([
            'checkCaretAndFocus',
            'checkHighlightedOption',
            'checkInsertedOptionsCount',
            'shouldBeInHighlightedMode',
            'shouldInputFieldBeFocused'
        ], function (name) {
            return {
                name : name,
                asynchronous : false
            };
        }));

        // ------------------------------------------------- internal attributes

        this._toDispose = [];
    },
github ariatemplates / ariatemplates / test / aria / widgets / wai / datePicker / readDate / TplScript.js View on Github external
content: 'focus me'
            };
            elements.before = before;

            // -----------------------------------------------------------------

            var binding = {
                inside: {},
                to: 'date'
            };
            binding.inside[binding.to] = new Date(2016, 8, 6, 12);

            var confirmDateDelay = data.confirmDateDelay;
            var confirmDateFormat = 'EEEE d MMMM yyyy';

            var widgets = ariaUtilsArray.map([
                'one',
                'two'
            ], function (name) {
                return {
                    label: subst('calendar %1 label', name),
                    waiAria: true,
                    waiAriaCalendarLabel: subst('calendar %1', name),
                    waiIconLabel: subst('calendar %1 button', name),
                    bind: {value: binding},
                    waiAriaConfirmDateDelay: confirmDateDelay,
                    waiAriaConfirmDateFormat: confirmDateFormat
                };
            });
            data.widgets = widgets;
        }
    }
github ariatemplates / ariatemplates / test / aria / widgets / wai / tabs / Model.js View on Github external
function buildData(index) {
    var macro = 'displayTabPanel';
    var bindingContainer = {};

    var groups = ariaUtilsArray.map([
        {
            id: 'up',
            waiAria: false,
            tabsUnder: false
        },
        {
            id: 'down',
            waiAria: false,
            tabsUnder: true
        },
        {
            id: 'up_waiAria',
            waiAria: true,
            tabsUnder: false
        },
        {
github ariatemplates / ariatemplates / test / aria / widgets / wai / popup / dialog / modal / Model.js View on Github external
function buildData(index) {
    var dialogs = ariaUtilsArray.map([
        {
            wai: false
        },
        {
            wai: true,
            fill: true
        },
        {
            wai: true,
            fullyEmpty: true
        },
        {
            wai: true,
            displayInContainer: true
        }
    ], function (spec) {
github ariatemplates / ariatemplates / test / aria / widgets / form / multiautocomplete / navigation / Sequence.js View on Github external
addTasks : function (input) {
            return ariaUtilsArray.map(ariaUtilsArray.ensureWrap(input), function (item) {
                return this.addTask(item);
            });
        },