diff --git a/assets/js/public/code-snippet.js b/assets/js/public/code-snippet.js index 49cfc086..c33a31e7 100644 --- a/assets/js/public/code-snippet.js +++ b/assets/js/public/code-snippet.js @@ -75,8 +75,8 @@ showTooltip: function( e, msg ) { $( e ).addClass( 'sui-tooltip' ); - $( e ).prop( 'aria-label', msg ); - $( e ).prop( 'data-tooltip', msg ); + $( e ).attr( 'aria-label', msg ); + $( e ).data( 'tooltip', msg ); }, generateUniqueId: function() { @@ -102,7 +102,7 @@ $.fn[ pluginName ] = function( options ) { return this.each( function() { - // instance of SUICodeSnippet can be called with $(element).data('SUICodeSnippet') + // instance of SUICodeSnippet can be called with $(element).data( 'SUICodeSnippet') if ( ! $.data( this, pluginName ) ) { $.data( this, pluginName, new SUICodeSnippet( this, options ) ); } diff --git a/assets/js/public/form-field-required.js b/assets/js/public/form-field-required.js index 92868779..3ce87ed9 100644 --- a/assets/js/public/form-field-required.js +++ b/assets/js/public/form-field-required.js @@ -27,7 +27,7 @@ const label = field.find( '.forminator-label' ); const text = label.text(); - $( this ).prop( 'aria-required', 'true' ); + $( this ).attr( 'aria-required', 'true' ); if ( label.length ) { label.html( text + ' ' + required ); @@ -49,7 +49,7 @@ const label = field.find( '.forminator-label' ); const text = label.text(); - $( this ).prop( 'aria-required', 'true' ); + $( this ).attr( 'aria-required', 'true' ); if ( label.length ) { label.html( text + ' ' + required ); @@ -69,13 +69,13 @@ const text = label.text(); radio.each( function() { - $( this ).find( 'input' ).prop( 'aria-required', 'true' ); + $( this ).find( 'input' ).attr( 'aria-required', 'true' ); }); if ( radio.length ) { field.addClass( 'forminator-is_required' ); - field.prop( 'aria-required', 'true' ); + field.attr( 'aria-required', 'true' ); if ( label.length ) { label.html( text + ' ' + required ); @@ -92,13 +92,13 @@ const text = label.text(); checkbox.each( function() { - $( this ).find( 'input' ).prop( 'aria-required', 'true' ); + $( this ).find( 'input' ).attr( 'aria-required', 'true' ); }); if ( checkbox.length ) { field.addClass( 'forminator-is_required' ); - field.prop( 'aria-required', 'true' ); + field.attr( 'aria-required', 'true' ); if ( label.length ) { label.html( text + ' ' + required ); @@ -118,11 +118,11 @@ if ( mutliselect.length ) { checkbox.each( function() { - $( this ).find( 'input' ).prop( 'aria-required', 'true' ); + $( this ).find( 'input' ).attr( 'aria-required', 'true' ); }); field.addClass( 'forminator-is_required' ); - field.prop( 'aria-required', 'true' ); + field.attr( 'aria-required', 'true' ); if ( label.length ) { label.html( text + ' ' + required ); diff --git a/assets/js/public/form-field-unique.js b/assets/js/public/form-field-unique.js index 69437340..6726b4c0 100644 --- a/assets/js/public/form-field-unique.js +++ b/assets/js/public/form-field-unique.js @@ -12,7 +12,7 @@ const element = $( el ); const form = element.closest( '.forminator-custom-form' ); - if ( '' === form.prop( 'data-id' ) ) { + if ( '' === form.data( 'id' ) ) { return; } @@ -39,7 +39,7 @@ } if ( dscrp.length ) { - dscrp.prop( 'aria-describedby', getUniqueId ); + dscrp.attr( 'aria-describedby', getUniqueId ); } }); } @@ -66,7 +66,7 @@ } if ( dscrp.length ) { - dscrp.prop( 'aria-describedby', getUniqueId ); + dscrp.attr( 'aria-describedby', getUniqueId ); } }); } @@ -141,7 +141,7 @@ } if ( dscrp.length ) { - dscrp.prop( 'aria-describedby', idUnique ); + dscrp.attr( 'aria-describedby', idUnique ); } }); } @@ -170,7 +170,7 @@ } if ( dscrp.length ) { - dscrp.prop( 'aria-describedby', idUnique ); + dscrp.attr( 'aria-describedby', idUnique ); } }); } diff --git a/assets/js/public/forms-section-samples.js b/assets/js/public/forms-section-samples.js index 4656dc69..30573369 100644 --- a/assets/js/public/forms-section-samples.js +++ b/assets/js/public/forms-section-samples.js @@ -36,7 +36,7 @@ const column = $( this ); const field = column.data( 'field' ); - if ( column.prop( 'data-field' ) && '' !== column.prop( 'data-field' ) ) { + if ( column.data( 'field' ) && '' !== column.data( 'field' ) ) { column.load( 'templates/form-elements/field-' + field + '.html', function() { diff --git a/assets/js/public/page-accessibility.js b/assets/js/public/page-accessibility.js index 7b33ea85..e9ab62e6 100644 --- a/assets/js/public/page-accessibility.js +++ b/assets/js/public/page-accessibility.js @@ -17,7 +17,7 @@ if ( true === column.data( 'conditional' ) ) { row.hide(); - row.prop( 'aria-hidden', 'true' ); + row.attr( 'aria-hidden', 'true' ); checkbox.on( 'click', function() { @@ -26,7 +26,7 @@ row.removeAttr( 'aria-hidden' ); } else { row.hide(); - row.prop( 'aria-hidden' ); + row.attr( 'aria-hidden' ); } }); } @@ -61,7 +61,7 @@ if ( content.find( '> li' ).length === nextPage.data( 'step' ) ) { $( this ).prop( 'disabled', true ); - $( this ).prop( 'aria-hidden', true ); + $( this ).attr( 'aria-hidden', true ); } e.preventDefault(); @@ -87,7 +87,7 @@ if ( 1 === prevPage.data( 'step' ) ) { $( this ).prop( 'disabled', true ); - $( this ).prop( 'aria-hidden', true ); + $( this ).attr( 'aria-hidden', true ); } e.preventDefault(); @@ -126,7 +126,7 @@ const colDiv = $( this ); const colField = colDiv.data( 'field' ); - if ( colDiv.prop( 'data-field' ) && '' !== colDiv.prop( 'data-field' ) ) { + if ( colDiv.data( 'field' ) && '' !== colDiv.data( 'field' ) ) { colDiv.load( 'templates/form-elements/field-' + colField + '.html', function() { @@ -146,7 +146,7 @@ // Hidden field if ( true === column.data( 'conditional' ) ) { - columnUnwrapped.prop( 'data-conditional', 'true' ); + columnUnwrapped.data( 'conditional', 'true' ); } // Hide column @@ -177,7 +177,7 @@ FUI.multiSelectStates( multiselect ); // Load "Material" design wrappers - if ( 'material' === column.closest( '.forminator-custom-form' ).prop( 'data-design' ) ) { + if ( 'material' === column.closest( '.forminator-custom-form' ).data( 'design' ) ) { if ( input.length ) { diff --git a/assets/js/public/page-polls.js b/assets/js/public/page-polls.js index 5fcd4bdb..4c039660 100644 --- a/assets/js/public/page-polls.js +++ b/assets/js/public/page-polls.js @@ -40,7 +40,7 @@ // Hide response for screen readers response.removeAttr( 'tabindex' ); - response.prop( 'aria-hidden', 'true' ); + response.attr( 'aria-hidden', 'true' ); } @@ -171,7 +171,7 @@ // Hide poll form field.hide(); - field.prop( 'aria-hidden', 'true' ); + field.attr( 'aria-hidden', 'true' ); if ( wrapper.length ) { @@ -205,7 +205,7 @@ // Hide "view results" link link.hide(); - link.prop( 'aria-hidden', 'true' ); + link.attr( 'aria-hidden', 'true' ); e.preventDefault(); @@ -229,17 +229,17 @@ // Hide chart wrapper.removeClass( 'forminator-show' ); wrapper.removeAttr( 'tabindex' ); - wrapper.prop( 'aria-hidden', 'true' ); + wrapper.attr( 'aria-hidden', 'true' ); chart.removeClass( 'forminator-show' ); - chart.prop( 'aria-hidden', 'true' ); + chart.attr( 'aria-hidden', 'true' ); } else { // Hide chart chart.removeClass( 'forminator-show' ); chart.removeAttr( 'tabindex' ); - chart.prop( 'aria-hidden', 'true' ); + chart.attr( 'aria-hidden', 'true' ); } diff --git a/assets/js/public/page-quizzes.js b/assets/js/public/page-quizzes.js index a7135ad5..f328042a 100644 --- a/assets/js/public/page-quizzes.js +++ b/assets/js/public/page-quizzes.js @@ -105,7 +105,7 @@ let resultText = 'You selected a wrong answer.'; - if ( answer.val() === question.prop( 'data-correct-answer' ) ) { + if ( answer.val() === question.data( 'correct-answer' ) ) { icon = 'check'; validate = 'correct'; resultText = 'Right! You selected the correct answer.'; @@ -150,7 +150,7 @@ answer.prop( 'checked', true ); answers.prop( 'disabled', true ); - if ( answer.val() === question.prop( 'data-correct-answer' ) ) { + if ( answer.val() === question.data( 'correct-answer' ) ) { icon = 'check'; validate = 'correct'; resultText = 'Right! You selected the correct answer.'; @@ -200,11 +200,11 @@ form = $( this ); - if ( typeof undefined !== typeof form.prop( 'data-quiz' ) && 'knowledge' === form.prop( 'data-quiz' ) ) { + if ( typeof undefined !== typeof form.data( 'quiz' ) && 'knowledge' === form.data( 'quiz' ) ) { SHOWCASE.demoKnowledge( this ); } - if ( typeof undefined !== typeof form.prop( 'data-quiz' ) && 'nowrong' === form.prop( 'data-quiz' ) ) { + if ( typeof undefined !== typeof form.data( 'quiz' ) && 'nowrong' === form.data( 'quiz' ) ) { SHOWCASE.demoNoWrong( this ); } diff --git a/assets/js/select2.full.js b/assets/js/select2.full.js index ca79ae6f..d3a70c33 100644 --- a/assets/js/select2.full.js +++ b/assets/js/select2.full.js @@ -799,7 +799,7 @@ ); if (this.options.get('multiple')) { - $results.prop('aria-multiselectable', 'true'); + $results.attr('aria-multiselectable', 'true'); } this.$results = $results; @@ -918,9 +918,9 @@ if ((item.element != null && item.element.selected) || (item.element == null && $.inArray(id, selectedIds) > -1)) { - $option.prop('aria-selected', 'true'); + $option.attr('aria-selected', 'true'); } else { - $option.prop('aria-selected', 'false'); + $option.attr('aria-selected', 'false'); } }); @@ -1071,8 +1071,8 @@ container.on('open', function () { // When the dropdown is open, aria-expended="true" - self.$results.prop('aria-expanded', 'true'); - self.$results.prop('aria-hidden', 'false'); + self.$results.attr('aria-expanded', 'true'); + self.$results.attr('aria-hidden', 'false'); self.setClasses(); self.ensureHighlightVisible(); @@ -1080,8 +1080,8 @@ container.on('close', function () { // When the dropdown is closed, aria-expended="false" - self.$results.prop('aria-expanded', 'false'); - self.$results.prop('aria-hidden', 'true'); + self.$results.attr('aria-expanded', 'false'); + self.$results.attr('aria-hidden', 'true'); self.$results.removeAttr('aria-activedescendant'); }); @@ -1104,7 +1104,7 @@ var data = $highlighted.data('data'); - if ($highlighted.prop('aria-selected') == 'true') { + if ($highlighted.attr('aria-selected') == 'true') { self.trigger('close', {}); } else { self.trigger('select', { @@ -1216,7 +1216,7 @@ var data = $this.data('data'); - if ($this.prop('aria-selected') === 'true') { + if ($this.attr('aria-selected') === 'true') { if (self.options.get('multiple')) { self.trigger('unselect', { originalEvent: evt, @@ -1391,7 +1391,7 @@ }); container.on('results:focus', function (params) { - self.$selection.prop('aria-activedescendant', params.data._resultId); + self.$selection.attr('aria-activedescendant', params.data._resultId); }); container.on('selection:update', function (params) { @@ -1400,15 +1400,15 @@ container.on('open', function () { // When the dropdown is open, aria-expanded="true" - self.$selection.prop('aria-expanded', 'true'); - self.$selection.prop('aria-owns', resultsId); + self.$selection.attr('aria-expanded', 'true'); + self.$selection.attr('aria-owns', resultsId); self._attachCloseHandler(container); }); container.on('close', function () { // When the dropdown is closed, aria-expanded="false" - self.$selection.prop('aria-expanded', 'false'); + self.$selection.attr('aria-expanded', 'false'); self.$selection.removeAttr('aria-activedescendant'); self.$selection.removeAttr('aria-owns'); @@ -1525,7 +1525,7 @@ var id = container.id + '-container'; this.$selection.find('.select2-selection__rendered').prop('id', id); - this.$selection.prop('aria-labelledby', id); + this.$selection.attr('aria-labelledby', id); this.$selection.on('mousedown', function (evt) { // Only respond to left clicks @@ -1906,7 +1906,7 @@ }); container.on('results:focus', function (params) { - self.$search.prop('aria-activedescendant', params.id); + self.$search.attr('aria-activedescendant', params.id); }); this.$selection.on('focusin', '.select2-search--inline', function (evt) { @@ -5194,7 +5194,7 @@ // Hide the original select $element.addClass('select2-hidden-accessible'); - $element.prop('aria-hidden', 'true'); + $element.attr('aria-hidden', 'true'); // Synchronize any monitored attributes this._syncAttributes(); @@ -5691,7 +5691,7 @@ this.$element.prop('tabindex', this.$element.data('old-tabindex')); this.$element.removeClass('select2-hidden-accessible'); - this.$element.prop('aria-hidden', 'false'); + this.$element.attr('aria-hidden', 'false'); this.$element.removeData('select2'); this.dataAdapter.destroy(); diff --git a/library/js/authentication.js b/library/js/authentication.js index 222f94c6..601b3fef 100644 --- a/library/js/authentication.js +++ b/library/js/authentication.js @@ -274,7 +274,7 @@ } else { this.backdropNode = document.createElement( 'div' ); this.backdropNode.className = backdropClass; - this.backdropNode.prop( 'data-markup', 'new' ); + this.backdropNode.data( 'markup', 'new' ); this.dialogNode.parentNode.insertBefore( this.backdropNode, this.dialogNodev ); this.backdropNode.appendChild( this.dialogNode ); } diff --git a/library/js/form-load.js b/library/js/form-load.js index 9f8b1322..53c31010 100644 --- a/library/js/form-load.js +++ b/library/js/form-load.js @@ -24,13 +24,13 @@ // Make sure response message // is not accessible by screen readers - message.prop( 'aria-hidden', 'true' ); + message.attr( 'aria-hidden', 'true' ); } function formId() { - const attrId = form.prop( 'data-id' ); + const attrId = form.data( 'id' ); const dataId = form.data( 'id' ); if ( attrId.length && '' !== attrId ) { @@ -40,7 +40,7 @@ function formDesign() { - const attrDesign = form.prop( 'data-design' ); + const attrDesign = form.data( 'design' ); const dataDesign = form.data( 'design' ); if ( attrDesign && '' !== attrDesign ) { @@ -52,7 +52,7 @@ function formGrid() { - const attrGrid = form.prop( 'data-grid' ); + const attrGrid = form.data( 'grid' ); const dataGrid = form.data( 'grid' ); // Reset diff --git a/library/js/form-simulation.js b/library/js/form-simulation.js index effb8de6..30b09767 100644 --- a/library/js/form-simulation.js +++ b/library/js/form-simulation.js @@ -35,7 +35,7 @@ response.removeClass( 'forminator-success' ); // Hide response for screen readers - response.prop( 'aria-hidden', 'true' ); + response.attr( 'aria-hidden', 'true' ); response.removeAttr( 'tabindex' ); // Remove error class from fields diff --git a/library/js/select2.js b/library/js/select2.js index 78a86c44..8345c64c 100644 --- a/library/js/select2.js +++ b/library/js/select2.js @@ -58,7 +58,7 @@ $language = 'en'; } - if ( 'true' === $select.prop( 'data-search' ) ) { + if ( 'true' === $select.data( 'search' ) ) { $hasSearch = 0; }