Get E-Price
Contact Us
ENCORE
TOTAL IN-TRANSIT
0
ENCORE GX
TOTAL IN-TRANSIT
1
ENVISON
TOTAL IN-TRANSIT
0
ENCLAVE
TOTAL IN-TRANSIT
4
TERRAIN
TOTAL IN-TRANSIT
1
ACADIA
TOTAL IN-TRANSIT
2
YUKON
TOTAL IN-TRANSIT
4
CANYON
TOTAL IN-TRANSIT
7
SIERRA 1500
TOTAL IN-TRANSIT
4
SIERRA HD
TOTAL IN-TRANSIT
8
NEW INVENTORY IS ON THE WAY!
var f = function (ele, api) { /* ______ _______ _______ _______ ______ _____ __ _ _______ _____ _____ ______ _______ | \ |______ |_____| | |______ |_____/ | | \ | |______ |_____] | |_____/ |______ |_____/ |______ | | |_____ |______ | \_ __|__ | \_| ______| | __|__ | \_ |______ */
ele.outerFind('.lvrp-mobile-filters, #homepage-advanced-search').addClass('ae-mutation-ignore'); ele.outerFind('.facets-content').addClass('ae-mutation-ignore'); // if no parent element, no reason to run remediations - this should be fixed at platform level //if (ele.length === 1 && !ele[0].parentElement) return;
/////////////////COVID-19 hot-fix////////////////// api.convertToBtn(ele.outerFind('.wdpu-container a.wdpu-close').append(' Close COVID-19 message ')); api.convertToBtn('.wdpu-container .wdpu-message a.wdpu-hide-forever'); ele.outerFind('.wdpu-container').each(function () { setTimeout(function () { AudioEye.focusElement('.wdpu-container a.wdpu-close'); AudioEye.modals.enableTabLoop('.wdpu-container'); }, 300); }); ele.outerFind('.wdpu-container a.wdpu-close, .wdpu-container .wdpu-message a.wdpu-hide-forever').on('keydown', function(e) { if ( e.keyCode == 13 || e.keyCode == 32 ) { AudioEye.focusElement('#ae-skip-to-anchor'); this.click(); } });
////////////////////////// WCAG 2 REMEDIATIONS //////////////////////////c
api.setAlt('img[src$="Button-RequestMoreInfo.gif"]', 'Request more info'); api.setAlt('img[src$="Button-ValueYourTrade.gif"]', 'Value your Trade'); api.setAlt('img[src*="//www.assetfilemanager.com/"]', ''); api.setAlt('.flex-control-nav >li>img', ''); api.setAlt('img[src="https://di-uploads-pod4.s3.amazonaws.com/arlingtontoyota1/uploads/2016/12/BBB-logo.jpg"]', 'BBB Acredited Business'); //carousel images in modals var popupCarouselImgAlt = 0; ele.outerFind('.quicklook-gallery .tn3-dark-thumbs .tn3-dark-thumb img').each(function () { $ae(this).attr('alt', $ae(this).closest('.vrp-quick-look').find('h5').text().trim() + ' image ' + popupCarouselImgAlt); popupCarouselImgAlt++; }); // video thumbnails ele.outerFind('.button-bar-item.full-motion-video img').each(function () { $ae(this).attr('alt', $ae(this).closest('.vehicle').find('.vehicle-overview .vehicle-title h2').text()); }); ele.outerFind('img[src="https://s3.amazonaws.com/conversations-files/global/conversations-simple-white.png"]').attr('alt', 'Have a Conversation');
// national offer img ele.outerFind('.national-incentive-offers img').each(function () { $ae(this).attr('alt', $ae(this).prev('.offer-title').text().trim()); }); // table checmark alt api.setAlt('img.Check', 'check yes');
// video play img alt api.setAlt('img[src^="https://www.idostream.com/liveeventstream/images"]', 'Play Full motion Video'); api.setAlt('img.beacon', '');
// weather icon alt api.setAlt('img[src="/wp-content/theme/DealerInspireCommonTheme/images/mobile/weather/01d.png"]', ''); api.setAlt('img[src^="/wp-content/themes/DealerInspireCommonTheme/images/mobile/weather/"]', '');
// decorative ele.outerFind('img[src="/wp-content/themes/DealerInspireCommonTheme/images/mobile/weather/50n.png"]').attr('alt', ''); ele.outerFind('img[src="//cdn.tradepending.com/PoweredByTPWhite.png"]').attr('alt', 'Powered By'); api.setAlt('#acf-map img', ''); api.setAlt('img.pageview', ''); api.setAlt('img[src^="https://id.rlcdn.com/"]', ''); api.setAlt('img[src^="https://id.rlcdn.com/466556.gif"]', ''); api.setAlt('img[src^="//id.rlcdn.com/466556.gif"]', ''); api.setAlt('img[src="https://s3.amazonaws.com/tf-widgets/icons/car.png"]', ''); api.setAlt('img[src="https://s3.amazonaws.com/tf-widgets/icons/search.png"]', ''); api.setAlt('img[src="https://s3.amazonaws.com/tf-widgets/icons/diploma.png"]', ''); api.setAlt('img[src="//graphicspotratz.s3.amazonaws.com/potratzpotratz/buildCreditScore/comp.jpg"]', ''); api.setAlt('img[src="//graphicspotratz.s3.amazonaws.com/potratzpotratz/buildCreditScore/footer.jpg"]', ''); api.setAlt('img[src^="//graphicspotratz.s3.amazonaws.com"]', ''); api.setAlt('img[src^="https://graphicspotratz.s3.amazonaws.com"]', ''); api.setAlt('img.beacon', ''); api.setAlt('img[src*="https://fzlnk.com/"]', ''); ele.outerFind('body >img[src*="https://fzlnk.com/"]').attr('alt', ''); ele.outerFind('img[src*="https://fzlnk.com/pfzurl"]'); ele.outerFind('img[src*="https://fzlnk.com/pfzurl.ashx?webkey"]'); ele.outerFind('img[src*="https://fzlnk.com/HandleSignal.ashx"]'); api.setAlt('img[src$="leadmaker_icon_pomegranate.svg"]', '');
api.setAlt('img[src="https://di-uploads-pod4.dealerinspire.com/arlingtontoyota1/uploads/2018/10/advantage-club-logo.jpg"]', 'Arlington Toyota advantage club'); api.setAlt('img[src="https://di-uploads-pod4.dealerinspire.com/arlingtontoyota1/uploads/2017/07/toyoguard-platinum.png"]', 'ToyoGuard Platimum'); api.setAlt('img[src="https://di-uploads-pod4.dealerinspire.com/arlingtontoyota1/uploads/2015/10/specific_calculator_banner-1.png"]', 'Want a specific payment? we are here to help. contact us today.'); api.setAlt('img[src$="/TSS_Logo.png"]', 'Toyota Safty Sense'); api.setAlt('img[src$="/careSmall.jpg"]', 'Toyota Care no cost service and roadside'); api.setAlt('img[src$="lifetimewarranty.jpg.png"]', 'Toyota real lifetime waranty'); api.setAlt('img[src$="https://di-uploads-pod4.dealerinspire.com/arlingtontoyota1/uploads/2019/02/toyorl_srp__1_.jpg"]', 'Ready Set Go'); // unlock price image alt api.setAlt('img[src="https://di-uploads-pod4.dealerinspire.com/arlingtontoyota1/uploads/2018/10/unlock-price.png"]', 'unlock price'); // check recall button image alt api.setAlt('img[src="https://di-uploads-pod4.dealerinspire.com/arlingtontoyota1/uploads/2016/07/GATO-1272-RecallButton-1.png"]', 'Check Open Recalls');
// KBB banner alt api.setAlt('img[src="https://timdealers.autotrader.com/images/Autotrader/DWSI/Assets/12_Q3_158_TIM_WebBanner_940x84_TradeIn.jpg"]', 'Ready to sell or trade your car? get a kelly blue book instant cash offer in minutes. Get My Offer'); // AE - carfax logo api.setAlt('img[src="https://di-uploads-pod5.dealerinspire.com/aventurachryslerjeepdodgeram/uploads/2016/03/Free-CarFax-Logo.png"]', 'Free Car Fax');
// AE - google maps logo api.setAlt('img[src="https://maps.gstatic.com/mapfiles/api-3/images/google4.png"]', 'Google Maps');
// premier porsh dealer alt api.setAlt('img[src$="DealerInspireDealerTheme/images/premier-logo.png"]', '2018 Premier Porschee Dealer');
// vehicle img alt ele.outerFind('.vehicle-image a > img').each(function () { $ae(this).attr('alt', $ae(this).closest('.vehicle-image').next().find('.vehicle-title').text().trim()); }); // vehicle records alt ele.outerFind('a img[src^="https://ws-api.autoipacket.com/"]').each(function () { $ae(this).attr('alt', 'Vehicle Records for ' + $ae(this).closest('.vehicle').find('.vehicle-title h2').text().trim()); });
// true cash image alt api.setAlt('a[href*="/true-cash-offer/"] img[src$="/SRP-Button-blue.png"]', 'Get a True Cash Offer for Trade in or sale'); api.setAlt('a[href*="/true-cash-offer/"] img[src*="/SRP-Button-light-blue-1.png"]', 'Get a True Cash Offer for Trade in or sale');
// true 360 images api.setAlt('img[src^="https://s3.amazonaws.com/tf-widgets/tc360/srp.png"]', 'True 360 degree Live Vehicle Inspection report'); api.setAlt('img[src="https://s3.amazonaws.com/tf-widgets/tc360/vdp_shield.png"]', 'True 360 degree Live Vehicle Inspection. View Report'); // gallery images on model pages var galleryImg_num = 1; $ae('.galleryrow .imagegallery a.model-page-fancybox img').each(function () { $ae(this).attr('alt', $ae(this).closest('body').find('section.titlerow h1').text().trim() + ' image ' + galleryImg_num + ' Opens a larger version of this image.'); galleryImg_num++; }); ele.outerFind('img[src$="_Button-FindYours.gif"]').each(function () { $ae(this).attr('alt', $ae(this).closest('.intro').next().next().next('h4').text().trim()); }); // coupon img alt ele.outerFind('.coupon-card img').each(function () { $ae(this).attr('alt', $ae(this).parent().next('.title').find('h3').text().trim()); }); ////////////////////////// END Image ALT
////////////////////////// Tables // not tables api.setPresentation('.inventory-owl table#results-page'); ele.outerFind('.results_table').attr('role', 'presentation'); ele.outerFind('.cn-b11-bar >table').attr('role', 'presentation'); api.setPresentation('table.mtable'); api.setPresentation('table#icontable'); api.setPresentation('table.odometerCheckTable'); api.setPresentation($ae('table.table-borderless-th').has('ul'));
// legit tables ele.outerFind('table.veh-info').find('tr th:nth-of-type(1)').attr('role', 'rowheader');
ele.outerFind('table.inspectionTable').find('thead tr th').attr('role', 'columnheader'); ele.outerFind('table.serviceTable').find('thead tr th').attr('role', 'columnheader'); ele.outerFind('table.table-striped.historyTable').find('thead tr th').attr('role', 'columnheader'); ele.outerFind('table.glossaryTable').find('thead tr th').attr('role', 'columnheader'); ////////////////////////// END Tables //////////////////////////
////////////////////////// FORMS ////////////////////////// // recaptcha label ele.outerFind('#g-recaptcha-response').attr('aria-label', 'g-recaptcha-response');
// Get form titles and set aria-labels ele.outerFind('form[data-gf_title]').not('[title]').each(function () { $ae(this).attr('aria-label', $ae(this).attr('data-gf_title')); }); // reset tabindex ele.outerFind('input[tabindex]').attr('tabindex', '0'); ele.outerFind(' textarea[tabindex]').attr('tabindex', '0'); ele.outerFind('select[tabindex]').attr('tabindex', '0');
ele.outerFind('.groupon-filter-container .filter-option .filter-count').attr('aria-hidden', 'true');
var js_ae_labelId = 0; ele.outerFind('.groupon-sidebar').not('.groupon-mobile-filters').find('.groupon-sidebar-filters').find('.filter-checkbox a').not('[id]').each(function () { $ae(this).attr('id', 'js_ae_labelId' + js_ae_labelId); js_ae_labelId++; });
ele.outerFind('.groupon-sidebar').not('.groupon-mobile-filters').find('.groupon-sidebar-filters input[type="checkbox"]').each(function () { $ae(this).attr('aria-describedby', $ae(this).closest('.groupon-filter-container').prev('.filter-heading').attr('id')); });
ele.outerFind('.groupon-filter-container .filter-checkbox a').each(function () { $ae(this).attr({ 'aria-label': $ae(this).closest('.filter-option').find('.filter-count').text() + ' count vehicles in ' + $ae(this).text(), 'aria-describedby': $ae(this).closest('.filter-checkbox').find('input[type="checkbox"]').attr('aria-describedby') }); });
ele.outerFind('.filter-checkbox a').attr({ 'role': 'checkbox', 'aria-checked': 'false' }); ele.outerFind('.filter-checkbox a[role="checkbox"]').each(function () { if ($ae(this).parent().find('input[type="checkbox"]').attr('checked') == "checked") { $ae(this).attr('aria-checked', 'true'); } else { $ae(this).attr('aria-checked', 'false'); } });
ele.outerFind('.filter-checkbox').each(function () { if ($ae(this).find('input[type="checkbox"]').attr('checked') == 'checked') { $ae(this).find('a[aria-checked]').attr('aria-checked', 'true'); } });
$ae('.groupon-mobile-filters').find('input[type="checkbox"]').each(function () { $ae(this).attr('aria-label', $ae(this).closest('.filter-checkbox').find('a').text().trim()); }); ele.outerFind('.groupon-mobile-filters').find('input[type="checkbox"]').each(function () { $ae(this).attr('aria-labelledby', $(this).closest('.filter-checkbox').find('a').attr('id')); }); ele.outerFind('.filter-checkbox input[type="checkbox"]').each(function () { $ae(this).attr({ 'aria-label': $ae(this).attr('value'), 'role': 'presentation', 'aria-hidden': 'true', 'tabindex': '-1' }); }); // describedby var js_ae_mobileDescribedbyId = 0; ele.outerFind('.groupon-mobile-filters').find('.groupon-sidebar-filters input[type="checkbox"]').find('.filter-heading').not('[id]').each(function () { $ae(this).attr('id', 'js_ae_mobileDescribedbyId' + js_ae_mobileDescribedbyId); js_ae_mobileDescribedbyId++; });
ele.outerFind('.groupon-mobile-filters').find('.groupon-sidebar-filters input[type="checkbox"]').each(function () { $ae(this).attr('aria-describedby', $ae(this).closest('.groupon-filter-container').prev('.filter-heading').attr('id')); });
ele.outerFind('.groupon-sidebar').find('.groupon-sidebar-filters input[type="checkbox"]').attr('tabindex', '0'); ele.outerFind('.groupon-mobile-filters').find('.groupon-sidebar-filters input[type="checkbox"]').attr('tabindex', '0');
// AE remove tabset attributes in side bar filter accordions ele.outerFind('.groupon-sidebar-filters[role="tablist"]').removeAttr('role'); ele.outerFind('.groupon-sidebar-container[role="tabpanel"]').removeAttr('role'); ele.outerFind('.groupon-filter-container').removeAttr('role');
ele.outerFind('.groupon-sidebar-filters .filter-heading').removeAttr('aria-controls');
// remove role attribute on form inside search accordion ele.outerFind('.search-toggle form').removeAttr('role');
var js_ae_describedbyIda = 0; ele.outerFind('.gfield > label.gfield_label').not('[id]').each(function () { $ae(this).attr('id', 'js_ae_describedbyIda' + js_ae_describedbyIda); js_ae_describedbyIda++; });
ele.outerFind('.gfield .gfield_checkbox input[type="checkbox"]').each(function () { $ae(this).attr('aria-describedby', $ae(this).closest('.ginput_container_checkbox').prev('label').attr('id')); });
// radios described var js_radio_describedId = 0; ele.outerFind('#reviews h3').each(function () { $ae(this).attr('id', 'js_radio_describedId' + js_radio_describedId); js_radio_describedId++; }); ele.outerFind('#reviews input[type="radio"]').each(function () { $ae(this).attr('aria-describedby', $ae(this).parent().prev('h3').attr('id')); js_radio_describedId++; });
ele.outerFind('.gfield_radio input[type="radio"]').each(function () { $ae(this).attr('aria-describedby', $ae(this).closest('.ginput_container').prev('label.gfield_label').attr('id')); });
// required inputs ele.outerFind('label').filter(':contains(*)').each(function () { $ae(this).next('input, textarea').attr('aria-required', 'true'); });
// AE - filter checkbox descriptions
ele.outerFind('.filters-box input[type="checkbox"]').each(function () { $ae(this).attr('aria-describedby', $ae(this).closest('.filters-box').attr('id')); });
ele.outerFind('.gfield_contains_required').find('input,select,textarea').attr('aria-required', 'true'); ele.outerFind('input[required]').attr('aria-required', 'true'); ele.outerFind('textarea[required]').attr('aria-required', 'true');
// AE - sort by combobox label ele.outerFind('.action-header-buttons input.im-reset-filters').attr('aria-label', 'Reset Search. This will refresh the page.'); ele.outerFind('.sorting-options select').attr('aria-label', 'Sort By. This will refresh the page.');
// AE - top filter listboxes ele.outerFind('.top-filter .btn-group div.dropdown-menu').attr('role', 'listbox');
////////////////////////// END FORMS ////////////////////////// ////////////////////////// iFrames /////////////////////////// api.setTitle('iframe[src*="//plugins.dealerscience.com/iframe.php?"]', 'Dealer Science'); api.setTitle(ele.outerFind('iframe[src^="https://www.timehighway.com"]:empty'), 'empty iframe'); api.setTitle('iframe:empty', 'empty iframe'); api.setPresentation(ele.outerFind('iframe').not('[src]')); api.setTitle(ele.outerFind('iframe').not('[src]'), 'empty iframe');
api.setTitle('iframe[src^="https://scheduler1.dealer-fx.com"]', 'Schedule Service'); api.setTitle('iframe[src^="https://www.routeone.net/XRD"]', 'Apply For Financing');
api.setTitle('iframe[src^="https://gettradevalue.com/TradeTool"]', 'Get Trade Value'); api.setTitle('iframe[src^="https://pauc.syndication.kbb.com/priceadvisorusedcar"]', 'Kelly Blue Book Fair Purchase Price'); api.setTitle('iframe[src^="https://tools.inticeinc.com/Redemption"]', 'Intice Redeem Offer');
api.setTitle('iframe[src^="//pauc.syndication.kbb.com/priceadvisorusedcar/fairpurchaseprice?"]', 'Kelly Blue Book Fair Purchase Price'); ele.outerFind('iframe[src="https://jimellisporsche.emarketassistant.com/"]').attr('title', 'Apply for financing'); api.setTitle('iframe[src*="https://menu.flathatsystems.com/webappt/2169/5aaa19b27b0dd3c8"]', 'tracking iframe'); api.setTitle('iframe[src*="https://ebusiness.dealertrack.com/Suite/"]', 'Dealer track iframe'); ele.outerFind('iframe').filter(':contains(Ajax powered Gravity)').attr('title', 'Ajax powered Gravity Forms iframe'); ele.outerFind('iframe#cross-domain-iframe[src$="//foureyes.adpearance.com/UtilServlet?action=iframeLoader&did=3664&origin=http%3A%2F%2Fwww.capecoralchryslerdodgejeepram.com"]').attr('title', 'Four Eyes Iframe'); ele.outerFind('iframe#ExitGadget[src$="//potratzapi.com/form/?id=exitgadget&key=H1513373805O-238"]').attr('title', 'potratz iframe'); ele.outerFind('iframe[src^="https://www.google.com/recaptcha"]').attr('title', 'Google Recaptcha'); ele.outerFind('iframe[src^="https://www.google.com/maps/embed"], iframe[src^="http://www.google.com/maps/embed"]').attr('title', 'Google Maps iframe'); ele.outerFind('iframe#xdremote').attr('title', 'remote iframe'); ele.outerFind('iframe[src^="https://cdn.purecars.com"]').attr('title', 'Pure Car Iframe'); ele.outerFind('iframe[src^="//www.accreditapp.com/ACCreditApp"]').attr('title', 'Apply For Financing'); ele.outerFind('iframe[src^="//consumer.xtime.com/scheduling/"]').attr('title', 'Schedule Service'); ele.outerFind('iframe[src^="https://m.xtime.com/scheduling/"]').attr('title', 'Schedule Service'); ele.outerFind('iframe[src^="https://consumer.xtime.com/scheduling/"]').attr('title', 'Schedule Service'); ele.outerFind('iframe[src^="https://www.kbb.com/instant-cash-offer"]').attr('title', 'Kelly Blue Book Cash Offer'); ele.outerFind('iframe[src^="https://m.xtime.com/scheduling"]').attr('title', 'Schedule Service'); ele.outerFind('iframe[src^="https://scheduler.dealer-fx.com"]').attr('title', 'Schedule Service'); ele.outerFind('iframe[src^="https://www.edmunds.com/myappraise/value-your-trade"]').attr('title', 'Edmunds Value your Trade'); ele.outerFind('iframe[src^="https://videoplayer.dealervision.com/"]').attr('title', 'Video Player'); ele.outerFind("#gform_ajax_frame_1").attr("title", "Ajax Frame"); ele.outerFind("iframe[src='//8352615.fls.doubleclick.net/activityi;src=8352615;type=damfl0;cat=finan0;ord=1;num=3310369854607;gtm=G9h;auiddc=1694273344.1537822506;~oref=https%3A%2F%2Fwww.driversautomart.com%2Ffinance%2Fapply-for-financing%2F?'][title='Doubleclick Tracking Pixel']").attr("title", "Doubleclick Tracking Pixel"); ele.outerFind("iframe[src='//ldti.syndication.kbb.com/?ProfileID=667ed677-9a7f-451b-8198-64a68cb5e539']").not('[title]').attr("title", "Kelly Blue book value iframe"); ele.outerFind("#cross-domain-iframe").not('[title]').attr("title", "ad iframe"); ele.outerFind('iframe[src^="https://pageconfig.goroost.com/pageconfig"]').attr('title', 'Page config iframe'); ele.outerFind('iframe[id^="mod-iframe-box"]').attr('title', 'Virtual Tour iframe'); ele.outerFind('iframe[src^="https://player.vimeo.com/video/"]').attr('title', 'Vimeo Player iframe'); api.setTitle('iframe#cacheIframe', 'Cashe iframe'); api.setTitle('iframe[src="https://www.miamilakesautomall.com/es/home-page-pop-up"]', 'popup iframe'); api.setTitle('iframe[src^="https://pixel.mathtag.com/sync/iframe"]', 'tracking iframe'); api.setTitle('iframe[src^="https://www.cincinnati.buyatoyota.com"]', 'Dealer offers'); api.setTitle('iframe[data-src^="https://www.youtube.com/embed"]', 'YouTube Video'); api.setTitle('iframe[src^="https://www.youtube.com/embed"]', 'YouTube Video'); api.setTitle('iframe[data-src^="https://www.facebook.com/plugins"]', 'Facebook Connect'); api.setTitle('iframe[src^="https://overtake-switcher.now.sh/embed"]', 'Overtake Switcher'); api.setTitle('iframe[src^="https://sites.hireology.com/"]', 'Hireology'); api.setTitle('iframe[src^="//customerportal.mycustomerdata.com"]', 'Customer portal'); api.setTitle('iframe[src^="https://reservations.arlingtontoyota.com/"]', 'Rental Car Reservations'); api.setTitle('iframe[src^="https://www.iprecheck.com/rv/"]', 'iprecheck '); api.setTitle('iframe[src^="//tradein.autotrader.com/Landing"]', 'Auto Trader'); api.setTitle('iframe[src^="//compare.advantastar.com"]', 'Advanta Star'); api.setTitle('iframe[src^="//www.toyota.com/recall"]', 'Toyota Recall'); api.setTitle('iframe[src^="https://www.700dealer.com/QuickQualify"]', 'Quick Qualify'); api.setTitle('iframe[src^="https://jlr.oeaccessories.com/"]', 'Vehicle Accessories'); api.setTitle('iframe[src^="//uwmedia.us/cm_jaguar/front"]', 'UW MEdia Player'); api.setTitle('iframe[src^="//ldti.syndication.kbb.com/default"]', 'Kelly BlueBook Car Value');
////////////////////////// END iFrame //////////////////////////
////////////////////////// HEADINGS ////////////////////////// api.setHeadingLevel($ae('.page-template-staff').find('h1.entry-title').next('h3'), '2'); api.setHeadingLevel($ae('h3').filter(':contains(Dealers Designed to Support Your Business)'), '2');
ele.outerFind('.payment-box h3').filter(':contains(Payment)').attr({ 'role': 'heading', 'aria-level': '2' }); api.setHeadingLevel('.specialOffersModal h1', '2'); api.setHeadingLevel('#ctabox-premium-features h3', '2'); //ele.outerFind('h3').has('>img').attr('role', 'presentation'); ele.outerFind('.staff-item').find('h4, h3').attr({ 'role': 'presentation' }); ele.outerFind('#info-accordion .panel h4.panel-title').attr('role', 'presentation'); api.setHeadingLevel('.ctabox-inner .main-action-button-form h3.gform_title', '2'); api.setHeadingLevel('#ctabox-premium-features .features-title', '3'); ele.outerFind('#newvehicles-heading > h4').filter(':contains(New Vehicle Search)').attr({ 'role': 'presentation' }); ele.outerFind('#newvehicles > div > h4').filter(':contains(Search All New Vehicles)').attr({ 'role': 'presentation' }); ele.outerFind('#preowned-heading > h4').filter(':contains(Used Vehicle Search)').attr({ 'role': 'presentation' }); ele.outerFind('#preowned h4').filter(':contains(Search All Used Vehicles)').attr({ 'role': 'presentation' });
ele.outerFind('.widget .dealer-info').find('h3').attr({ 'role': 'heading', 'aria-level': '2' }); ele.outerFind('.post-content h1').next().find('h3').attr({ 'role': 'heading', 'aria-level': '2' }); ele.outerFind('.panel-popular-parts-and-accessories h3').removeAttr('role aria-level'); ele.outerFind('.mobile-tab-content-inside.filters-container').find('h3').attr({ 'role': 'heading', 'aria-level': '2' }); ele.outerFind("#di-page-composer h3").filter(":contains('Dealer Info')").attr({ 'role': 'heading', 'aria-level': '2' }); api.setHeadingLevel('h3#reply-title', '2'); api.setHeadingLevel($ae("#di-page-composer h3").filter(":contains('Dealer Info')", '2')); api.setHeadingLevel('h3#reply-title', '2'); api.setHeadingLevel($ae("h3").filter(":contains('Dealer Info')", '2')); api.setHeadingLevel($ae("h3").filter(":contains('Find Us')", '2')); api.setHeadingLevel($ae('h3').filter(':contains(Leave a Message Below), :contains(Service Info), :contains(Choose How To Share)'), '2');
api.setHeadingLevel($ae('#payment-calculator h3').filter(':contains(Payment Details)'), '2'); api.setHeadingLevel('h2.replaceable-text', '1'); api.setHeadingLevel(ele.outerFind('.features-title h4').filter(':contains(PREMIUM OPTIONS)'), '2'); api.setHeadingLevel(ele.outerFind('h3').filter(':contains(Find your perfect car)'), '2'); api.setHeadingLevel('h4.modal-title', '3'); api.setHeadingLevel($ae('h1').filter(':contains(Welcome to Baxter Auto — Nebraska, Kansas & Colorado Car Dealerships)'), '2'); api.setHeadingLevel($ae('h2').filter(':contains(Welcome to Baxter Auto)'), '1'); api.setHeadingLevel('#tradepending-panel h3.h2', '2');
// AE - not headings api.setPresentation('#ctaRow a > h2.header.reverse'); api.setPresentation(ele.outerFind('.slider-overlay h2').filter(':contains(Welcome Back)')); api.setPresentation('.slider-overlay h1'); api.setPresentation('h3.current-price'); api.setPresentation('#ctabox-premium-features div >li h3'); ele.outerFind('h1').has('>img').each(function () { api.setPresentation($ae(this)); }).end().each(function () { if ($ae.trim($ae(this).text()).length === 0) { if ($ae(this).children().length === 0) { $ae(this).attr({ 'aria-hidden': 'true', 'role': 'presentation' }); } if ($ae(this).clone().find('b, hr, span, br, strong').remove().end().children().length === 0) { $ae(this).attr({ 'aria-hidden': 'true', 'role': 'presentation' }); } } }); ele.outerFind('h2').has('>img').each(function () { api.setPresentation($ae(this)); }).end().each(function () { if ($ae.trim($ae(this).text()).length === 0) { if ($ae(this).children().length === 0) { $ae(this).attr({ 'aria-hidden': 'true', 'role': 'presentation' }); } if ($ae(this).clone().find('b, hr, span, br, strong').remove().end().children().length === 0) { $ae(this).attr({ 'aria-hidden': 'true', 'role': 'presentation' }); } } }); ele.outerFind('h3').has('>img').each(function () { api.setPresentation($ae(this)); }).end().each(function () { if ($ae.trim($ae(this).text()).length === 0) { if ($ae(this).children().length === 0) { $ae(this).attr({ 'aria-hidden': 'true', 'role': 'presentation' }); } if ($ae(this).clone().find('b, hr, span, br, strong').remove().end().children().length === 0) { $ae(this).attr({ 'aria-hidden': 'true', 'role': 'presentation' }); } } }); ele.outerFind('h4').has('>img').each(function () { api.setPresentation($ae(this)); }).end().each(function () { if ($ae.trim($ae(this).text()).length === 0) { if ($ae(this).children().length === 0) { $ae(this).attr({ 'aria-hidden': 'true', 'role': 'presentation' }); } if ($ae(this).clone().find('b, hr, span, br, strong').remove().end().children().length === 0) { $ae(this).attr({ 'aria-hidden': 'true', 'role': 'presentation' }); } } }); ele.outerFind('h5').has('>img').each(function () { api.setPresentation($ae(this)); }).end().each(function () { if ($ae.trim($ae(this).text()).length === 0) { if ($ae(this).children().length === 0) { $ae(this).attr({ 'aria-hidden': 'true', 'role': 'presentation' }); } if ($ae(this).clone().find('b, hr, span, br, strong').remove().end().children().length === 0) { $ae(this).attr({ 'aria-hidden': 'true', 'role': 'presentation' }); } } }); ele.outerFind('h6').has('>img').each(function () { api.setPresentation($ae(this)); }).end().each(function () { if ($ae.trim($ae(this).text()).length === 0) { if ($ae(this).children().length === 0) { $ae(this).attr({ 'aria-hidden': 'true', 'role': 'presentation' }); } if ($ae(this).clone().find('b, hr, span, br, strong').remove().end().children().length === 0) { $ae(this).attr({ 'aria-hidden': 'true', 'role': 'presentation' }); } } }); //homepage heading api.setHeadingLevel(ele.outerFind('body.home #header').find('.main-logo, .logo-dealer, #header-logo, .dealer-logo'), '1'); api.setHeadingLevel('.home-title', '2'); // empty headings
////////////////////////// END HEADINGS ////////////////////////// ACCORDIONS api.convertToAccordion('.ui-accordion-header', '', '.ui-accordion-content'); //api.convertToAccordion('.btn-group.bootstrap-select button','open');
// details vehicle page ele.outerFind('#info-accordion .panel a').not(':first').attr({ 'role': 'button', 'tabindex': '0', 'data-ae-blurbtype': 'button', 'aria-expanded': 'false' }); ele.outerFind('#info-accordion .panel a[data-toggle="collapse"]').each(function () { if ($ae(this).closest('.panel').find('div.panel-collapse.collapse').hasClass('in')) { $ae(this).attr('aria-expanded', 'true');
} else { $ae(this).attr('aria-expanded', 'false');
} });
ele.outerFind('#info-accordion .panel a').click(function () { if ($ae(this).attr('aria-expanded') === 'false') { $ae('#info-accordion .panel a').attr('aria-expanded', 'false'); $ae(this).attr('aria-expanded', 'true'); } else { $ae(this).attr('aria-expanded', 'false');
} }); ////////////////////////// END ACCORDIONS //////////////////////////
////////////////////////// LINKS ////////////////////////// //home link in main menu context ele.outerFind('a').has('>i.fa-home').append('Home');
// footer mobile emty link context ele.outerFind('li.email a').append('Email Us'); ele.outerFind('li.sms.text a').append('Text Us');
ele.outerFind('a.history-report').attr('aria-hidden', 'false'); // links with no href ele.outerFind('a.ui-datepicker-next, a.ui-datepicker-prev').attr('role', 'button'); ele.outerFind('a.glovebox-btn-login, a.find-button').attr('role', 'button');
ele.outerFind('a').not('[href]').not('[tabindex]').attr('tabindex', '0'); // owners manual click here link ele.outerFind('a[href="http://www.porscheownersmanuals.com/"]').append(' to view online video owner manual'); // print svg link ele.outerFind('a.print.print-vdp.fancybox').append(' Print '); ele.outerFind('.print.print-vdp.fancybox').append('Opens a new window');
// read more links
ele.outerFind('a.moretag').each(function () { $ae(this).append(' about ' + $ae(this).closest('.post').find('h2,h3,h4,h5,h6').text() + '');
});
//AT - Toggle Read More Button State [AEI-66717]
api.convertToAccordion('a[href="#readmore"]', '', '.collapse.in');
// AE - coolie policy click here link ele.outerFind('a[href^="https://foureyes.adpearance.com/opt-out"]').append(' to opt out of our cookie policy'); ele.outerFind('a[href="/which-site-to-pick"]').append(' for more information');
// about section read more ele.outerFind('#aboutRow a').filter(':contains(Read More)').each(function () { var text = ' about ' + $ae(this).closest('div').find('h1').text(); api.addComplianceIndent($ae(this), 'append', 'span', text); }); ele.outerFind('#aboutRow a').filter(':contains(READ MORE)').each(function () { var text = ' about ' + $ae(this).closest('div').find('h1').text(); api.addComplianceIndent($ae(this), 'append', 'span', text); }); ele.outerFind('#about-row a').filter(':contains(Learn More)').each(function () { var text = ' about ' + $ae(this).closest('div').find('h1').text(); api.addComplianceIndent($ae(this), 'append', 'span', text); }); ele.outerFind('#seoRow a').filter(':contains(Read More)').each(function () { var text = ' about ' + $ae(this).closest('div').find('h1').text(); api.addComplianceIndent($ae(this), 'append', 'span', text); });
// here link ele.outerFind('.bio a').filter(':contains(here)').each(function () { $ae(this).append(' to check out the cool Conversations video I starred in.');
}); // text us link ele.outerFind('button.text-ellipsis').attr('aria-label', 'Text Us');
// chat link ele.outerFind('#cncbbn').append('Have a Chat Conversation'); ele.outerFind('.gg-chat-bubble').attr('aria-label', 'Chat'); // social links ele.outerFind('.fa-pinterest-p').parent().append('Pinterest Social Network'); ele.outerFind('.fa-youtube-play').parent().append('Youtube Video Social Network'); ele.outerFind('.fa-instagram').parent().append('Instagram Social Network'); ele.outerFind('.fa-yelp').parent().append('Yelp Social Network'); ele.outerFind('.social a').has('i.fa-google').append('Google Plus Social Network'); ele.outerFind('.social a[href^="https://plus.google.com/"]').append('Google Plus'); ele.outerFind('.sharing a').each(function () { if ($ae(this).hasClass('facebook')) { $ae(this).append('Facebook opens a new window');
} if ($ae(this).hasClass('twitter')) { $ae(this).append('Twitter opens a new window');
} if ($ae(this).hasClass('googleplus')) { $ae(this).append('Google Plus. opens a new window');
} }); // AE - sharing ele.outerFind('div.us_facebook a.us_box').append('Facebook'); ele.outerFind('div.us_twitter a.us_box').append('Twitter'); ele.outerFind('div.us_googleplus a.us_box').append('Google Plus'); ele.outerFind('div.us_linkedin a.us_box').append('linked in');
ele.outerFind('#sbi_lightbox #sbi_twitter_icon').append('Twitter'); ele.outerFind('#sbi_lightbox #sbi_facebook_icon').append('Facebook'); ele.outerFind('#sbi_lightbox #sbi_google_icon').append('Google'); ele.outerFind('#sbi_lightbox #sbi_linkedin_icon').append('Linkedin'); ele.outerFind('#sbi_lightbox #sbi_pinterest_icon').append('Pinterest'); ele.outerFind('#sbi_lightbox #sbi_email_icon').append('Email');
// pageation links ele.outerFind('.paging a.pages').prepend(' Page ');
// hide empty links ele.outerFind('a[href="#"], a[href=""]').each(function () { if ($ae.trim($ae(this).text()).length === 0) { if ($ae(this).children().length === 0) { $ae(this).attr({ 'aria-hidden': 'true', 'role': 'presentation', 'tabindex': '-1' }); }
} }); ele.find('a').not(':has(img, svg)').each(function () { if ($ae.trim($ae(this).text()).length === 0) { if ($ae(this).children().length === 0) { $ae(this).attr({ 'tabindex': '-1', 'aria-hidden': 'true', 'role': 'presentation' }); } if ($ae(this).clone().find('b, hr, span, br, strong').remove().end().children().length === 0) { $ae(this).attr({ 'tabindex': '-1', 'aria-hidden': 'true', 'role': 'presentation' }); } } });
api.hideFromAT(ele.outerFind('.googlemap').find('[aria-hidden="true"]:tabbable')); api.hideFromAT('.shopping-icon >a'); api.hideFromAT('a.gallery-lightbox-trigger'); api.hideFromAT('.shopping-icon >a');
ele.outerFind('a[data-gtm-event="mobileHeaderDirections"]').not(':has(.ae-compliance-indent)').append(' to our Dealership'); ele.outerFind('a[data-gtm-event="tabletHeaderDirections"]').not(':has(.ae-compliance-indent)').append(' to our Dealership'); ele.outerFind('a[itemprop="directions"].button.primary-button').not(':has(.ae-compliance-indent)').append(' to our Dealership'); ele.outerFind('.directions-inner-dealers a[href="/contact-us/"]').attr('role', 'link'); ele.outerFind('#shoppingRow .shopping-box a').each(function () { $ae(this).prepend('' + $ae(this).parent().find('.shopping-title h2').text().trim() + '');
}); api.convertToBtn('.ask-a-question'); api.convertToBtn('.shopping-label a'); api.convertToBtn('div.button.primary-button'); // duplicate link ele.outerFind('.details-page-row .vdp-shopping-tools a').has('svg.di-svg').attr({ 'aria-hidden': 'true', 'tabindex': '-1' }).addClass('ae-exclude');
// duplicate links on vehicle details page: related vehicles api.hideFromAT('#related-vehicles-container .related-wrap .related-thumbnail a'); ele.outerFind('#related-vehicles-container .related-wrap .related-thumbnail img').each(function () { $ae(this).attr({ 'alt': $ae(this).closest('.related-thumbnail').next('.related-info').find('a').text(), 'tabindex': '-1', 'aria-hidden': 'true' }); });
ele.outerFind('a.directions').not(':has(i.fa-map-marker)').not(':has(.ae-compliance-indent)').append(' to our location'); ele.outerFind('a[href^="http://maps.google.com/"]').not(':has(i.fa-map-marker)').not(':has(.ae-compliance-indent)').append(' to our location'); ele.outerFind('a.directions').has('i.fa-map-marker').prepend(' Directions: '); ele.outerFind('a[href^="http://maps.google.com/"]').has('i.fa-map-marker').prepend(' Directions: '); // Learn More links ele.outerFind('a.button.primary-button').filter(':contains(learn More)').each(function () { $ae(this).append(' about ' + $ae(this).closest('.comparisonoverview').find('h1').text().trim() + '');
}); ele.outerFind('.other-features-container a').filter(':contains(Learn More)').each(function () { $ae(this).append(' about ' + $ae(this).prev().text().trim() + '');
}); ele.outerFind('.fullcontentrow a.button.primary-button').filter(':contains(Learn More)').each(function () { $ae(this).append(' about ' + $ae(this).parent().parent().find('h2').text().trim() + '');
}); ele.outerFind('h1').filter(':contains(Porsche Salt Lake City Exclusive Manufaktur Partner)').each(function () { $ae(this).parent().next().find('a.primary-button').filter(':contains(Learn More)').append(' about ' + $ae(this).text().trim() + ''); }); ele.outerFind('.celeb-car-company a').filter(':contains(Learn More)').each(function () { $ae(this).append(' about ' + $ae(this).closest('div').find('.celeb-car-company-header').text().trim() + '');
}); ele.outerFind('.post-content .entry').find('a.primary-button').filter(':contains(Learn More)').each(function () { $ae(this).append(' about ' + $ae(this).closest('.post-content').find('.entry-title').text().trim() + '');
}); ele.outerFind('.post-content .entry-content').find('a.primary-button').filter(':contains(Learn More)').each(function () { $ae(this).append(' about ' + $ae(this).closest('.post-content').find('.entry-title').text().trim() + '');
}); ele.outerFind('#di-tab-dropdown a').filter(':contains(Click for Details)').each(function () { $ae(this).append(' about ' + $ae(this).closest('div').find('h2').text().trim() + '');
}); // back to top links ele.outerFind('a[href="#top"]').append(' Back to top');
// terms and conditions disclaimer link context ele.outerFind('.offer-content.card-content a.disclaimer-link').each(function () { $ae(this).append('' + $ae(this).closest('li.offer').find('.offer-title').text().trim() + " " + $ae(this).prev().text().trim() + '');
});
// AE - adjacent links. api.hideFromAT($ae('.logo-wrap a').has('img[alt="Porsche"]'));
////////////////////////// END LINKS //////////////////////////
////////////////////////// HIDDEN //////////////////////////
ele.outerFind('.slides li.clone').attr({ 'aria-hidden': 'true', 'tabindex': '-1' }); ele.outerFind('.slides li.clone a').attr({ 'aria-hidden': 'true', 'tabindex': '-1' });
ele.outerFind('.gallery-thumbs-wrap').addClass('ae-exclude');
// remove aria-hidden ele.outerFind('.groupon-filter-container').removeAttr('aria-hidden'); ele.outerFind('a.history-report').attr('aria-hidden', 'false'); // hide emplty links ele.outerFind('a[href="#"]').each(function () { if ($ae.trim($ae(this).text()).length === 0) { if ($ae(this).children().length === 0) { $ae(this).attr({ 'aria-hidden': 'true', 'role': 'presentation', 'tabindex': '-1' }); }
} }); //////////////////////////END HIDDEN //////////////////////////
////////////////////////// LIST //////////////////////////
// empty or one li list
ele.outerFind('ul, ol').not('.dropdown-menu.inner').each(function () { if ($ae(this).children('li').length < 2 && $ae(this).find('ul, ol').length == 0 && $ae(this).not('li ul').not('li ol')) { $ae(this).attr('role', 'presentation'); } }); ele.outerFind('ul.slides').attr('role', 'presentation'); api.setPresentation($ae('ul').has('li.lo_substep_paymenttype_option')); //////////////////////////END LISTS ////////////////////////// ////////////////////////// MOUSE TRIGGERED ////////////////////////// ele.outerFind('a[onclick]').each(function () { $ae(this).attr('role', 'button'); }); api.convertToBtn('span[onclick]'); api.convertToBtn('input[onclick]'); api.convertToBtn('div[onclick]'); api.convertToBtn('button[onclick]'); ele.outerFind('div[onmouseenter]').each(function () { $ae(this).attr('onfocus', $ae(this).attr('onmouseenter')); }); ele.outerFind("a[onmouseover]").each(function () { $ae(this).attr("onfocus", $ae(this).attr("onmouseover")); }); ele.outerFind("button[onmouseover]").each(function () { $ae(this).attr("onfocus", $ae(this).attr("onmouseover")); }); ele.outerFind("a[onmouseout]").each(function () { $ae(this).attr("onblur", $ae(this).attr("onmouseout")); }); ele.outerFind("button[onmouseout]").each(function () { $ae(this).attr("onblur", $ae(this).attr("onmouseout")); }); //////////////////////////END MOUSE TRIGGERED ////////////////////////// //////////////////////////SVG TITLES ////////////////////////// ele.outerFind('svg.loading-spinner').append(''); ele.outerFind('.eva-dismiss svg').append(''); ele.outerFind('.eva-edmunds-logo svg.edmunds-logo__image').append(''); ele.outerFind('.vehicle-autocomplete__icon svg').append(''); // fix span input button ele.outerFind('#a2apage_find_icon').attr({ 'role': 'button', 'tabindex': '0', 'aria-label': 'Search Social media apps' }); // decorative svg api.hideFromAT('.urgency-icon svg'); api.hideFromAT('.shopping-icon svg'); api.hideFromAT('#info-accordion .panel svg'); api.hideFromAT('#a2apage_full .a2a_svg svg'); api.hideFromAT('.a2a_copy_link_container .a2a_svg svg'); api.hideFromAT('.mobile-tab-content-inside .a2a_svg svg'); api.hideFromAT('.a2a_mini_services .a2a_svg svg'); api.hideFromAT('.a2a_cols_container .a2a_svg svg'); api.hideFromAT('.a2a_full_footer .a2a_svg svg'); api.hideFromAT('.a2a_svg svg'); //api.hideFromAT('svg.di-svg'); api.hideFromAT('.eva-select svg'); api.hideFromAT('#di-conversations-embed-root svg'); api.setPresentation('.mod-keep-in-touch__svg-icon, .mod-keep-in-touch svg'); // svg Title ele.outerFind('svg.loading_circle.spinner').append(''); ele.outerFind('svg.goog-te-spinner').append(''); ele.outerFind('.info-icon svg').append('');
//////////////////////////END SVG TITLES ////////////////////////// ////////////////////////// CHAT REMEDIATION //////////////////////////
ele.outerFind('#icon-message').attr({ 'role': 'button', 'tabindex': '0' }); ele.outerFind('.conversations-topbar .icons i').attr({ 'role': 'button', 'tabindex': '0' }); ele.outerFind('.conversations-topbar .fa-minus').attr({ 'aria-hidden': 'true', 'tabindex': '-1' }).addClass('ae-exclude'); ele.outerFind('.conversations-topbar .fa-times').append('Close'); ele.outerFind('.conversations-topbar .fa-close').append('Close');
ele.outerFind('.agent-avatar').attr('alt', '');
ele.outerFind('.conversations-button').attr({ 'tabindex': '0' });
////////////////////////// END Chat Remediation //////////////////////////
//////////////////////////AT REMEDIATIONS ////////////////////////// ele.outerFind('.panel-heading .di-svg path').attr('tabindex', '-1');
// vehicle search actionable elements ele.outerFind('#vehiclesearch-overlay').find('a.find-button, .close-overlay, .back-button, a.type-button, a.model-button').attr({ 'role': 'button', 'tabindex': '0' }); ele.outerFind('#vehiclesearch-overlay').find('.back-button img[src$="goback.png"]').attr({ 'aria-label': 'go back' });
////////////////////////// AT LINKS ////////////////////////// ele.outerFind('ul.tel-numbers a').each(function () { var phoneNumDescription = $ae(this).closest('li').find('span').first().text(); $ae(this).append(' ' + phoneNumDescription + ' Phone Number '); }); // view inventory links ele.outerFind('.coupon-coupon a.primary-button').filter(':contains( View Inventory), :contains( Get This )').each(function () { $ae(this).append('' + $ae(this).closest('.coupon-coupon').find('.coupon-title').text().trim() + '');
}); ele.outerFind('#models.owl-carousel .item a.button').filter(':contains(VIEW INVENTORY)').each(function () { $ae(this).append('' + $ae(this).closest('.item').find('h2.model-name').text().trim() + '');
}); ele.outerFind('.price-row a').filter(':contains(<)').each(function () { $ae(this).prepend(' Vehicles '); }); ele.outerFind('.price-row a').filter(':contains(>)').each(function () { $ae(this).prepend(' Vehicles '); }); ele.outerFind('.price-row a').filter(':contains(-)').each(function () { $ae(this).prepend(' Vehicles between '); }); // list /grid view links ele.outerFind('.grid-view-toggle a.vrp-layout-toggle-option').append('Grid View'); ele.outerFind('.list-view-toggle a.vrp-layout-toggle-option').append('List View'); api.setPresentation($ae('.grid-view-toggle').find('svg')); api.setPresentation($ae('.list-view-toggle').find('svg'));
// read more context ele.outerFind('.about-content a').filter(':contains(Read More)').each(function () { $ae(this).append('about ' + $ae(this).closest('.about-content').find('h1').text().trim() + ''); }); // header location icon link functionality ele.outerFind('a.header-icons-marker[href="/locations/"]').attr({ 'aria-hidden': 'false', 'role': 'link', 'tabindex': '0' }); ele.outerFind('a.header-icons-marker[href="/locations/"]').append(' Locations'); // oklahoma porsche a that that is a div fix ele.outerFind('.drivemotors a[onclick="return false;"]').attr({ 'role': 'presentation', 'aria-hidden': 'false', 'tabindex': '-1' }); api.convertToBtn('.drivemotors a[onclick="return false;"] .button-list li'); ele.outerFind('.drivemotors a[onclick="return false;"] .button-list li').not('monthly-button').each(function () { $ae(this).attr('aria-label', $ae(this).find('.text .short').text().trim()); }); ele.outerFind('.drivemotors a[onclick="return false;"] .button-list li .text span').attr('aria-hidden', 'true');
ele.outerFind('.button-item.monthly-button').each(function () { $ae(this).attr('aria-label', $ae(this).find('span.long').text().trim() + ' ' + $ae(this).find('span.price').text().trim()); });
// Porsche sites dealer name context ele.outerFind('.header-bottom-top .dealer-name a').append(' Homepage');
// button context ele.outerFind('button.insta-close, button.cm-close-btn').attr('aria-label', 'close'); ele.outerFind('button.insta-submit').attr('aria-label', 'submit'); // AE - Convert to Btn
api.convertToBtn('a.button[data-toggle="modal"]'); api.convertToBtn('a.fancy_iframe'); api.convertToBtn('a.fancy'); api.convertToBtn('a.quicklook'); api.convertToBtn('a.button-form.fancy'); api.convertToBtn('.model-page-fancybox[rel="gallery"] img'); api.convertToBtn('.gg-toolbar .gg-tabs a'); api.convertToBtn('.gg-btn-specials'); api.convertToBtn('.gg-app.gg-social__item'); api.convertToBtn('.gg-chat-bubble.gg-app'); ele.outerFind('.gg-social .gg-app').each(function () { $ae(this).append('' + $ae(this).attr('data-app').replace('_', ' ') + '');
}); ele.outerFind('.btn').filter(':contains(Reset Filter)').each(function () { $ae(this).attr('title', 'Reset Filter ' + $ae(this).attr('title')); });
// AE STA button api.convertToBtn('a.cta-button');
// AE side button toggle functionality api.convertToBtn('#side-toolbar a.overlay-toggle'); // fancybox xlose button ele.outerFind('.fancybox-close').attr('aria-label', 'close'); ele.outerFind('.top-cta-container .top-cta .cta-overlay img').attr({ 'alt': '', 'aria-hidden': 'true' }); ele.outerFind('.top-cta-container .top-cta img.cta-bg').attr({ 'alt': '', 'aria-hidden': 'true' }); ele.outerFind('.bottom-cta-container .bottom-cta img').attr({ 'alt': '', 'aria-hidden': 'true' });
// explore more button ele.outerFind('.engineering-container .primary-button').each(function () { $ae(this).append(' about ' + $ae(this).closest('.engineering-container').find('.intro h2').text() + '');
});
//hide view-larger-version link api.hideFromAT('.owl-item a.view-larger-version');
// Vehicle check availability and pre-appre=oved buttons ele.outerFind('.vehicle .button-bar .primary-cta a.cta-button').each(function () { $ae(this).append(' for ' + $ae(this).closest('.vehicle').find('.vehicle-overview .vehicle-title').text() + '');
});
// vehicle overlay details links append ele.outerFind('.vehicle-menu-overlay .vehicle-menu a').each(function () { $ae(this).append('' + $ae(this).closest('.vehicle-wrap').find('.vehicle-title h2').text() + '');
}); ele.outerFind('.button-bar-item.first-button a').filter(':contains(Details)').each(function () { $ae(this).append('' + $ae(this).closest('.vehicle-wrap').find('.vehicle-title h2').text() + '');
}); // vehicle list view button append ele.outerFind('.results_table .vehicle.list-view .button-bar a').each(function () { $ae(this).append('' + $ae(this).closest('.vehicle.list-view').find('.vehicle-title h2').text() + " " + $ae(this).closest('.vehicle.list-view').find('.vinstock').text().trim() + '');
});
// grid and list view toggle api.convertToBtn('.gridtoggle, .listtoggle');
ele.outerFind('.vehicle a').filter(':contains(more)').each(function () { $ae(this).append(' about ' + $ae(this).closest('.vehicle').find('.vehicle-overview .vehicle-title h2').text() + ''); }); //hide adjacent graphic link in vehicle-wrap api.hideFromAT($ae('.vehicle-wrap .vehicle-image a'));
ele.outerFind('.vdp-shopping-tools .details-page-row .shopping-icon a').attr({ 'aria-hidden': 'true', 'tabindex': '-1', 'role': 'presentation' }).addClass('ae-exclude');
ele.outerFind(' .shopping-tools-wrapper .shopping-icon a').addClass('ae-exclude');
// payment calculator links api.convertToBtn('.mleft-button a'); api.convertToBtn('.mright-button a');
ele.outerFind('.mleft-button a').append('Decrease Months'); ele.outerFind('.mright-button a').append('Increase Months');
// staff fix ele.outerFind('.staff-item .staffpic').attr('alt', '');
//staff email links ele.outerFind('.staff-container .staff-item a[href^="mailto:"]').filter(':contains(More Info)').each(function () { var person = $ae(this).closest('.staff-item').find('> div').filter(':first').find('h3').filter(':first').text(); $ae(this).append(' ' + person + ''); }); ele.outerFind('.staff-container .staff-item a').filter(':contains(More Info)').each(function () { var person = $ae(this).closest('.staff-item').find('> div').filter(':first').find('h3').filter(':first').text(); $ae(this).append(' ' + person + ''); }); ele.outerFind('.staff-item a.staff-email-button').not(':contains(Email Me)').each(function () { $ae(this).attr('aria-label', $ae(this).attr('data-staff-name') + " " + 'Email Me'); }); }; f.id = "833543"; f.title = "*DI Master JS #1"; f.type = "javascript";
!function(f){ if (window.AudioEye && window.AudioEye.manualRemediations) { window.AudioEye.manualRemediations.push(f); } }(f); //# sourceURL=https://wsv3cdn.audioeye.com/helpers-remediations/_DI_Master_JS__1.js
var f = function (ele, api) { ele.outerFind('a[href^="mailto:"][data-staff-name]').filter(':contains(Email Me)').each(function () { $ae(this).append('' + $ae(this).attr('data-staff-name') + '');
});
ele.outerFind('a[href^="mailto:"]').not('[data-staff-name]').filter(':contains(Email Me)').each(function () { $ae(this).append('' + $ae(this).closest('.staff-item').find(':header').first().text().trim() + '');
}); // Staff review links ele.outerFind('div.staff-container .staff-button').filter(':contains(Reviews), :contains(REVIEWS)').each(function () { var person = $ae(this).closest('.staff-item').find('> div').first().find('h3').first().text(); api.addComplianceIndent($ae(this), 'append', 'span', person); }); ele.outerFind('#ctabox-premium-features a').attr('aria-label', 'View All Premium Options');
ele.outerFind('#ctabox-secondary-ctas a.save-vehicle').attr('aria-label', 'Save this Vehicle'); ele.outerFind('#ctabox-secondary-ctas a.ask-a-question').attr('aria-label', ' ask a question about this Vehicle');
// dagger tooltip append ele.outerFind('dl[rel="popover"]').each(function () { $ae(this).append('' + $ae(this).attr('data-content') + '');
}); ele.outerFind('li[rel="popover"]').each(function () { $ae(this).append('' + $ae(this).attr('data-content') + '');
});
// print coupons link context ele.outerFind('a.difo-type-print.lightbox').each(function () { $ae(this).append('' + $ae(this).closest('.coupon-coupon').find('.coupon-title').text().trim() + '');
}); // apple wallet buttons ele.outerFind('li.difo-wallet a.difo-type-wallet').filter(':contains(Apple Wallet)').attr('aria-label', 'Add to Apple Wallet. Opens a new window');
// save vehicle button context ele.outerFind('.save-vehicle-half a.save-vehicle').filter(':contains(Save)').attr('aria-label', 'Save. Opens a new window');
// save vehicles login button ele.outerFind('#save-vehicles-sidr button.savethings-login').attr('role', 'link'); ele.outerFind('#save-vehicles-sidr button.savethings-login').append('Opens a new Window');
// AE logo adjacent links on Porsche sites //api.hideFromAT($ae('.header-bottom-top .logo-wrap a').has('> img[alt="Porsche"]'));
// hide from AT
ele.outerFind('.owl-item a.primary-button').filter(':contains(FIND YOURS)').each(function () { $ae(this).append('' + $ae(this).prevAll('h2').text().trim() + '');
}); // carousel slide links ele.outerFind('.flex-control-nav.flex-control-paging li a').prepend(' Slide ');
// loading widget click here links ele.outerFind('div.hidden-xs.hidden-sm').filter(':contains(If the widget)').find('a').append(' Job Postings on ADP. Opens a new window. '); ////////////////////////// End AT Links//////////////////////////
//////////////////////////AT Heading Heirarchy ////////////////////////// // home page h1 ele.outerFind('body.home').find('.dealer-name, .brand-logo').attr({ 'role': 'heading', 'aria-level': '1' });
ele.outerFind('h1.entry-title').each(function () { $ae(this).next().find('h1').attr({ 'role': 'heading', 'aria-level': '2' }); });
// AT main menu headings fix ele.outerFind('#menu-main-menu h3').attr('role', 'presentation'); api.setHeadingLevel('form.contact h3.gform_title', '2'); api.setHeadingLevel('#aboutRow h1', '2'); api.setPresentation('#payment-tab h3'); api.setPresentation('.glovebox-sidebar-wrap h3'); api.setHeadingLevel($ae('.glovebox-sidebar-wrap h3').filter(':contains(Find your perfect car)', '2')); api.setHeadingLevel($ae('h2').filter(':contains(Welcome to Your Vehicles)', '1')); api.setHeadingLevel($ae('.glovebox-vehicle .vehicle-title'), '2'); api.setHeadingLevel('#pre-footer .widget_nav_menu span.widgettitle', '2'); api.setHeadingLevel('.dealer-info h3', '2'); api.setHeadingLevel($ae('.slider-overlay h2').filter(':contains(Welcome to Porsche)', '1')); api.setHeadingLevel('.offer-disclaimer-list h3', '2'); api.setHeadingLevel($ae('#fun-to-drive h3').filter(':contains(Fun to drive. Easy to cover. )'), '2'); api.setHeadingLevel('.shopping-box .shopping-title h2', '3'); ele.outerFind('form[action="https://secure.dealerinspire.com/application/submit"] .contact-primary h4').attr({ 'aria-level': '3', 'role': 'heading' }); api.setHeadingLevel('.name-car-container .special-title', '2'); api.setHeadingLevel('#goog-gt-tt h1', '2'); api.setHeadingLevel('#ctaRow a.ctabox h2', '3'); api.setHeadingLevel('.prefooter-widgets span.widgettitle', '2'); api.setHeadingLevel('.panel-heading h4.panel-title', '2');
// not headings api.setPresentation($ae('h3.contact-info.text-center').filter(':contains(Call us at:)')); api.setPresentation('#modelRow .model-name h2'); api.setPresentation('ul.post-comments h4.comment-num'); api.setPresentation($ae('.resultsCount h4').filter(':contains(vehicles match these filters)')); ele.outerFind('#aboutRow h3').has('a').filter(':contains(Read More)').attr('role', 'presentation'); api.setPresentation(ele.outerFind('.coupon-card h3').filter(':contains(Featured Service)')); api.setPresentation(ele.outerFind('.coupon-card h2').filter(':contains(View for details)'));
// levels ele.outerFind('h1').filter(':contains(Meet Our Staff)').parent().find('>h3').attr({ 'role': 'heading', 'aria-level': '2' }); api.setHeadingLevel(ele.outerFind('h4.features-title').filter(':contains(PREMIUM OPTIONS)'), '2'); api.setHeadingLevel('#gform_wrapper_8 h2.gsection_title', '2');
api.setHeadingLevel($ae('.grid-view-results-wrapper.owl-carousel .vehicle-title h2'), '3');
ele.outerFind('.swiper-slide h3[aria-level="1"]').attr('aria-level', '2'); api.setHeadingLevel(ele.outerFind('.coupon-coupon').find('.coupon-title'), '2'); api.setHeadingLevel('#modelmain .owl-item h2', '3');
api.setHeadingLevel('#models h2.model-name', '3'); api.setHeadingLevel('#welcomeRow .welcome-content h3', '2');
////////////////////////// END AT Heading Heirarchy //////////////////////////
//////////////////////////AT forms/inputs////////////////////////// api.convertToBtn('.search-overlay .fa-close'); ele.outerFind('.search-overlay .fa-close').attr('aria-label', 'close'); ele.outerFind('.search-anything-toggle').click(function () { setTimeout(function () { AudioEye.modals.enableTabLoop('.search-overlay'); AudioEye.focusElement('.search-overlay .fa-close'); }, 500); }); // search anything input ele.outerFind('#search-views-toggle #search').each(function () { $ae(this).before(''); $ae(this).prev().attr('for', $ae(this).attr('id')); }); api.convertToBtn('.search-anything-toggle'); // home search ele.outerFind('input[placeholder="Search Anything..."]').each(function () { $ae(this).before(''); $ae(this).prev().attr('for', $ae(this).attr('id')); });
// AE - advanced search ele.outerFind('.column.advanced-search input[type="text"]').each(function () { $ae(this).attr('aria-label', $ae(this).attr('placeholder')); }); // AT checkox labels ele.outerFind('.recently-modified input[type="checkbox"]').each(function () { $ae(this).attr('aria-label', $ae(this).parent().text()); });
//required radio inputs context ele.outerFind('.gfield_radio').parent().prev('label').each(function () { $ae(this).append('one of these radio inputs are required, not both.');
});
// fake checkboxes and radios filter boxes //fake inputs ele.outerFind('.filter-checkbox input').attr({ 'tabindex': '-1', 'aria-hidden': 'true' }); api.hideFromAT('.filter-checkbox label'); ele.outerFind('.filter-checkbox a').removeAttr('aria-hidden'); ele.outerFind('.filter-count').removeAttr('title');
////////////////////////// Employment form //////////////////////////
ele.outerFind('.gfield_label').filter(':contains(Date started)+').find('.ginput_container_date select').each(function () { $ae(this).before(''); $ae(this).prev().attr('for', $ae(this).attr('id')); });
ele.outerFind('.gfield_label').filter(':contains(Date ended)+').find('.ginput_container_date select').each(function () { $ae(this).before(''); $ae(this).prev().attr('for', $ae(this).attr('id')); });
ele.outerFind('.gfield_label').filter(':contains(Start date)+').find('.ginput_container_date select').each(function () { $ae(this).before(''); $ae(this).prev().attr('for', $ae(this).attr('id')); });
ele.outerFind('.gfield_label').filter(':contains(End date)+').find('.ginput_container_date select').each(function () { $ae(this).before(''); $ae(this).prev().attr('for', $ae(this).attr('id')); });
// input with note at the bottom var ae_js_gfield_descrip = 0; ele.outerFind('#input_11_2').each(function () { $ae(this).parent().next('.gfield_description').attr('id', 'ae_js_gfield_descrip' + ae_js_gfield_descrip); ae_js_gfield_descrip++;
});
ele.outerFind('#input_11_2').each(function () { $ae(this).attr('aria-describedby', $ae(this).parent().next('.gfield_description').attr('id')); });
// HIDE CALENDAR ICON api.hideFromAT('.ui-datepicker-trigger'); ele.outerFind('label').filter(':contains(Preferred Appointment Date)').append('MM/DD/YYYY'); api.hideFromAT('#ui-datepicker-div'); api.hideFromAT('#ui-datepicker-div a');
// payment caclulator required ele.outerFind('.payment-calculator-container').find('input#price, select#rate').attr('aria-required', 'true');
ele.outerFind('input.required').attr('aria-required', 'true'); ele.outerFind('.input-append #rate').attr('aria-required', 'true'); ele.outerFind('.payment-calculator-container').find('input#price, select#rate').attr('aria-required', 'true');
ele.outerFind('select.required').attr('aria-required', 'true');
ele.outerFind('label.primary_address_own').attr('id', 'ae_js_address_own'); ele.outerFind('label.purchase_tradein').attr('id', 'ae_js_purchaseTrade'); ele.outerFind('label.purchase_type').attr('id', 'ae_js_purchaseType'); ele.outerFind('label').filter(':contains(Individual or Joint Application?)').attr('id', 'ae_js_joint_app');
ele.outerFind('input[name="primary_address_own"]').attr('aria-describedby', 'ae_js_address_own'); ele.outerFind('input[name="purchase_type"]').attr('aria-describedby', 'ae_js_purchaseType'); ele.outerFind('input[name="purchase_tradein"]').attr('aria-describedby', 'ae_js_purchaseTrade'); ele.outerFind('input[name="joint_application"]').attr('aria-describedby', 'ae_js_joint_app');
// radio descriptions on Aplication for financing form ele.outerFind('label').filter(':contains(Rent or Own)').attr('id', 'ae_js_radDescrip0'); ele.outerFind('label').filter(':contains(Individual or Joint)').attr('id', 'ae_js_radDescrip1'); ele.outerFind('label').filter(':contains(Purchase Type)').attr('id', 'ae_js_radDescrip2'); ele.outerFind('label').filter(':contains(Trade-In)').attr('id', 'ae_js_radDescrip3');
ele.outerFind('form input[type="radio"]').parent('label').attr('role', 'presentation');
ele.outerFind('form input[type="radio"][name="primary_address_own"]').each(function () { $ae(this).attr('aria-label', $ae(this).parent('label').text().trim()); $ae(this).attr('aria-describedby', 'ae_js_radDescrip0'); }); ele.outerFind('form input[type="radio"][name="joint_application"]').each(function () { $ae(this).attr('aria-label', $ae(this).parent('label').text().trim()); $ae(this).attr('aria-describedby', 'ae_js_radDescrip1'); }); ele.outerFind('form input[type="radio"][name="purchase_type"]').each(function () { $ae(this).attr('aria-label', $ae(this).parent('label').text().trim()); $ae(this).attr('aria-describedby', 'ae_js_radDescrip2'); }); ele.outerFind('form input[type="radio"][name="purchase_tradein"]').each(function () { $ae(this).attr('aria-label', $ae(this).parent('label').text().trim()); $ae(this).attr('aria-describedby', 'ae_js_radDescrip3'); }); ele.outerFind('h1').filter(':contains(Apply for Financing)').closest('.post-content').find('form,fieldset').find('input[type="text"]').each(function () { $ae(this).attr('aria-label', $ae(this).prev('label').text().trim()); }); //value trade predictive text fix ele.outerFind('#tradepending-vehicle-typeahead').attr('aria-label', 'Value Your Trade! Enter Year Make Model Trim. use up and down arrows to navigate the predictive text options, and enter to choose.');
// AE - apply for financing progress indicator ele.outerFind('.lead-intro .progress-indicator > div.active').append(' active ');
ele.outerFind('form .progress-indicator').each(function () { $ae(this).find('div.active').append(' active '); });
//////////////////////////END AT forms/inputs//////////////////////////
//////////////////////////AT Accordions //////////////////////////
// hamburger menu toggle (Baxter Auto) Accordion ele.outerFind('#menu-toggle').append(' Secondary Menu ');
api.convertToAccordion('#menu-toggle', 'active'); ele.outerFind('#menu-overlay').each(function () { if ($ae(this).hasClass('open')) { $ae(this).find('a').attr({ 'aria-hidden': 'false', 'tabindex': '0' }); } else { $ae(this).find('a').attr({ 'aria-hidden': 'true', 'tabindex': '-1' }); } }); ele.outerFind('#menu-toggle').click(function () { if ($ae(this).hasClass('active')) { $ae(this).parent().next('#menu-overlay').find('a').attr({ 'aria-hidden': 'false', 'tabindex': '0' }); } else { $ae(this).parent().next('#menu-overlay').find('a').attr({ 'aria-hidden': 'true', 'tabindex': '-1' });
} }); // search Accordion ele.outerFind('.menu-search').append(' Search ');
api.convertToAccordion('.menu-search', 'active'); ele.outerFind('.search-bar').each(function () { if ($ae(this).hasClass('open')) { $ae(this).find('input#alg-search').attr({ 'aria-hidden': 'false', 'tabindex': '0' }); } else { $ae(this).find('input#alg-search').attr({ 'aria-hidden': 'true', 'tabindex': '-1' }); } }); ele.outerFind('.menu-search').click(function () { if ($ae(this).hasClass('active')) { $ae(this).parent().find('input#alg-search').attr({ 'aria-hidden': 'false', 'tabindex': '0' }); } else { $ae(this).parent().find('input#alg-search').attr({ 'aria-hidden': 'true', 'tabindex': '-1' });
} }); api.convertToAccordion('.ui-accordion-header', '', '.ui-accordion-content'); //api.convertToAccordion('.dropdown-toggle','','.dropdown-menu.open'); ele.outerFind('.dropdown-toggle').attr({ 'role': 'button', 'tabindex': '0', 'aria-expanded': 'false' }); ele.outerFind('.dropdown-toggle').click(function () { if ($ae(this).attr('aria-expanded') == 'false') { $ae(this).attr('aria-expanded', 'true'); } else { $ae(this).attr('aria-expanded', 'false');
} }); api.convertToAccordion('#save-vehicles-expand-btn', '', '#save-vehicles-sidr');
ele.outerFind('.vehicle-menu-toggle').attr({ 'role': 'button', 'tabindex': '0', 'aria-expanded': 'false' }); ele.outerFind('.vehicle-menu-toggle').append('More Options');
ele.outerFind('.vehicle-menu-toggle').click(function () { if ($ae(this).attr('aria-expanded') == 'false') { $ae(this).attr({ 'aria-expanded': 'true' }); $ae('.vehicle-menu-toggle').find('span.ae-compliance-indent').filter(':contains(More)').html('Close Options'); $ae(this).parent().find('.vehicle-menu-overlay a').attr({ 'aria-hidden': 'false', 'tabindex': '0' }); } else { $ae(this).attr({ 'aria-expanded': 'false' }); $ae('.vehicle-menu-toggle').find('span.ae-compliance-indent').filter(':contains(Close)').html('More Options');
$ae(this).parent().find('.vehicle-menu-overlay a').attr({ 'aria-hidden': 'true', 'tabindex': '-1' });
} });
ele.outerFind('.vehicle-wrap .vehicle-menu-overlay').find('a').attr({ 'aria-hidden': 'true', 'tabindex': '-1' }); // details vehicle page ele.outerFind('#info-accordion .panel a').attr({ 'role': 'button', 'tabindex': '0', 'data-ae-blurbtype': 'button', 'aria-expanded': 'false' }); ele.outerFind('#info-accordion .panel a').each(function () { if ($ae(this).closest('.panel').find('div.panel-collapse.collapse').hasClass('in')) { $ae(this).attr('aria-expanded', 'true');
} else { $ae(this).attr('aria-expanded', 'false');
} });
ele.outerFind('#info-accordion .panel a').not(':first').click(function () { if ($ae(this).closest('.panel').find('div.panel-collapse.collapse').hasClass('in')) { $ae(this).attr('aria-expanded', 'false'); } else { $ae(this).attr('aria-expanded', 'true');
} });
/// show all filters button api.convertToBtn('#toggle-filters');
ele.outerFind('#headertab img.tabimg').attr({ 'role': 'button', 'tabindex': '0', 'aria-expanded': 'false' }); ele.outerFind('#headertab').attr({ 'role': 'button', 'tabindex': '0', 'aria-expanded': 'false' });
ele.outerFind('#headertabdropdown #tabcontent a').attr('tabindex', '-1'); ele.outerFind('#headertab img.tabimg').click(function () { if ($ae(this).attr('aria-expanded') === 'false') { $ae('#headertab #tabcontent').css('display', 'block'); $ae(this).attr('aria-expanded', 'true'); $ae('#headertabdropdown #tabcontent a').attr('tabindex', '0'); $ae('#headertabdropdown #tabcontent .principlesbullets li').attr('tabindex', '0'); } else { $ae(this).attr('aria-expanded', 'false'); $ae('#headertab #tabcontent').css('display', 'none'); $ae('#headertabdropdown #tabcontent a').attr('tabindex', '-1'); $ae('#headertabdropdown #tabcontent .principlesbullets li').attr('tabindex', '-1');
} }); ele.outerFind('#headertab').click(function () { if ($ae(this).attr('aria-expanded') === 'false') { $ae('#headertab #tabcontent').css('display', 'block'); $ae(this).attr('aria-expanded', 'true'); $ae('#headertabdropdown #tabcontent a').attr('tabindex', '0'); $ae('#headertabdropdown #tabcontent .principlesbullets li').attr('tabindex', '0'); } else { $ae(this).attr('aria-expanded', 'false'); $ae('#headertab #tabcontent').css('display', 'none'); $ae('#headertabdropdown #tabcontent a').attr('tabindex', '-1'); $ae('#headertabdropdown #tabcontent .principlesbullets li').attr('tabindex', '-1');
} }); api.convertToAccordion($ae('#accordion .panel .panel-heading').not(':has(a[data-toggle])'), '', '.panel-collapse.collapse.in');
// compare vehicles accordion for modal api.convertToAccordion('#compare-expand-btn', '', '#compare_div');
// compare vehicles table caption ele.outerFind('#compare-vehicle-table').prepend('
');
ele.outerFind('#compare_div h5 img').each(function () { $ae(this).attr({ 'alt': 'remove' + $ae(this).parent().text(), 'role': 'button', 'tabindex': '0' }); }); ele.outerFind('#compare_div #compare-actions a').attr({ 'role': 'button', 'tabindex': '0' });
ele.outerFind('#compare_div .vehicle a').each(function () { $ae(this).append('More information about ' + $ae(this).prev('h5').text() + '');
}); ele.outerFind('.compare-vehicle.selected').append(' reach the compare modal at the top of the Main Region'); ele.outerFind('.compare-vehicle').click(function () { if ($ae(this).not('.selected')) { $ae(this).append(' reach the compare modal at the top of the Main Region');
} });
ele.outerFind('#compare-expand-btn').click(function () { setTimeout(function () { AudioEye.focusElement('#compare_div'); AudioEye.modals.enableTabLoop('#compare_div'); }, 500); }); ele.outerFind('#compare_div img[role="button"]').click(function () { setTimeout(function () { AudioEye.focusElement('#compare_div'); AudioEye.modals.enableTabLoop('#compare_div'); }, 500); }); api.convertToAccordion('#accordion a[data-toggle="collapse"]', '', '.collapse.in'); ele.outerFind('a[data-parent="#faq"]').attr({ 'role': 'button', 'aria-expanded': 'false' }); ele.outerFind('a[data-parent="#faq"]').click(function () { if ($ae(this).attr('aria-expanded') == 'false') { $ae(this).attr('aria-expanded', 'true'); } else { $ae(this).attr('aria-expanded', 'false'); } });
////////////////////////// TABSET //////////////////////////// // tabs fix ele.outerFind('.tabs').attr({ 'role': 'tablist' }); ele.outerFind('.tabs .tab').attr({ 'role': 'tab', 'tabindex': '-1' }); ele.outerFind('.tabs .tab.active').attr({ 'aria-selected': 'true', 'tabindex': '0' }); ele.outerFind('.tabs .tab').not('.active').attr('aria-selected', 'false'); //ele.outerFind('.national-incentive-offers .offers').attr({'role':'tabpanel'}); ele.outerFind('.national-incentive-offers .offers .offer .offer-content h3').attr('tabindex', '0'); api.convertToAccordion('.tabs .tab.tab_model_show', 'showing_models'); api.convertToAccordion('.tabs .tab.tab_year_show', 'active'); ele.outerFind('.tab.tab_model_show').attr({ 'role': 'tab', 'tabindex': '-1' }); ele.outerFind('.tab.tab_year_show').attr({ 'role': 'tab', 'tabindex': '-1' });
// adding id to tabs adjust selectors accordingly var js_tab_ID = 0; ele.outerFind('.tabs .tab').each(function () { $ae(this).attr('id', 'js_tab_ID' + js_tab_ID); js_tab_ID++; }); ele.outerFind(".tabs div[role='tab']").click(function () { $ae(".tabs div[role='tab']").not('.tab.tab_model_show').not('.tab.tab_year_show').attr({ "aria-selected": "false", 'tabindex': '-1' }); //deselect all the tabs $ae(this).attr({ "aria-selected": "true", 'tabindex': '0' }); // select this tab var tabpanid = $ae(this).attr("aria-controls"); //find out what tab panel this tab controls });
ele.outerFind('.tabs .tab').on('keydown', function (e) { if (e.which === 37 || e.which === 38) { e.preventDefault(); AudioEye.focusElement($ae(this).prev()); } if (e.which === 32) { e.preventDefault(); $ae(this).click(); } else if (e.which === 39 || e.which === 40) { e.preventDefault(); AudioEye.focusElement($ae(this).next()); }
}); ele.outerFind('.tabs .tab.tab_model_show').click(function () { $ae(".tabs div[role='tab']").attr({ "aria-selected": "false", 'tabindex': '-1' }); //deselect all the tabs if ($ae(this).attr('aria-expanded') === 'false') { $ae(this).next().attr({ 'tabindex': '0' }); $ae(this).attr({ 'aria-expanded': 'true', 'aria-selected': 'true' }); } else { $ae(this).next().attr({ 'tabindex': '-1', 'aria-expanded': 'false', 'aria-selected': 'false' });
} }); ele.outerFind('.tabs .tab.tab_year_show').click(function () { $ae(".tabs div[role='tab']").attr({ "aria-selected": "false", 'tabindex': '-1' }); //deselect all the tabs if ($ae(this).attr('aria-expanded') === 'false') { $ae(this).next().attr({ 'tabindex': '0' }); $ae(this).attr({ 'aria-expanded': 'true', 'aria-selected': 'true' }); } else { $ae(this).next().attr({ 'tabindex': '-1', 'aria-expanded': 'false', 'aria-selected': 'false' });
} }); // AE Glovebox Tabset // initial states of the tabs and tab content. adjust selectors accordingly ele.outerFind('.glovebox-tabs-wrap .nav-tabs').attr('role', 'tablist'); ele.outerFind('.glovebox-tabs-wrap .nav-tabs li a').attr({ 'role': 'tab', 'aria-selected': 'false', 'tabindex': '-1' }); ele.outerFind('.glovebox-tabs-wrap .nav-tabs li.active a').attr({ 'aria-selected': 'true', 'tabindex': '0' }); ele.outerFind('.glovebox-tabs-wrap .tab-content > .tab-pane').attr({ 'role': 'tabpanel', 'tabindex': '-1', 'aria-hidden': 'true' }); ele.outerFind('.glovebox-tabs-wrap .tab-content > .tab-pane.active').attr({ 'role': 'tabpanel', 'tabindex': '0', 'aria-hidden': 'false' });
//adding id to tabs adjust selectors accordingly var js_tab_ID = 0; ele.outerFind('.glovebox-tabs-wrap .nav-tabs li a').each(function () { $ae(this).attr('id', 'js_tab_ID' + js_tab_ID); js_tab_ID++; });
var js_tabNum = 0; ele.outerFind('.glovebox-tabs-wrap .tab-content > .tab-pane').each(function () { $ae(this).attr({ 'aria-labelledby': 'js_tab_ID' + js_tabNum }); js_tabNum++; });
// change states after click. adjust selectors accordingly ele.outerFind('a[role="tab"]').click(function () { $ae('a[role="tab"]').attr({ 'aria-selected': 'false', 'tabindex': '-1' }); //deselect all the tabs $ae(this).attr({ 'aria-selected': 'true', 'tabindex': '0' }); // select this tab var tabpanid = $ae(this).attr('aria-controls'); //find out what tab panel this tab controls var tabpan = $ae("#" + tabpanid); $ae("div[role='tabpanel']").attr({ 'aria-hidden': 'true', 'tabindex': '-1' }); //hide all the panels tabpan.attr({ 'aria-hidden': 'false', 'tabindex': '0' }); // show our panel });
ele.outerFind('.glovebox-tabs-wrap .nav-tabs li a').on('keydown', function (e) { if (e.which === 37 || e.which === 38) { e.preventDefault(); AudioEye.focusElement($ae(this).parent().prev().find('a')); } if (e.which === 32) { this.click();
} else if (e.which === 39 || e.which === 40) { e.preventDefault(); AudioEye.focusElement($ae(this).parent().next().find('a')); } });
// AE- Role tab to radio buttons that function as tabs ele.outerFind('div.switch[role="tablist"] label').attr({ 'role': 'tab', 'tabindex': '-1', 'aria-selected': 'false' }); //ele.outerFind('div.switch[role="tablist"] input').attr({'aria-selected': 'false', 'aria-describedby': 'Mopar Parts and Service Coupons in Olathe'}); ele.outerFind('div.switch[role="tablist"] input[checked] + label').attr({ 'aria-selected': 'true', 'tabindex': '0' });
AudioEye.arrowKeyLoop(ele, 'div.switch[role="tablist"] label', 'div.switch[role="tablist"]');
ele.outerFind('div.switch[role="tablist"] label').on('keydown', function (event) { if (event.keyCode === 13 || event.keyCode === 32) { event.preventDefault();
$ae(this).click(); } }).on('click', function () { $ae('div.switch[role="tablist"] label').attr({ 'aria-selected': 'false', 'tabindex': '-1' }); $ae(this).attr({ 'aria-selected': 'true', 'tabindex': '0' }); });
///////////////////////// END TABSET /////////////////
////////////////////////// AT Focus //////////////////////////
/// click focus function ele.outerFind('.CarcodeWidgetContainer button').filter(':contains(Text Us)').click(function () { var jim_return = $ae(this); setTimeout(function () { AudioEye.focusElement('.CarcodeWidgetGlobalSmsContainer [data-test="carcode-sms-close"]'); AudioEye.modals.enableTabLoop('.CarcodeWidgetGlobalSmsContainer'); $ae('.CarcodeWidgetGlobalSmsContainer [data-test="carcode-sms-close"]').click(function () { AudioEye.focusElement(jim_return);
}); }, 500); });
ele.outerFind('#headertab img.tabimg').click(function () { setTimeout(function () { AudioEye.focusElement('#headertabdropdown #tabcontent .principlesbullets a').filter(':first'); }, 1000); }); // chat widget Focus ele.outerFind('#etsTextTopButton a').click(function () { var jim_return = $ae(this); setTimeout(function () { // tab trap AudioEye.modals.enableTabLoop('#etsQuestionBox'); $ae('#etsQuestionBox a').attr('aria-label', 'close'); // focus to the close button most of the time AudioEye.focusElement('#etsQuestionBox a'); $ae('').click(function () { AudioEye.focusElement(jim_return); }); }, 500);
}); // compare vehicle fix
// find dealer now focus ele.outerFind('#video-title-overlay a[target="vehiclesearch"]').click(function () { var jim_return = $ae(this); setTimeout(function () { $ae('#model-tab img').attr('alt', '');
AudioEye.focusElement('#vehiclesearch-overlay .close-overlay');
$ae('#vehiclesearch-overlay .close-overlay').click(function () { AudioEye.focusElement(jim_return); }); }, 1000); AudioEye.modals.enableTabLoop('#vehiclesearch-overlay');
}); ele.outerFind('#vehiclesearch-overlay .inside-tabs a').attr('role', 'link'); // error message focus. ele.outerFind('button').filter(':contains(Continue)').click(function () { setTimeout(function () { AudioEye.focusElement('.validation-message'); }, 1000); });
// AE - find your vehicle focus ele.outerFind('#findtoggle').attr({ 'role': 'button', 'tabindex': '0' }); ele.outerFind('#findtoggle').click(function () { $ae('.close-overlay').attr({ 'tabindex': '0', 'role': 'button' }); $ae('.back-overlay').attr({ 'tabindex': '0', 'role': 'button' });
AudioEye.focusElement('#findvehicle-overlay'); AudioEye.modals.enableTabLoop('#full-overlay'); });
// focus to error message ele.outerFind('form[action="https://secure.dealerinspire.com/application/submit"] button[type="submit"]').click(function () { AudioEye.focusElement('.validation-message.failure'); });
// AE search by payment toolbar tab loop and close button functionality ele.outerFind('#side-toolbar .overlay-toggle').click(function () { $ae('#toolbar-overlay .overlay-container .close-overlay').attr({ 'role': 'button', 'tabindex': '0', 'aria-label': 'close' }); AudioEye.focusElement('#toolbar-overlay .overlay-container .close-overlay'); AudioEye.modals.enableTabLoop('#toolbar-overlay .overlay-container');
}); ele.outerFind('.close-overlay').on('keydown', function (e) { if (e.keyCode === 13 || e.keyCode === 32) { this.click(); } });
// AE - Disclaimer link header and context append plus focus ele.outerFind('.national-incentive-offers .offer-content a:contains(Terms and Conditions)').click(function () { var href = $ae(this).attr('href'); setTimeout(function () { AudioEye.focusElement(href); }, 500); }); //ele.outerFind('#header-search-toggle').attr({'tabindex':'0','role':'button'}); ele.outerFind('#searchanything-overlay .menu-close-x').attr({ 'href': '#', 'tabindex': '0', 'role': 'button', 'aria-label': 'Close' }); ele.outerFind('.bottom-search .search-box').click(function () { var jim_return = $ae(this); AudioEye.focusElement('#searchanything-overlay .menu-close-x'); //.fancybox-wrap form input:first $ae('#searchanything-overlay .menu-close-x').click(function () { AudioEye.focusElement(jim_return); });
// tab trap AudioEye.modals.enableTabLoop('#searchanything-overlay');
});
// review modal fix ele.outerFind('h3').filter(':contains(Do you Facebook?)').parent().find('button').each(function () { $ae(this).prepend('Do you Facebook?');
});
ele.outerFind('.btn--leave_review').prepend('Would You like to leave us a review?'); ele.outerFind('.btn--google ').prepend('Do you have a google account?');
// review buttons with up or down icons ele.outerFind('button.btn--leave_review').has('.fa-thumbs-o-up').each(function () { $ae(this).find('span.ae-compliance-indent').remove(); $ae(this).prepend('Leave us a positive review'); }); ele.outerFind('a.btn--leave_review').has('.fa-thumbs-o-down').each(function () { $ae(this).find('span.ae-compliance-indent').remove(); $ae(this).prepend('Leave us a negative review'); });
ele.outerFind('.btn--leave_review').attr({ 'aria-checked': 'false', 'tabindex': '0', 'role': 'radio' }); ele.outerFind('.btn--google').attr({ 'aria-checked': 'false', 'tabindex': '0', 'role': 'radio' }); ele.outerFind('.btn--yelp').attr({ 'aria-checked': 'false', 'tabindex': '0', 'role': 'radio' });
ele.outerFind('.btn--leave_review, .btn--google, .btn--yelp').click(function () { if ($ae(this).attr('aria-checked') === "false") { $ae('.btn--leave_review').attr('aria-checked', 'false'); $ae(this).attr('aria-checked', 'true'); } else { $ae(this).attr('aria-checked', 'false'); } });
$ae('.btn--leave_review[value="yes"]').click(function () { setTimeout(function () { AudioEye.focusElement($ae('.leave_review_Y').filter(':header'));
}, 1000); });
$ae('.btn--leave_review[value="no"]').click(function () { setTimeout(function () { AudioEye.focusElement($ae('.leave_review_N').filter(':header'));
}, 1000); });
$ae('.btn--google[value="yes"]').click(function () { setTimeout(function () { AudioEye.focusElement($ae('.google_Y').filter(':header'));
}, 1000); }); $ae('.btn--google[value="no"]').click(function () { setTimeout(function () { AudioEye.focusElement($ae('.google_N').filter(':header'));
}, 1000); });
$ae('.btn--yelp[value="yes"]').click(function () { setTimeout(function () { AudioEye.focusElement($ae('.yelp_Y').filter(':header'));
}, 1000); }); $ae('.btn--yelp[value="no"]').click(function () { setTimeout(function () { AudioEye.focusElement($ae('.yelp_N').filter(':header'));
}, 1000); });
// Dealer Inspire chat box focus ele.outerFind('#di-conversations-embed-root .sc-gJWqzi.cCtlSS').filter(':first').find('a').attr({ 'role': 'button', 'tabindex': '0', 'aria-label': 'minimize' });
ele.outerFind('.conversations-cta-tab > a').click(function () { var jim_return = $ae(this); setTimeout(function () { $ae('#di-conversations-embed-root .eLDolb input').attr('aria-label', 'Message text edit'); AudioEye.focusElement('#di-conversations-embed-root a[aria-label="Close Chat"]'); AudioEye.modals.enableTabLoop('#di-conversations-embed-root .eLDolb'); }, 500); });
//////////////////////////focus to Fancybox////////////////////////// ele.outerFind('.fancybox-opened .fancybox-close').attr({ 'role': 'button', 'tabindex': '0', 'aria-hidden': 'false' }); ele.outerFind('.fancybox-close').append('Close');
ele.outerFind('.imagegallery .model-page-fancybox').click(function () { var jim_return = $ae(this); console.log(jim_return); setTimeout(function () { AudioEye.modals.enableTabLoop('.fancybox-skin');
AudioEye.focusElement('.fancybox-opened .fancybox-close'); //.fancybox-wrap form input:first $ae('.fancybox-opened .fancybox-close').click(function () { setTimeout(function () { AudioEye.focusElement(jim_return); }, 1000); // these timeouts are set for both AT and our Player. please dont change }); $ae('#myModal button.close').click(function () { setTimeout(function () { AudioEye.focusElement(jim_return); }, 1000); // these timeouts are set for both AT and our Player. please dont change }); $ae('.fancybox-opened .fancybox-close').on('keydown', function (e) { if (e.keyCode === 13 || e.keyCode === 32) { e.preventDefault(); e.target.click(); } }); }, 2000);// these timeouts are set for both AT and our Player. please dont change // keyboard trap }); ele.outerFind('.vehicle .button-bar .primary-cta a[target="lightbox"]').click(function () { var jim_return = $ae(this); console.log(jim_return); setTimeout(function () { AudioEye.modals.enableTabLoop('.fancybox-skin');
AudioEye.focusElement('.fancybox-opened .fancybox-close'); //.fancybox-wrap form input:first $ae('.fancybox-opened .fancybox-close').click(function () { setTimeout(function () { AudioEye.focusElement(jim_return); }, 1000); // these timeouts are set for both AT and our Player. please dont change }); $ae('#myModal button.close').click(function () { setTimeout(function () { AudioEye.focusElement(jim_return); }, 1000); // these timeouts are set for both AT and our Player. please dont change }); $ae('.fancybox-opened .fancybox-close').on('keydown', function (e) { if (e.keyCode === 13 || e.keyCode === 32) { e.preventDefault(); e.target.click(); } }); }, 2000);// these timeouts are set for both AT and our Player. please dont change // keyboard trap }); ele.outerFind('a.cta-button').click(function () { var jim_return = $ae(this); console.log(jim_return); setTimeout(function () { AudioEye.modals.enableTabLoop('.fancybox-skin');
AudioEye.focusElement('.fancybox-opened .fancybox-close'); //.fancybox-wrap form input:first $ae('.fancybox-opened .fancybox-close').click(function () { setTimeout(function () { AudioEye.focusElement(jim_return); }, 1000); // these timeouts are set for both AT and our Player. please dont change }); $ae('#myModal button.close').click(function () { setTimeout(function () { AudioEye.focusElement(jim_return); }, 1000); // these timeouts are set for both AT and our Player. please dont change }); $ae('.fancybox-opened .fancybox-close').on('keydown', function (e) { if (e.keyCode === 13 || e.keyCode === 32) { e.preventDefault(); e.target.click(); } }); }, 2000);// these timeouts are set for both AT and our Player. please dont change // keyboard trap });
ele.outerFind('.share-vehicle .email-vehicle-btn').click(function () { var jim_return = $ae(this); console.log(jim_return); setTimeout(function () { AudioEye.modals.enableTabLoop('.fancybox-skin');
AudioEye.focusElement('.fancybox-opened .fancybox-close'); //.fancybox-wrap form input:first $ae('.fancybox-opened .fancybox-close').click(function () { setTimeout(function () { AudioEye.focusElement(jim_return); }, 1000); // these timeouts are set for both AT and our Player. please dont change }); $ae('#myModal button.close').click(function () { setTimeout(function () { AudioEye.focusElement(jim_return); }, 1000); // these timeouts are set for both AT and our Player. please dont change }); $ae('.fancybox-opened .fancybox-close').on('keydown', function (e) { if (e.keyCode === 13 || e.keyCode === 32) { e.preventDefault(); e.target.click(); } }); }, 2000);// these timeouts are set for both AT and our Player. please dont change // keyboard trap }); ele.outerFind('.vdp-shopping-tools a.fancybox').click(function () { var jim_return = $ae(this); console.log(jim_return); setTimeout(function () { AudioEye.modals.enableTabLoop('.fancybox-skin');
AudioEye.focusElement('.fancybox-opened .fancybox-close'); //.fancybox-wrap form input:first $ae('.fancybox-opened .fancybox-close').click(function () { setTimeout(function () { AudioEye.focusElement(jim_return); }, 1000); // these timeouts are set for both AT and our Player. please dont change }); $ae('#myModal button.close').click(function () { setTimeout(function () { AudioEye.focusElement(jim_return); }, 1000); // these timeouts are set for both AT and our Player. please dont change }); $ae('.fancybox-opened .fancybox-close').on('keydown', function (e) { if (e.keyCode === 13 || e.keyCode === 32) { e.preventDefault(); e.target.click(); } }); }, 2000);// these timeouts are set for both AT and our Player. please dont change // keyboard trap }); ele.outerFind('.maincta-row.ctabox-row a.fancybox').click(function () { var jim_return = $ae(this); console.log(jim_return); setTimeout(function () { AudioEye.modals.enableTabLoop('.fancybox-skin');
AudioEye.focusElement('.fancybox-opened .fancybox-close'); //.fancybox-wrap form input:first $ae('.fancybox-opened .fancybox-close').click(function () { setTimeout(function () { AudioEye.focusElement(jim_return); }, 1000); // these timeouts are set for both AT and our Player. please dont change }); $ae('#myModal button.close').click(function () { setTimeout(function () { AudioEye.focusElement(jim_return); }, 1000); // these timeouts are set for both AT and our Player. please dont change }); $ae('.fancybox-opened .fancybox-close').on('keydown', function (e) { if (e.keyCode === 13 || e.keyCode === 32) { e.preventDefault(); e.target.click(); } }); }, 2000);// these timeouts are set for both AT and our Player. please dont change // keyboard trap });
ele.outerFind('.secondary-cta-wrap a.fancybox').click(function () { var jim_return = $ae(this); console.log(jim_return); setTimeout(function () { AudioEye.modals.enableTabLoop('.fancybox-skin');
AudioEye.focusElement('.fancybox-opened .fancybox-close'); //.fancybox-wrap form input:first $ae('.fancybox-opened .fancybox-close').click(function () { setTimeout(function () { AudioEye.focusElement(jim_return); }, 1000); // these timeouts are set for both AT and our Player. please dont change }); $ae('#myModal button.close').click(function () { setTimeout(function () { AudioEye.focusElement(jim_return); }, 1000); // these timeouts are set for both AT and our Player. please dont change }); $ae('.fancybox-opened .fancybox-close').on('keydown', function (e) { if (e.keyCode === 13 || e.keyCode === 32) { e.preventDefault(); e.target.click(); } }); }, 2000);// these timeouts are set for both AT and our Player. please dont change // keyboard trap }); ele.outerFind('a.fancy').click(function () { var jim_return = $ae(this); console.log(jim_return); setTimeout(function () { AudioEye.modals.enableTabLoop('.fancybox-skin');
AudioEye.focusElement('.fancybox-opened .fancybox-close'); //.fancybox-wrap form input:first $ae('.fancybox-opened .fancybox-close').click(function () { setTimeout(function () { AudioEye.focusElement(jim_return); }, 1000); // these timeouts are set for both AT and our Player. please dont change }); $ae('#myModal button.close').click(function () { setTimeout(function () { AudioEye.focusElement(jim_return); }, 1000); // these timeouts are set for both AT and our Player. please dont change }); $ae('.fancybox-opened .fancybox-close').on('keydown', function (e) { if (e.keyCode === 13 || e.keyCode === 32) { e.preventDefault(); e.target.click(); } }); }, 2000);// these timeouts are set for both AT and our Player. please dont change // keyboard trap }); }; f.id = "833542"; f.title = "*DI Master JS #2"; f.type = "javascript";
!function(f){ if (window.AudioEye && window.AudioEye.manualRemediations) { window.AudioEye.manualRemediations.push(f); } }(f); //# sourceURL=https://wsv3cdn.audioeye.com/helpers-remediations/_DI_Master_JS__2.js
var f = function (ele, api) { ele.outerFind('a[href="#valueTrade"].lightbox.button.primary-button').click(function () { var jim_return = $ae(this); console.log(jim_return); setTimeout(function () { AudioEye.modals.enableTabLoop('.fancybox-skin');
AudioEye.focusElement('.fancybox-opened .fancybox-close'); //.fancybox-wrap form input:first $ae('.fancybox-opened .fancybox-close').click(function () { setTimeout(function () { AudioEye.focusElement(jim_return); }, 1000); // these timeouts are set for both AT and our Player. please dont change }); $ae('#myModal button.close').click(function () { setTimeout(function () { AudioEye.focusElement(jim_return); }, 1000); // these timeouts are set for both AT and our Player. please dont change }); $ae('.fancybox-opened .fancybox-close').on('keydown', function (e) { if (e.keyCode === 13 || e.keyCode === 32) { e.preventDefault(); e.target.click(); } }); }, 2000);// these timeouts are set for both AT and our Player. please dont change // keyboard trap });
ele.outerFind('a[href="#contactParts"].lightbox.button.primary-button').click(function () { var jim_return = $ae(this); console.log(jim_return); setTimeout(function () { AudioEye.modals.enableTabLoop('.fancybox-skin');
AudioEye.focusElement('.fancybox-opened .fancybox-close'); //.fancybox-wrap form input:first $ae('.fancybox-opened .fancybox-close').click(function () { setTimeout(function () { AudioEye.focusElement(jim_return); }, 1000); // these timeouts are set for both AT and our Player. please dont change }); $ae('#myModal button.close').click(function () { setTimeout(function () { AudioEye.focusElement(jim_return); }, 1000); // these timeouts are set for both AT and our Player. please dont change }); $ae('.fancybox-opened .fancybox-close').on('keydown', function (e) { if (e.keyCode === 13 || e.keyCode === 32) { e.preventDefault(); e.target.click(); } }); }, 2000);// these timeouts are set for both AT and our Player. please dont change // keyboard trap }); ele.outerFind('a[href="#contactService"].lightbox.button.primary-button').click(function () { var jim_return = $ae(this); console.log(jim_return); setTimeout(function () { AudioEye.modals.enableTabLoop('.fancybox-skin');
AudioEye.focusElement('.fancybox-opened .fancybox-close'); //.fancybox-wrap form input:first $ae('.fancybox-opened .fancybox-close').click(function () { setTimeout(function () { AudioEye.focusElement(jim_return); }, 1000); // these timeouts are set for both AT and our Player. please dont change }); $ae('#myModal button.close').click(function () { setTimeout(function () { AudioEye.focusElement(jim_return); }, 1000); // these timeouts are set for both AT and our Player. please dont change }); $ae('.fancybox-opened .fancybox-close').on('keydown', function (e) { if (e.keyCode === 13 || e.keyCode === 32) { e.preventDefault(); e.target.click(); } }); }, 2000);// these timeouts are set for both AT and our Player. please dont change // keyboard trap }); ele.outerFind('.reserve-button.fancybox').click(function () { var jim_return = $ae(this); console.log(jim_return); setTimeout(function () { AudioEye.modals.enableTabLoop('.fancybox-skin');
AudioEye.focusElement('.fancybox-opened .fancybox-close'); //.fancybox-wrap form input:first $ae('.fancybox-opened .fancybox-close').click(function () { setTimeout(function () { AudioEye.focusElement(jim_return); }, 1000); // these timeouts are set for both AT and our Player. please dont change }); $ae('#myModal button.close').click(function () { setTimeout(function () { AudioEye.focusElement(jim_return); }, 1000); // these timeouts are set for both AT and our Player. please dont change }); $ae('.fancybox-opened .fancybox-close').on('keydown', function (e) { if (e.keyCode === 13 || e.keyCode === 32) { e.preventDefault(); e.target.click(); } }); }, 2000);// these timeouts are set for both AT and our Player. please dont change // keyboard trap });
//setupModal('.button-bar-item.quick-look a', '.fancybox-wrap', 'a.fancybox-item.fancybox-close', '.fancybox-skin h5', 1); ele.outerFind('.button-bar-item.quick-look a').click(function () { var jim_return = $ae(this); console.log(jim_return); setTimeout(function () {
AudioEye.focusElement('.fancybox-opened .fancybox-close'); //.fancybox-wrap form input:first $ae('.fancybox-opened .fancybox-close').click(function () { setTimeout(function () { AudioEye.focusElement(jim_return); }, 1000); // these timeouts are set for both AT and our Player. please dont change }); $ae('#myModal button.close').click(function () { setTimeout(function () { AudioEye.focusElement(jim_return); }, 1000); // these timeouts are set for both AT and our Player. please dont change }); $ae('.fancybox-opened .fancybox-close').on('keydown', function (e) { if (e.keyCode === 13 || e.keyCode === 32) { e.preventDefault(); e.target.click(); } }); }, 4000);// these timeouts are set for both AT and our Player. please dont change // keyboard trap AudioEye.modals.enableTabLoop('.fancybox-skin'); }); ele.outerFind('#compare-vehicle-table').each(function () { AudioEye.focusElement($ae(this).closest('.fancybox-skin').find('.fancybox-close')); AudioEye.modals.enableTabLoop($ae(this).closest('.fancybox-skin')); });
// DI Modal fix ele.outerFind('#DIModal').each(function () { $ae(this).attr('aria-label', $ae(this).find('.modal-title').text().trim()); }); ele.outerFind('a[data-target="#DIModal"]').click(function () { var jim_return = $ae(this); console.log(jim_return); setTimeout(function () { // tab trap AudioEye.modals.enableTabLoop('#DIModal .modal-content'); // focus to the close button most of the time AudioEye.focusElement('#DIModal .modal-header button.close'); $ae('#DIModal').find('button[data-dismiss="modal"], a[data-dismiss="modal"]').click(function () { setTimeout(function () { AudioEye.focusElement(jim_return); console.log(jim_return); }, 500); }); }, 1000);
}); ele.outerFind('.button[data-target="#DIModal"]').click(function () { var jim_return = $ae(this); console.log(jim_return); setTimeout(function () { // tab trap AudioEye.modals.enableTabLoop('#DIModal .modal-content'); // focus to the close button most of the time AudioEye.focusElement('#DIModal .modal-header button.close'); $ae('#DIModal').find('button[data-dismiss="modal"], a[data-dismiss="modal"]').click(function () { setTimeout(function () { AudioEye.focusElement(jim_return); console.log(jim_return); }, 500); }); }, 1000);
});
ele.outerFind('.staff-item a').filter(':contains(More Info)').click(function () { var jim_return = $ae(this); setTimeout(function () { $ae('.staff-pic').attr('tabindex', '0'); AudioEye.focusElement('.fancybox-opened .fancybox-close'); //.fancybox-wrap form input:first $ae('.fancybox-opened .fancybox-close').click(function () { AudioEye.focusElement(jim_return); }); }, 2000); // keyboard trap AudioEye.modals.enableTabLoop('.fancybox-skin');
});
////////////////////////// END focus to fancybox ////////////////////////// api.convertToBtn('.staff-email-button'); // email modal focusElement ele.outerFind('.staff-email-button').click(function () { var jim_return = $ae(this); setTimeout(function () { // tab trap AudioEye.modals.enableTabLoop('#directToStaff'); // focus to the close button most of the time AudioEye.focusElement('#directToStaff .close'); $ae('#directToStaff .close').click(function () { AudioEye.focusElement(jim_return); }); }, 1000);
});
ele.outerFind('.form-button button[value="Calculate Payments"]').click(function () { if(!ele.outerFind('.amount-info span:empty')[0]){ AudioEye.focusElement('.second-fl .payment-box h3'); } else { AudioEye.focusElement('.payment-calculator-container input#price'); } }); ele.outerFind('#apply-now-button button').click(function () { AudioEye.focusElement('#apply-for-credit-header form'); });
// value your trade focus
ele.outerFind('.vdp-shopping-tools .fancy_iframe').click(function () { var jim_return = $ae(this); setTimeout(function () { AudioEye.focusElement('.fancybox-overlay .fancybox-wrap .fancybox-skin .fancybox-iframe'); AudioEye.modals.enableTabLoop('.fancybox-skin'); $ae('.fancybox-opened .fancybox-close').click(function () { AudioEye.focusElement(jim_return); }); }, 2000); }); ele.outerFind('#rebates .fancy_iframe').click(function () { var jim_return = $ae(this); setTimeout(function () { AudioEye.focusElement('.fancybox-overlay .fancybox-wrap .fancybox-skin .fancybox-iframe'); AudioEye.modals.enableTabLoop('.fancybox-skin'); $ae('.fancybox-opened .fancybox-close').click(function () { AudioEye.focusElement(jim_return); }); }, 2000); }); ele.outerFind('.tabs-responsive a.fancy_iframe').click(function () { var jim_return = $ae(this); setTimeout(function () { AudioEye.focusElement('.fancybox-overlay .fancybox-wrap .fancybox-skin .fancybox-iframe'); AudioEye.modals.enableTabLoop('.fancybox-skin'); $ae('.fancybox-opened .fancybox-close').click(function () { AudioEye.focusElement(jim_return); }); }, 2000); });
api.hideFromAT($ae('.third-party-shopping-tools-wrapper .shopping-label').find('a:empty'));
// save button new window warning ele.outerFind('.save-things.save-things-save').append('Opens a new window '); // print coupon focus ele.outerFind('.coupon-actions a.difo-type-print').click(function () { var jim_return = $ae(this); setTimeout(function () { $ae('.fancybox-opened .fancybox-close').attr({ 'role': 'button', 'tabindex': '0', 'aria-hidden': 'false' }); AudioEye.focusElement('.fancybox-skin input.fancy_print'); $ae('.fancybox-opened .fancybox-close').click(function () { AudioEye.focusElement(jim_return); }); AudioEye.modals.enableTabLoop('.fancybox-wrap');
}, 1000); }); // toggle-filters focus ele.outerFind('#search-anything .grid-list-container a.button.primary-button').not('.expanded').click(function () { setTimeout(function () { AudioEye.focusElement('td.results form[name="filters_and_search"]');
}, 2500); }); // "images" button focus ele.outerFind('.button-bar-item.quick-look a').click(function () { setTimeout(function () { $ae('.fancybox-wrap').find('h5, h1').attr('tabindex', '0'); }, 1000);
$ae('.fancybox-wrap .fancybox-close').click(function () { $ae('.fancybox-wrap').filter(':header').attr('tabindex', '-1');
}); }); ele.outerFind('.button-bar-item.quick-look a').click(function () { setTimeout(function () { $ae('.fancybox-wrap').find('h5, h1').attr({ 'role': 'presentation', 'tabindex': '0' }); }, 1000);
$ae('.fancybox-wrap .fancybox-close').click(function () { $ae('.fancybox-wrap').filter(':header').attr('tabindex', '-1');
}); });
ele.outerFind('#compare_div #compare-actions a').attr({ 'role': 'button', 'tabindex': '0' });
ele.outerFind('#compare-expand-btn').click(function () { setTimeout(function () { AudioEye.focusElement('#compare_div'); }, 500); }); ele.outerFind('.grid-view a.compare-vehicle').each(function () { if ($ae(this).attr('aria-hidden') == 'true') { $ae(this).attr('tabindex', '-1'); } }); // view all premium options focus ele.outerFind('#ctabox-premium-features > a').filter(':contains(View All)').click(function () { setTimeout(function () { AudioEye.focusElement('.vdp-info-accordion .vdp-sectiontitle h2'); }, 1000); });
// incentives focus ele.outerFind('.targeted-incentives').click(function () { var jim_return = $ae(this); setTimeout(function () { AudioEye.focusElement('.modal-content h2'); }, 2000); $ae('.modal-footer button').click(function () { AudioEye.focusElement(jim_return); }); });
// Finance Calc button focus ele.outerFind('.finance-bottom .show-calculator-btn').click(function () { setTimeout(function () { AudioEye.focusElement('.calculator.finance-calculator.incentives-box'); }, 1000); }); // find dealer now focus ele.outerFind('#video-title-overlay a[target="vehiclesearch"]').click(function () { var jim_return = $ae(this); setTimeout(function () { $ae('#model-tab img').attr('alt', '');
AudioEye.focusElement('#vehiclesearch-overlay .close-overlay');
$ae('#vehiclesearch-overlay .close-overlay').click(function () { AudioEye.focusElement(jim_return); }); }, 1000); AudioEye.modals.enableTabLoop('#vehiclesearch-overlay'); }); ele.outerFind('#vehiclesearch-overlay .inside-tabs a').attr('role', 'link'); // error message focus. ele.outerFind('button').filter(':contains(Continue)').click(function () { setTimeout(function () { AudioEye.focusElement('.validation-message'); }, 1000); });
// AE - Live Help focus ele.outerFind('a[data-name*="Live Help"]').click(function () { var jim_return = $ae(this); setTimeout(function () { $ae('#cndepts .cn-box-close').attr('aria-label', 'close'); AudioEye.focusElement('#cndepts .cn-box-close'); AudioEye.modals.enableTabLoop('#cndepts');
$ae('#DIModal .close').click(function () { AudioEye.focusElement(jim_return); }); $ae('#DIModal button').click(function () { AudioEye.focusElement(jim_return); }); }, 1000); });
ele.outerFind('a[data-name*="Bottom Toolbar - Chat"]').attr('aria-label', 'Connect by chatting with us'); ele.outerFind('a[data-name*="Bottom Toolbar - Chat"], a[onclick^="CarNowPlugin.showSmsContactForm"]').click(function () { var jim_return = $ae(this); setTimeout(function () { $ae('#cncb11_sms_form .cn-cls').attr('aria-label', 'minimize'); AudioEye.focusElement('#cndepts .cn-box-close'); AudioEye.modals.enableTabLoop('#cndepts');
$ae('#cndepts .cn-box-close').click(function () { AudioEye.focusElement(jim_return); }); }, 1000); }); // AE - Text focus ele.outerFind('a[data-name*="Bottom Toolbar - Text"]').attr('aria-label', 'Connect by texting us'); ele.outerFind('a[data-name*="Bottom Toolbar - Text"]').click(function () { var jim_return = $ae(this); setTimeout(function () { $ae('#cncb11_sms_form .cn-cls').attr('aria-label', 'minimize'); AudioEye.focusElement('#cncb11_sms_form .cn-cls'); AudioEye.modals.enableTabLoop('#cncb11_sms_form');
$ae('#cncb11_sms_form .cn-cls').click(function () { AudioEye.focusElement(jim_return); }); }, 1000); }); ele.outerFind('a[onclick^="CarNowPlugin.showSmsContactForm"]').click(function () { var jim_return = $ae(this); setTimeout(function () { $ae('#cncb11_sms_form .cn-cls').attr('aria-label', 'minimize'); AudioEye.focusElement('#cncb11_sms_form .cn-cls'); AudioEye.modals.enableTabLoop('#cncb11_sms_form');
$ae('#cncb11_sms_form .cn-cls').click(function () { AudioEye.focusElement(jim_return); }); }, 1000); });
api.convertToBtn('.vehicle-quick-stats .fw-cta-button.fw-cta.fw-cta-bottom-center'); ele.outerFind('.vehicle-quick-stats .fw-cta-button.fw-cta.fw-cta-bottom-center').click(function () { setTimeout(function () { AudioEye.focusElement('.nanoModal.nanoModalOverride.fw-modal '); }, 4000); }); ele.outerFind('.vw-cta-container a[href$="-confirm-leave"]').click(function () { AudioEye.focusElement('.vw-confirm-leave__headline'); AudioEye.modals.enableTabLoop('.vw-confirm-leave'); });
//widget focus ele.outerFind('.gg-btn-specials').click(function () { var jim_return = $ae(this); setTimeout(function () {
AudioEye.focusElement('.gg-da.gg-popup .gg-da-top__minimize.gg-close'); AudioEye.modals.enableTabLoop('.gg-da.gg-popup');
$ae('.gg-da.gg-popup .gg-da-top__minimize.gg-close').click(function () { AudioEye.focusElement(jim_return); }); }, 500);
}); ele.outerFind('.gg-da-top__minimize.gg-close').attr({ 'role': 'button', 'tabindex': '0', 'aria-label': 'close' }); ele.outerFind('.gg-da-item__btn').each(function () { $ae(this).attr({ 'role': 'button', 'tabindex': '0', 'aria-label': 'Get ' + $ae(this).closest('.gg-da-item').find('.gg-da-item__txt .gg-da-item__title').text().trim() }); }); ele.outerFind('.gg-da-slider__get').each(function () { $ae(this).attr({ 'role': 'button', 'tabindex': '0', 'aria-label': 'Get ' + $ae(this).closest('.gg-da-slider__content').find('.gg-da-slider__title').text().trim() }); });
ele.outerFind('#gg-toolbar .gg-tabs a').click(function () { var jim_return = $ae(this); setTimeout(function () { $ae('.gg-round-close.gg-close').attr({ 'role': 'button', 'tabindex': '0', 'aria-label': 'close' }); $ae('.gg-po-chat-btn').attr({ 'role': 'button', 'tabindex': '0', 'aria-label': 'ask about offer' });
AudioEye.focusElement('.gg-round-close.gg-close'); AudioEye.modals.enableTabLoop('.gg-popup'); }, 500); }); ele.outerFind('#gg_po_checkbox').addClass('ae-compliance-indent ae-reader-visible').css('display', 'block');
ele.outerFind('.gg-po-offers__item').not('.gg-active').attr({ 'role': 'checkbox', 'tabindex': '0', 'aria-checked': 'false' }); ele.outerFind('.gg-po-offers__item.gg-active').attr({ 'role': 'checkbox', 'tabindex': '0', 'aria-checked': 'true' }); ele.outerFind('.gg-po-offers__item').click(function () { $ae('.gg-po-offers.gg-effect-appear .gg-po-offers__item').attr('aria-checked', 'false'); $ae(this).attr('aria-checked', 'true'); }); api.hideFromAT('.gg-popup input[type="hidden"]');
ele.outerFind('.gg-chat-close').attr({ 'role': 'button', 'tabindex': '0', 'aria-label': 'close' }); ele.outerFind('.gg-dialog__close.gg-close').attr({ 'role': 'button', 'tabindex': '0', 'aria-label': 'Close' });
// AE disclaimer toggle fix
api.convertToBtn('.card-content > .disclaimertoggle'); api.convertToBtn('.card-content .closebutton'); ele.outerFind('.card-content .closebutton').attr('tabindex', '-1'); ele.outerFind('.card-content > .disclaimerwrap').attr('aria-hidden', 'true');
ele.outerFind('.card-content .closebutton').attr('aria-label', 'Close').on('click keydown', function (e) { if (e.keyCode === 13 || e.keyCode === 32 || e.type === 'click') { if (e.keyCode === 13 || e.keyCode === 32) { e.preventDefault(); this.click(); } $ae(this).parent().attr('aria-hidden', 'true'); $ae(this).attr('tabindex', '-1'); $ae(this).parent().prev().attr('tabindex', '0'); AudioEye.focusElement($ae(this).parent().prev()); } }); ele.outerFind('.card-content > .disclaimertoggle').on('click keydown', function (e) { if (e.keyCode === 13 || e.keyCode === 32 || e.type === 'click') { if (e.keyCode === 13 || e.keyCode === 32) { e.preventDefault(); this.click(); } $ae(this).attr('tabindex', '-1'); $ae(this).next('.disclaimerwrap').removeAttr('aria-hidden'); $ae(this).next('.disclaimerwrap').find('.closebutton').attr('tabindex', '0'); AudioEye.focusElement($ae(this).next().find('.closebutton.disclaimerclose')); } });
// widget social modals
ele.outerFind('.gg-social .gg-social__item--youtube').click(function () { var jim_return = $ae(this); setTimeout(function () { $ae('.gg-dialog__close.gg-close').each(function () { $ae(this).attr('aria-label', $ae(this).next().find('.gg-dialog__top--title').text() + ' Dialog Close'); }); AudioEye.focusElement('.gg-app-youtube .gg-close'); api.addKeyboardClick('.gg-dialog__close.gg-close'); $ae('.gg-da.gg-popup .gg-da-top__minimize.gg-close').click(function () { AudioEye.focusElement(jim_return); }); }, 1000);
});
ele.outerFind('.gg-social .gg-social__item--facebook').click(function () { var jim_return = $ae(this); setTimeout(function () { $ae('.gg-dialog__close.gg-close').each(function () { $ae(this).attr('aria-label', $ae(this).next().find('.gg-dialog__top--title').text() + ' Dialog Close'); }); AudioEye.focusElement('.gg-app-facebook .gg-close'); api.addKeyboardClick('.gg-dialog__close.gg-close');
}, 1000); $ae('.gg-da.gg-popup .gg-da-top__minimize.gg-close').click(function () { AudioEye.focusElement(jim_return); }); }); ele.outerFind('.gg-social .gg-social__item--twitter').click(function () { var jim_return = $ae(this); setTimeout(function () { $ae('.gg-dialog__close.gg-close').each(function () { $ae(this).attr('aria-label', $ae(this).next().find('.gg-dialog__top--title').text() + ' Dialog Close'); }); api.addKeyboardClick('.gg-dialog__close.gg-close');
AudioEye.focusElement('.gg-app-twitter .gg-close'); }, 1000); $ae('.gg-da.gg-popup .gg-da-top__minimize.gg-close').click(function () { AudioEye.focusElement(jim_return); }); }); ele.outerFind('.gg-social .gg-social__item--call_us').click(function () { var jim_return = $ae(this); setTimeout(function () { $ae('.gg-dialog__close.gg-close').each(function () { $ae(this).attr('aria-label', $ae(this).next().find('.gg-dialog__top--title').text() + ' Dialog Close'); }); api.addKeyboardClick('.gg-dialog__close.gg-close');
AudioEye.focusElement('.gg-app-call_us .gg-close'); }, 1000); $ae('.gg-da.gg-popup .gg-da-top__minimize.gg-close').click(function () { AudioEye.focusElement(jim_return); }); }); // popup chat button send message button ele.outerFind('.gg-popup .gg-chat-reply__send').attr('aria-label', 'send');
// widget conversations focus ele.outerFind('.gg-chat-bubble.gg-app').on('click keydown', function (e) { if(e.keyCode === 13 || e.keyCode === 32){ e.preventDefault(); $ae(this).click(); } if(e.type === 'click'){ setTimeout(function () { api.addKeyboardClick('.gg-dialog__close.gg-close');
AudioEye.focusElement('.gg-popup.gg-chatbox .gg-close'); AudioEye.modals.enableTabLoop('.gg-popup.gg-chatbox'); }, 1000); } });
var coll = { "Express purchase": ".drivemotors.checkout.upgrades", "Buy online from $767/mo": ".drivemotors.checkout.monthly", "Design deal": ".drivemotors.checkout.payment", "Value trade": ".drivemotors.checkout.trades" }; ele.outerFind('li.button-item').on('click', function (e) { console.log(e.target); if ($ae(e.target).is('SPAN')) e.target = $ae(e.target).closest('li'); setTimeout(function () { AudioEye.focusElement(coll[$ae(e.target).attr('aria-label')]); }, 2000); console.log(coll[$ae(e.target).attr('aria-label')]); });
ele.outerFind('#directToStaff').each(function () { var jim_return = $ae(this); setTimeout(function () { // tab trap AudioEye.modals.enableTabLoop('#directToStaff'); // focus to the close button most of the time AudioEye.focusElement('#directToStaff .close'); $ae('#directToStaff .close').click(function () { AudioEye.focusElement(jim_return); }); }, 1000);
});
ele.outerFind('.button.staff-button.staff-email-button').click(function () { var jim_return = $ae(this); setTimeout(function () { // tab trap AudioEye.modals.enableTabLoop('#directToStaff'); // focus to the close button most of the time AudioEye.focusElement('#directToStaff .close'); $ae('#directToStaff .close').click(function () { AudioEye.focusElement(jim_return); }); }, 2000);
}); ele.outerFind('#directToStaff').each(function () { var jim_return = $ae(this); setTimeout(function () { // tab trap AudioEye.modals.enableTabLoop('#directToStaff'); // focus to the close button most of the time AudioEye.focusElement('#directToStaff .close'); $ae('#directToStaff .close').click(function () { AudioEye.focusElement(jim_return); }); }, 2000);
}); // AE - form error focus
ele.outerFind('input[type="submit"]').click(function () { setTimeout(function () { AudioEye.focusElement($ae('form .gfield_error input').filter(':first')); //AudioEye.focusElement($ae('form .gfield_error textarea').filter(':first')); }, 2500); }); ele.outerFind('.validation_error').each(function () { AudioEye.focusElement($ae('form .gfield_error input').filter(':first')); // AudioEye.focusElement($ae('form .gfield_error textarea').filter(':first'));
}); //ele.outerFind('.modal .modal-title').attr('tabindex','0'); api.convertToBtn('a[data-target^="#video"]'); ele.outerFind('a[data-target^="#video"] img').each(function () { $ae(this).attr('alt', $ae(this).closest('p').next('h3').text().trim()); }); ele.outerFind('a[data-target^="#video"]').click(function () { var vidModal = $ae(this).attr('data-target'); var jim_return = $ae(this); setTimeout(function () { //$ae(vidModal).find('.modal-title').attr('tabindxex','0'); // tab trap AudioEye.modals.enableTabLoop(vidModal); // focus to the close button most of the time AudioEye.focusElement($ae(vidModal).find('.close')); $ae(vidModal).find('.close').click(function () { AudioEye.focusElement(jim_return); }); }, 1000);
});
////////////////////////// END AT Focus //////////////////////////
////////////////////////// AT FORMS ////////////////////////// // no labels ele.outerFind('#vdp-share-vehicle-form').find('input[type="text"], input[type="email"],input[type="tel"],input[type="number"], select, textarea').each(function () { $ae(this).attr('aria-label', $ae(this).prev('label').text().trim()); }); ele.outerFind('.blog-lead-default form').find('input[type="text"], input[type="email"],input[type="tel"],input[type="number"], select, textarea').each(function () { $ae(this).attr('aria-label', $ae(this).prev('label').text().trim()); }); ele.outerFind('.lo_config').find(' select, input').each(function () { $ae(this).attr('aria-label', $ae(this).closest('div').find('>label').text().trim()); }); ele.outerFind('form[data-gf_title="Contact Us"]').find('input[type="email"],textarea, input[type="text"]').each(function () { $ae(this).attr('aria-label', $ae(this).closest('li').find('label').text().trim()); }); // zipcode submit button context ele.outerFind('form.zipcode button').append(' Zip Code Submit');
ele.outerFind('.getdirections').attr('aria-label', 'Get Directions Form'); ele.outerFind('form[action="/parts/order-parts/"]').attr('aria-label', 'Order Parts Form');
ele.outerFind('input.inventory-search-field').attr('aria-label', 'Search Anything. Press enter to submit.'); // AE - advanced search ele.outerFind('.column.advanced-search input[type="text"]').each(function () { $ae(this).attr('aria-label', $ae(this).prev('label').text() + " press enter to submit"); }); ele.outerFind('#alg-search').each(function () { $ae(this).attr('aria-label', 'Search Click enter to submit'); }); // required form elements api.convertToBtn('.custom-input-switcher'); api.convertToBtn('.print-button'); ele.outerFind('.custom-input-wrapper input').attr('aria-required', 'true'); ele.outerFind('input.required').attr('aria-required', 'true'); ele.outerFind('select.required').attr('aria-required', 'true'); ele.outerFind('textarea.required').attr('aria-required', 'true');
//date label context ele.outerFind('input.hasDatepicker').closest('li').find('label').append('MM/DD/YYYY');
// radio descriptions on Aplication for financing form ele.outerFind('label').filter(':contains(Rent or Own)').attr('id', 'ae_js_radDescrip0'); ele.outerFind('label').filter(':contains(Individual or Joint)').attr('id', 'ae_js_radDescrip1'); ele.outerFind('label').filter(':contains(Purchase Type)').attr('id', 'ae_js_radDescrip2'); ele.outerFind('label').filter(':contains(Trade-In)').attr('id', 'ae_js_radDescrip3');
ele.outerFind('form input[type="radio"]').parent('label').attr('role', 'presentation');
ele.outerFind('form input[type="radio"][name="primary_address_own"]').each(function () { $ae(this).attr('aria-label', $ae(this).parent('label').text().trim()); $ae(this).attr('aria-describedby', 'ae_js_radDescrip0'); }); ele.outerFind('form input[type="radio"][name="joint_application"]').each(function () { $ae(this).attr('aria-label', $ae(this).parent('label').text().trim()); $ae(this).attr('aria-describedby', 'ae_js_radDescrip1'); }); ele.outerFind('form input[type="radio"][name="purchase_type"]').each(function () { $ae(this).attr('aria-label', $ae(this).parent('label').text().trim()); $ae(this).attr('aria-describedby', 'ae_js_radDescrip2'); }); ele.outerFind('form input[type="radio"][name="purchase_tradein"]').each(function () { $ae(this).attr('aria-label', $ae(this).parent('label').text().trim()); $ae(this).attr('aria-describedby', 'ae_js_radDescrip3'); });
// AE - empty selects ele.outerFind('select').filter(':empty').attr({ 'aria-hidden': 'true', 'tabindex': '-1', 'aria-label': 'hidden' }); ele.outerFind('select').each(function () { if ($ae.trim($ae(this).text()).length === 0) { if ($ae(this).children().length === 0) { $ae(this).attr({ 'aria-hidden': 'true', 'role': 'presentation', 'tabindex': '-1', 'aria-label': 'empty select' }); } if ($ae(this).clone().find('b, hr, span, br, strong').remove().end().children().length === 0) { $ae(this).attr({ 'aria-hidden': 'true', 'role': 'presentation', 'tabindex': '-1', 'aria-label': 'empty select' }); } } }); // field has no label ele.outerFind('#vdp-share-vehicle-form').find('textarea, input[type="email"], input[type="text"], input[type="password"]').each(function () { $ae(this).attr('aria-label', $ae(this).prev('label').text().trim()); });
ele.outerFind('a.facet-link .switch-text').each(function () { if ($ae(this).css('display') == 'none') { $ae(this).addClass('ae-exclude'); } });
//////////////////////////END AT FORMS //////////////////////////
////////////////////////// AT Alt text //////////////////////////
// alt for carusel on model pages. these img don't need alt due to the page content has all information needed. ele.outerFind('#vehicleDetails ').find('.gallery-container-main img,.gallery-container-thumbs img,.gallery-container-thumbs-sm img').attr('alt', '');
// logo // api.setAlt('.contentcontainer a[href="https://www.arlingtontoyota.com/"]', 'Arlington of Toyota in Jacksonville homepage');
// ele.outerFind('.brand-logo img').each(function () { // $ae(this).attr('alt', $ae(this).parent().next('.header-info').find('.dealer-title').text().trim() + ' Homepage'); // }); // ele.outerFind('a.logo-main > img').each(function () { // $ae(this).attr('alt', $ae(this).attr('alt') + ' Homepage');
// }); // ele.outerFind('a.dealer-logo img').each(function () { // $ae(this).attr('alt', $ae(this).closest('.logo-wrap').find('.dealer-title').text().trim() + ' Homepage'); // }); api.hideFromAT('a.dealer-logo-text'); // AE - chat pic alt api.setAlt('img#cn-chat-agent-photo', '');
// AE - LIVE HELP ALT api.setAlt('a[data-name*="Live Help"] img', 'Live Help');
// AE - [AEI-32950] hide adjacent link with image api.hideFromAT('.glovebox-vehicle .vehicle-image a'); // Rapid SSL api.setAlt('img[src="https://secure.dealerinspire.com/includes/images/RapidSSL_SEAL-90x50.gif"]', 'Secured by Rapid SSL');
// AE - testimonial page site alte api.setAlt('img[src="https://di-uploads-pod3.dealerinspire.com/vindeversautohausofsylvania/uploads/2017/01/Google.png"]', 'Google'); api.setAlt('img[src="https://di-uploads-pod3.dealerinspire.com/vindeversautohausofsylvania/uploads/2017/01/Cars.png"]', 'Cars.com'); api.setAlt('img[src="https://di-uploads-pod3.dealerinspire.com/vindeversautohausofsylvania/uploads/2017/01/Dealer-Rater.png"]', 'Dealer Rater');
// carousel alt text api.setAlt('img[src="https://di-uploads-pod15.dealerinspire.com/porscheofneworleans/uploads/2018/12/PONO1111424w_December_HP_Banners_JPGS1_1800X760.jpg"]', 'New 2018 Porsche Panamera 4 e-Hybrid. Lease for $1499 per month for 36 months'); api.setAlt('img[src="https://di-uploads-pod15.dealerinspire.com/porscheofneworleans/uploads/2018/12/PONO1111424w_December_HP_Banners_JPGS3_1800X760.jpg"]', 'New 2019 Porsche Cayenne. Lease for $999 per month for 36 months'); api.setAlt('img[src="https://di-uploads-pod15.dealerinspire.com/porscheofneworleans/uploads/2018/12/PONO1111424w_December_HP_Banners_JPGS2_1800X760.jpg"]', 'New 2018 Porsche Macan. Lease for $649 per month'); api.setAlt('img[src="https://di-uploads-development.dealerinspire.com/dibrandhubporsche/uploads/2018/09/ThenewCayenne_1800x760-1.jpg"]', 'Sportscar Together. The new Cayenne Search Cayenne all inventory'); api.setAlt('img[src="https://di-uploads-pod15.dealerinspire.com/porschesaltlakecity/uploads/2018/11/DI-mettle-detector.png"]', 'Mettle Detector. The Panamera 4s. View all inventory'); api.setAlt('img[src="https://di-uploads-pod15.dealerinspire.com/porschesaltlakecity/uploads/2018/11/ExclusiveSLC.jpg"]', 'Porsche Exclusive Manufaktur. Your Passion. Our Passion'); api.setAlt('img[src="https://di-uploads-development.dealerinspire.com/dibrandhubporsche/uploads/2018/08/KBB_August18_DI-1.png"]', 'Porshe has the Best Resale Value of all luxury brands according to Kelly Blue Book');
api.setAlt('img[src="https://di-uploads-pod15.dealerinspire.com/porscheomaha/uploads/2018/12/17-Cayenne-desktop.png"]', '2017 Cayenne Platinum Edition $56,950 Certified Pre owned'); api.setAlt('img[src="https://di-uploads-pod15.dealerinspire.com/porscheomaha/uploads/2018/11/14-911-GT3-desktop.png"]', '2014 911 GT3 129,995 Certified Preowned'); api.setAlt('img[src="https://di-uploads-pod15.dealerinspire.com/porscheomaha/uploads/2018/12/Panamera4-Turismo-desktop.png"]', '2018 Panamera 4 Sport Turismo. Lease for $1299 per month'); api.setAlt('img[src="https://di-uploads-pod15.dealerinspire.com/porscheomaha/uploads/2018/12/Macan-Sport-desktop.png"]', '2018 Macan Sport Edition. Lease for $799 per month'); api.setAlt('img[src="https://di-uploads-pod15.dealerinspire.com/porscheomaha/uploads/2018/12/19-718Cayman-desktop.png"]', '2019 718 Cayman. Lease for $599 per month'); api.setAlt('img[src="https://di-uploads-pod15.dealerinspire.com/porscheomaha/uploads/2018/12/18-Macan-desktop.png"]', '2018 Macan. Lease for $699 per month');
api.setAlt('img[src="https://di-uploads-pod15.dealerinspire.com/porscheomaha/uploads/2018/12/17-Cayenne-mobile.png"]', '2017 Cayenne Platinum Edition $56,950 Certified Pre owned'); api.setAlt('img[src="https://di-uploads-pod15.dealerinspire.com/porscheomaha/uploads/2018/11/14-911-GT3-mobile.png"]', '2014 911 GT3 129,995 Certified Preowned'); api.setAlt('img[src="https://di-uploads-pod15.dealerinspire.com/porscheomaha/uploads/2018/12/Panamera4-Turismo-mobile.png"]', '2018 Panamera 4 Sport Turismo. Lease for $1299 per month'); api.setAlt('img[src="https://di-uploads-pod15.dealerinspire.com/porscheomaha/uploads/2018/12/Macan-Sport-mobile.png"]', '2018 Macan Sport Edition. Lease for $799 per month'); api.setAlt('img[src="https://di-uploads-pod15.dealerinspire.com/porscheomaha/uploads/2018/12/19-718Cayman-mobile.png"]', '2019 718 Cayman. Lease for $599 per month'); api.setAlt('img[src="https://di-uploads-pod15.dealerinspire.com/porscheomaha/uploads/2018/12/18-Macan-mobile.png"]', '2018 Macan. Lease for $699 per month');
//model tab image alt ele.outerFind('#model-tab img').each(function () { $ae(this).attr('alt', $ae(this).parent().find('.model-name').text().trim()); }); ele.outerFind('#models.owl-carousel img').each(function () { $ae(this).attr('alt', $ae(this).closest('.item').find('h2.model-name').text().trim()); });
ele.outerFind('#popular-section .item a> img').attr('alt', '');
//////////////////////////END AT Alt text //////////////////////////
// maps api.hideFromAT('#mapRow a, #mapRow button'); api.hideFromAT('.map, .map a, .map button'); api.hideFromAT('.sidebar iframe.googlemap'); api.hideFromAT('.sidebar iframe.googlemap a'); api.hideFromAT('.sidebar iframe.googlemap button');
ele.outerFind('#mapRow').each(function () { $ae(this).find(' a, button').addClass('ae-exclude'); $ae(this).addClass('ae-exclude');
}); ele.outerFind('.map').each(function () { $ae(this).find(' a, button').addClass('ae-exclude'); $ae(this).addClass('ae-exclude');
}); ele.outerFind('.sidebar iframe.googlemap').each(function () { $ae(this).find(' a, button').addClass('ae-exclude'); $ae(this).addClass('ae-exclude'); }); ele.outerFind('.map-overlay a').attr({ 'aria-hidden': 'false' }).removeAttr('role').removeClass('ae-exclude'); ele.outerFind('.map-overlay button').attr({ 'aria-hidden': 'false' }).removeAttr('role').removeClass('ae-exclude');
ele.outerFind('.map-address a').attr({ 'role': 'link', 'tabindex': 0, 'aria-hidden': 'false' }); // Gallery Carousel fix api.setAlt('#gallery-carousel img', ''); api.setAlt('.gallerycarousel-thumbs img', '');
// carousel slide links ele.outerFind('.owl-prev').attr({ 'role': 'button', 'tabindex': '0', 'aria-label': 'Previous Slide' }); ele.outerFind('.owl-next').attr({ 'role': 'button', 'tabindex': '0', 'aria-label': 'Next Slide' }); // hide gallerythumbs carousel api.hideFromAT('.gallerycarousel-thumbs, .gallerycarousel-thumbs a, .gallerycarousel-thumbs button'); api.hideFromAT(ele.outerFind('.details-page-row').find('.owl-prev, .owl-next')); api.hideFromAT(ele.outerFind('.gallery-thumbs-wrap').find('.owl-buttons div[role="button"]')); api.hideFromAT(ele.outerFind('#gallery-carousel').find('.owl-buttons div[role="button"]'));
// AE - grid view button actionability
// AE - slider
// AE - [AEI-30892] customize lease/financing focus $ae('.leasepayment.gtm_lease_payment').removeAttr('onkeypress'); $ae('.leaseoffer.type_finance.customize').removeAttr('onkeypress'); $ae('.leaseoffer.type_lease.customize').removeAttr('onkeypress'); $ae('.leasepayment.gtm_finance_payment').removeAttr('onkeypress');
api.convertToBtn('.lo_nextstep_button, .lo_restart_button'); api.convertToBtn('.leaseoffer.type_lease.customize, .leaseoffer.type_finance.customize,.leasepayment.gtm_lease_payment, .leasepayment.gtm_finance_payment, .price-block.finance, .price-block.leasepayment'); api.hideFromAT('.price-block.fee.hidden a'); ele.outerFind('.lo_restart_button').click(function () { setTimeout(function () { AudioEye.focusElement('#lo_single_container .lo_button.lo_close_button'); // AudioEye.modals.enableTabLoop($ae(this)) }, 1000); });
ele.outerFind('.lo_nextstep_button').click(function () { setTimeout(function () { AudioEye.focusElement('#lo_single_container .lo_button.lo_close_button'); // AudioEye.modals.enableTabLoop($ae(this)) }, 1000); }); // hide from AT links api.hideFromAT('.price-block.hidden'); ele.outerFind('.price-block').filter(':has(a)').filter(':contains(MSRP)').removeAttr('role tabindex data-ae-blurbtype'); ele.outerFind('div.price-block.discounts').attr({ 'tabindex': '-1', 'role': 'presentation' }).removeAttr('data-ae-blurbtype');
ele.outerFind('div.price-block.withsavings').attr({ 'tabindex': '-1', 'role': 'presentation' }).removeAttr('data-ae-blurbtype'); ele.outerFind('.price.no_offer > a:contains(Contact Us)').attr({ 'aria-hidden': 'true', 'tabindex': '-1' });
//--------------slider modal behavior----------------------------//
ele.outerFind('.lo_container .lo_close_button').attr({ 'role': 'button', 'tabindex': '0', 'aria-label': 'close' }); ele.outerFind('div.leaseoffer').removeAttr('role tabindex aria-hidden');
$ae('input.irs-hidden-input').each(function () { api.hideFromAT($ae(this)); });
// focus slider modal and trap tab ele.outerFind('.price-block.leasepayment').click(function () { $ae('body').data('refocus_element', $ae(this));
setTimeout(function () { AudioEye.focusElement($ae('.lo_modal .lo_close_button')); AudioEye.focusElement($ae('.di-modal-close'));
AudioEye.modals.enableTabLoop('#di-modal .modal-wrap'); }, 1050); }); ele.outerFind('.leasepayment.gtm_lease_payment').click(function () { $ae('body').data('refocus_element', $ae(this));
setTimeout(function () { AudioEye.focusElement($ae('.lo_modal .lo_close_button')); AudioEye.focusElement($ae('.di-modal-close'));
AudioEye.modals.enableTabLoop('#di-modal .modal-wrap'); }, 1050); }); ele.outerFind('.leasepayment.gtm_finance_payment').click(function () { $ae('body').data('refocus_element', $ae(this));
setTimeout(function () { AudioEye.focusElement($ae('.lo_modal .lo_close_button')); AudioEye.focusElement($ae('.di-modal-close'));
AudioEye.modals.enableTabLoop('#di-modal .modal-wrap'); }, 1050); }); ele.outerFind('.leaseoffer .btn-customize-finance').click(function () { $ae('body').data('refocus_element', $ae(this));
setTimeout(function () { AudioEye.focusElement($ae('.lo_modal .lo_close_button')); AudioEye.focusElement($ae('.di-modal-close'));
AudioEye.modals.enableTabLoop('#di-modal .modal-wrap'); }, 1050); }); ele.outerFind('.leaseoffer .btn-customize-lease').click(function () { $ae('body').data('refocus_element', $ae(this));
setTimeout(function () { AudioEye.focusElement($ae('.lo_modal .lo_close_button')); AudioEye.focusElement($ae('.di-modal-close'));
AudioEye.modals.enableTabLoop('#di-modal .modal-wrap'); }, 1050); }); ele.outerFind('.price-leaseandfinance .price-block.finance').click(function () { $ae('body').data('refocus_element', $ae(this));
setTimeout(function () { AudioEye.focusElement($ae('.lo_modal .lo_close_button')); AudioEye.focusElement($ae('.di-modal-close'));
AudioEye.modals.enableTabLoop('#di-modal .modal-wrap'); }, 1050); }); // redrive focus after closing modal ele.outerFind('.lo_modal .lo_close_button').click(function () { AudioEye.focusElement($ae('body').data('refocus_element')); }); ele.outerFind('.di-modal-close').click(function () { AudioEye.focusElement($ae('body').data('refocus_element')); }); // keyboard events for fake elements ele.outerFind('.lo_substep_paymenttype_option').on('keydown', function (event) { if (event.keyCode === 13 || event.keyCode === 32) { event.preventDefault(); $ae(this)[0].click(); } }); }; f.id = "833541"; f.title = "*DI Master JS #3"; f.type = "javascript";
!function(f){ if (window.AudioEye && window.AudioEye.manualRemediations) { window.AudioEye.manualRemediations.push(f); } }(f); //# sourceURL=https://wsv3cdn.audioeye.com/helpers-remediations/_DI_Master_JS__3.js
var f = function (ele, api) { ele.outerFind('.leaseoffer .btn-customize-finance').on('keydown', function (event) { if (event.keyCode === 13 || event.keyCode === 32) { event.preventDefault(); $ae(this)[0].click(); } }); ele.outerFind('.leaseoffer .btn-customize-lease').on('keydown', function (event) { if (event.keyCode === 13 || event.keyCode === 32) { event.preventDefault(); $ae(this)[0].click(); } }); // add initial slider attributes ele.outerFind('.irs-line').each(function () { set_slider_values($ae(this)); });
// when a slider is arrowed on ele.outerFind('.irs-line').on('keydown', function (event) { var this_reference = $ae(this); var e = jQuery.Event("keydown");
if (event.keyCode === 37 || event.keyCode === 39) { setTimeout(function () { set_slider_values(this_reference);
AudioEye.focusElement(this_reference); }, 250); } else if (event.keyCode === 38) { e.which = 39;
$ae(this).trigger(e); } else if (event.keyCode === 40) { e.which = 37;
$ae(this).trigger(e); } else if (event.keyCode === 35) { var last_value = $ae(event.target).nextAll('.irs-max').eq(0).text().replace(/\D/g, '');
$ae(this_reference).parents('.lo_substep').find('.lo_slider.irs-hidden-input').attr('value', last_value); $ae(this_reference).parents('.lo_substep').find('.single').eq(0).attr('style', 'left: 91.0%;');
setTimeout(function () { set_slider_values($ae(this_reference));
AudioEye.focusElement($ae(this_reference)); }, 250); } else if (event.keyCode === 36) { var first_value = $ae(event.target).nextAll('.irs-min').eq(0).text().replace(/\D/g, '');
$ae(event.target).parents('.lo_substep').find('.lo_slider.irs-hidden-input').attr('value', first_value); $ae(this_reference).parents('.lo_substep').find('.single').eq(0).attr('style', 'left: 0.0%;');
setTimeout(function () { set_slider_values($ae(event.target));
AudioEye.focusElement($ae(event.target)); }, 250); } });
// trying to account for internet explorer if (!!navigator.userAgent.match(/Trident.*rv\:11\./)) { ele.outerFind('.irs-line:first').on('keydown', function (event) { if (event.keyCode === 9 && !event.shiftKey) { setTimeout(function () { AudioEye.focusElement('.irs-line:eq(1)'); }, 250); } }); }
// nearby element attributes api.convertToBtn('.lo_substep_paymenttype_option'); api.convertToBtn('.lo_modal .lo_close_button'); api.convertToBtn('.leaseoffer span[class*="btn-"]'); api.convertToBtn('.lo_restart_button'); api.convertToBtn('.lo_nextstep_button'); ele.outerFind('.lo_nextstep_button').attr({ 'role': 'button', 'tabindex': '0', 'aria-label': 'Next Step' }); ele.outerFind('#lo_payment_information').addClass('ae-mutation-ignore'); ele.outerFind('#lo_downpayment_amount').addClass('ae-mutation-ignore');
ele.outerFind('.leaseoffer.type_finance.customize').removeAttr('role tabindex');
api.addComplianceIndentHidden('#lo_payment_information .lo_running_payment', 'prepend', 'span', 'Payment Information: ');
// update slider attributes function set_slider_values(slider) { slider.attr({ 'role': 'slider', 'aria-valuemin': slider.nextAll('.irs-min').eq(0).text().trim().replace('$', '').replace(',', ''), 'aria-valuenow': slider.nextAll('.irs-single').eq(0).text().trim().replace('$', '').replace(',', ''), 'aria-valuemax': slider.nextAll('.irs-max').eq(0).text().trim().replace('$', '').replace(',', '') });
if (slider.attr('aria-valuenow').indexOf('months') != -1) { slider.attr('aria-valuenow', slider.attr('aria-valuenow').substring(0, slider.attr('aria-valuenow').length - 7)); }
setTimeout(function () { slider.attr('aria-label', slider.parents('.lo_substep').eq(0).find('.lo_prompt').eq(0).text().trim()); }, 50);
set_value_texts(); } $ae('.irs-line').each(function () { $ae(this).attr('aria-valuenow', $ae(this).closest('.slider-facet-container').find('input.our_price-slider').attr('[data-from]') + ' ' + $ae(this).closest('.slider-facet-container').find('.our_price-slider').attr('[data-to]')); }); // set more aria-attributes my dood function set_value_texts() { $ae('.lo_term_slider').find('.irs-line').eq(0).attr('aria-valuetext', $ae('.lo_term_slider').find('.irs-line').eq(0).attr('aria-valuenow') + ' months'); $ae('.lo_downpayment_slider').find('.irs-line').eq(0).attr('aria-valuetext', $ae('.lo_downpayment_slider').find('.irs-line').eq(0).attr('aria-valuenow') + ' percent'); $ae('.lo_credit_slider').find('.irs-line').eq(0).attr('aria-valuetext', $ae('.lo_credit_slider').find('.irs-line').eq(0).attr('aria-valuenow') + ' credit rating'); $ae('.lo_mileage_slider').find('.irs-line').eq(0).attr('aria-valuetext', $ae('.lo_mileage_slider').find('.irs-line').eq(0).attr('aria-valuenow') + ' mileage'); } ele.outerFind('.facet-content-container .our_price-slider').attr('aria-label', 'Price slider '); ele.outerFind('.facet-content-container input[class^="lightning"]').attr('aria-label', 'Monthly payment slider');
$ae('input[data-min]').each(function () { //set it initally var input = $ae(this); var target = $ae(this).parent().find('.irs-line'); target.attr({ 'role': 'slider', 'aria-valuemin': input.attr('data-min'), 'aria-valuemax': input.attr('data-max') }); }); if ($ae('#lvrp-filters-container').length > 0) { $ae('#lvrp-filters-container')[0].addEventListener('DOMNodeInserted', function (e) { //when React re-renders dom do it again $ae('input[data-min]').each(function () { var input = $ae(this); var target = $ae(this).parent().find('.irs-line'); if (!!$ae(this).attr('data-valuenow')) { //this removes attr for now for the sliders withouthem. this condition might need to be changed as i havent seem any with the attr $ae(this).removeAttr('aria-valuenow'); } else { target.attr('aria-valuenow', $ae(this).attr('data-valuenow')); } target.attr({ 'role': 'slider', 'aria-valuemin': input.attr('data-min'), 'aria-valuemax': input.attr('data-max') }); }); }); }
//------------------------------------------
// actionable map overlay ele.outerFind('#saddr').attr({ 'tabindex': '0', 'aria-hidden': 'false' }).removeAttr('role').removeClass('ae-exclude');
// AE - review stars context ele.outerFind('div.rating-5').append(' 5 Stars'); ele.outerFind('div.rating-4').append(' 4 Stars'); ele.outerFind('div.rating-3').append(' 3 Stars'); ele.outerFind('div.rating-2').append(' 2 Stars'); ele.outerFind('div.rating-1').append(' 1 Star');
// checks for already appended text ele.outerFind('span.ae-compliance-indent').each(function () { if ($ae(this).next().hasClass('ae-compliance-indent')) { if ($ae(this).text === $ae(this).next().text) { $ae(this).remove(); } } });
ele.outerFind('a').filter(':contains(Find A Vehicle)').on('keydown', function (event) { if (event.keyCode === 13 || event.keyCode === 32) { event.preventDefault();
$ae(this)[0].click(); } });
// header dealer address link ele.outerFind('.dealer-address a[itemprop="directions"]').removeAttr('role aria-hidden tabindex');
// remove unnecessary attributes on main menu links ele.outerFind('#menu-main-menu a.dropdown-toggle').removeAttr('aria-haspopup');
//////////////////////////////// Results page top filter dropdowns ////////////////////////////////////
// attribute add ele.outerFind('.dropdown-menu.inner a[aria-selected="false"]').attr('aria-checked', 'false'); ele.outerFind('.dropdown-menu.inner a[aria-selected="true"]').attr('aria-checked', 'true'); ele.outerFind('#top-filters .dropdown-toggle').attr('role', 'combobox'); //ele.outerFind('#top-filters .dropdown-menu.open').attr('role', 'presentation');
ele.outerFind('.top-filter .dropdown-toggle').click(function () { $ae('body').data('refocus_element', $ae(this)); $ae(this).parents('.top-filter').find('.dropdown-menu inner a').attr('tabindex', '0'); //$ae(this).removeAttr('aria-expanded'); AudioEye.focusElement($ae(this).parents('.top-filter').find('.dropdown-menu inner a:first')); });
ele.outerFind('.top-filter .dropdown-menu inner a').click(function () { $ae(this).parents('.top-filter').find('.dropdown-menu inner a').attr('tabindex', '-1');
setTimeout(function () { AudioEye.focusElement($ae('body').data('refocus_element')); }, 100); });
//give random id to dropdown menu anchors ele.outerFind('.dropdown-menu.inner a').not('[id]').each(function () { $ae(this).attr('id', 'ae-selected-' + ~~(Math.random() * 1000000)); });
// arrow functionality while on input ele.outerFind('.dropdown-menu.open input:focus').on('keydown', function (e) { var list_length = $ae(this).parent().next().find('li a').length; var last = $ae(this).parent().next().find('li a').filter(':first'); var first = $ae(this).parent().next().find('li a').filter(':last');
if (e.keyCode === 38 || e.keyCode === 37 && list_length === 0) { $ae(this).attr('aria-activedescendant', $ae(this).parent().next().find('li a').filter(':last').attr('id')); } else if (e.keyCode === 40 || e.keyCode === 39 && list_length === 0) { $ae(this).attr('aria-activedescendant', $ae(this).parent().next().find('li a').filter(':first').attr('id')); } //else if (e.keyCode === 40 || e.keyCode === 39) { if (e.keyCode === 38 || e.keyCode === 37 && list_length === 1) { $ae(this).closest('div.dropdown-menu').find('input').attr('aria-activedescendant', $ae(this).parent().next().find('li.active').prev().find('a').attr('id')); } if (e.keyCode === 40 || e.keyCode === 39 && list_length === 1) { $ae(this).closest('div.dropdown-menu').find('input').attr('aria-activedescendant', $ae(this).parent().next().find('li.active').next().find('a').attr('id')); } if (e.keyCode === 40 || e.keyCode === 39 && first) { e.preventDefault(); } if (e.keyCode === 40 || e.keyCode === 39 && last) { e.preventDefault(); }
}); //////////////////////////////// END Results page top filter dropdowns ////////////////////////////////////
// hide tab from chat bubble svg ele.outerFind('.gg-chat-bubble svg, .gg-chat-bubble svg').find('*').attr('tabindex', '-1'); ele.outerFind('.gg-chat-bubble svg').find('*').attr('tabindex', '-1');
// slide out widget vehicle offer/value button context and functionality ele.outerFind('#INTICEOfferImg1').attr({ 'tabindex': '0', 'role': 'button' }); ele.outerFind('#INTICEToolImg1').attr({ 'tabindex': '0', 'role': 'button' });
ele.outerFind('#INTICEOfferImg1').attr('alt', 'Get offer'); ele.outerFind('#INTICEToolImg1').attr('alt', 'Get your car value');
// these svg button conversion api.convertToBtn('#INTICEDmIcon .material-icons[onclick], #INTICELmIcon .material-icons[onclick]');
// context to Get Value/Get Offer buttons in INTICE hover widget ele.outerFind('#INTICELmIcon a.intice-color-pomegranate').filter(':contains(Get Offer)').each(function () { $ae(this).append('' + $ae(this).closest('div').find('p').text().trim() + ''); }); ele.outerFind('#INTICEDmIcon a.intice-color-pomegranate').filter(':contains(Get Value)').each(function () { $ae(this).append('' + $ae(this).closest('div').find('p').text().trim() + ''); });
// FOCUS ele.outerFind('#INTICEOfferImg1').attr({ "onfocus": "javascript: window.inticeIMP.showTabs();" });
// focus to hover content on click of svg buttons ele.outerFind('#INTICEOfferImg1').click(function () { var jim_return = $ae(this); setTimeout(function () { window.inticeIMP.onLMIconsMouseOver(); AudioEye.focusElement('#lmBubble .lm-bubble-close'); AudioEye.modals.enableTabLoop('#lmBubble'); }, 500); $ae('#lmBubble .lm-bubble-close').click(function () { AudioEye.focusElement(jim_return); }); }); ele.outerFind('#INTICEToolImg1').click(function () { var jim_return = $ae(this); setTimeout(function () { window.inticeTT.onTMIconsMouseOver(); AudioEye.focusElement('#tradetoolBubble .tradetool-bubble-close'); AudioEye.modals.enableTabLoop('#tradetoolBubble'); }, 500); $ae('#tradetoolBubble .tradetool-bubble-close').click(function () { AudioEye.focusElement(jim_return); }); }); // get value/get offer button focus to 3rd party iframe ele.outerFind('.lm-bubble a.intice-color-pomegranate').click(function () { setTimeout(function () { AudioEye.modals.enableTabLoop('#lmframe-container'); AudioEye.focusElement('#lmframe-container'); }, 1000); }); ele.outerFind('.tradetool-bubble a.intice-color-pomegranate').click(function () { setTimeout(function () { AudioEye.modals.enableTabLoop('#trademakeriframe'); AudioEye.focusElement('#trademakeriframe'); }, 1000); });
/// quik links accordion fix that has multiple modals that need focus. ele.outerFind('.overlay-container span.close-overlay').attr('tabindex', '0'); ele.outerFind('.quick-link-dropdown > ul.dropdown-menu > li > a').not('[href]').attr('role', 'button'); ele.outerFind('.quick-link-dropdown > ul.dropdown-menu > li > a').on('click', function () { var jim_return = $ae(this); var QUICK_LINKS_BUTTON = $ae('.quick-link-toggle.dropdown-toggle'); var MODAL_CLOSE_BUTTON = $ae('.overlay-container > span.close-overlay'); $ae(MODAL_CLOSE_BUTTON).attr('role', 'button'); ////////////////////////// SEARCH ANYTHING MODAL ////////////////////////// if ($ae(this).attr('target') === 'searchanything') { // this.click(); setTimeout(function () { AudioEye.modals.enableTabLoop('#searchanything-overlay'); AudioEye.focusElement(MODAL_CLOSE_BUTTON); $ae('input#alg-search').on('click', function () { AudioEye.focusElement($ae(MODAL_CLOSE_BUTTON)); AudioEye.focusElement(jim_return); });
}, 1500); } ////////////////////////// VEHICLE SEARCH MODAL //////////////////////////
if ($ae(this).attr('target') === 'vehiclesearch') { setTimeout(function () {
AudioEye.modals.enableTabLoop('#vehiclesearch-overlay > .overlay-container'); AudioEye.focusElement('#vehiclesearch-overlay > .overlay-container > span.close-overlay'); $ae('#vehiclesearch-overlay > .overlay-container > span.close-overlay').on('click', function () { AudioEye.focusElement(jim_return); }, 1000); });
} ////////////////////////// ASK A QUESTION MODAL //////////////////////////
if ($ae(this).attr('target') === 'askquestion') { setTimeout(function () {
AudioEye.modals.enableTabLoop('#askquestion-overlay > .overlay-container'); AudioEye.focusElement('#askquestion-overlay > .overlay-container > span.close-overlay'); $ae('#askquestion-overlay > .overlay-container > span.close-overlay').on('click', function () { AudioEye.focusElement(jim_return); }, 1000); });
} ////////////////////////// SAVED VEHICLES SIDEPANEL //////////////////////////
if ($ae(this).parent().attr('id') === 'save-vehicles-custom-toggle') { setTimeout(function () { AudioEye.modals.enableTabLoop('#save-vehicles-sidr'); AudioEye.focusElement('#save-vehicles-sidr :tabbable:first'); });
}
});
////////////////////////// filter modal checkboxes ////////////////////////// // remove tabpanel role on page div ele.outerFind('#lvrp-container').removeAttr('role');
// convert to button the side panel filter buttons api.convertToBtn('#lvrp-filters-container div.facet-toggle'); ele.outerFind('.quick-facets-container .facet-link.facet-checkbox').not('.facet-refined').attr({ 'tabindex': '0', 'aria-checked': 'false', 'role': 'checkbox' }); ele.outerFind('.quick-facets-container .facet-link.facet-checkbox.facet-refined').attr({ 'tabindex': '0', 'aria-checked': 'true', 'role': 'checkbox' }); ele.outerFind('#di-modal .facet-content-container a.facet-link.facet-disjunctive').not('.facet-refined').attr({ 'aria-checked': 'false', 'role': 'checkbox' }); ele.outerFind('#di-modal .facet-content-container a.facet-link.facet-disjunctive.facet-refined').attr({ 'aria-checked': 'true', 'role': 'checkbox' });
ele.outerFind('#facets-container-modal').on('click', '.facet-content-container[data-collapsed="false"] a.facet-link.facet-disjunctive', function () { setTimeout(function () { $ae('#facets-container-modal .facet-content-container[data-collapsed="false"] a.facet-link.facet-disjunctive.facet-refined').attr({ 'aria-checked': 'true', 'role': 'checkbox' }); }, 6000); });
ele.outerFind('.quick-facets-container').on('click', '.facet-content-container[data-collapsed="false"] a.facet-link.facet-disjunctive', function () { setTimeout(function () { $ae('#facets-container-modal .facet-content-container[data-collapsed="false"] a.facet-link.facet-disjunctive.facet-refined').attr({ 'aria-checked': 'true', 'role': 'checkbox' }); }, 6000); });
ele.outerFind('.facet-toggle .facet-label').attr({ 'tabindex': '-1', 'role': 'presentation' });
// filter modal focus ele.outerFind('.facet-toggle').click(function () { var jim_return = $ae(this); setTimeout(function () { // tab trap AudioEye.modals.enableTabLoop('.vrp-facet-modal.faded-in');
// focus to the close button most of the time AudioEye.focusElement('.vrp-facet-modal.faded-in .di-modal-close'); $ae('.vrp-facet-modal.faded-in .di-modal-close').click(function () { AudioEye.focusElement(jim_return); }); $ae('.facets-container-close.modal-view-results').click(function () { AudioEye.focusElement(jim_return); }); }, 1000);
}); ele.outerFind('.di-modal-close').attr({ 'aria-label': 'close', 'tabindex': '0', 'role': 'button' }); // unfocus svg
ele.outerFind('svg.di-svg').find('*').attr('tabindex', '-1'); ////////////////////////// END filter modal checkboxes //////////////////////////
$ae(".vehicle-price .price-block .single-theme-button").each(function () {
var ae_paymentPrice1 = $ae(this).find('.payment_amount').contents().filter(function () { return this.nodeType === 3; }).text().trim();
$ae(this).attr({ 'aria-label': ae_paymentPrice1 + ' per month', 'role': 'button', 'tabindex': '0' }); // console.log(ae_paymentPrice1); }); ////////////////////////// END AT REMEDIATIONS //////////////////////////
// Chat Module Fixes ele.outerFind('.conversations-cta').attr('role', 'button'); ele.outerFind('.conversations-control-minimize > a').attr({ 'aria-label': 'Minimize', 'role': 'button' }); ele.outerFind('a.conversations-banner-close').attr({ 'aria-label': 'Close Banner', 'role': 'button' });
// radios ele.outerFind('div.conversations-message-body button').attr({ 'role': 'radio', 'aria-selected': 'false' }); var ae_js_radDescrip_ = Math.floor(Math.random() * 1000); ele.outerFind('span.conversations-message-body').not('[id]').each(function () { $ae(this).attr('id', 'ae_js_radDescrip_' + ae_js_radDescrip_); ae_js_radDescrip_++; }); ele.outerFind('div.conversations-message-body button').each(function () { $ae(this).attr({ 'aria-describedby': $ae(this).closest('.conversations-message-content').find('span.conversations-message-body').attr('id') }); });
// chat image alt api.setAlt('.conversations-message-avatar >img', 'Chat Representative Said'); ele.outerFind('.conversations-message-avatar[type="visitor"] svg').attr('aria-label', 'Me'); ele.outerFind('.conversations-message-avatar[type="visitor"] svg').removeAttr('aria-hidden role tabindex'); // required input ele.outerFind('.conversations-composer textarea').attr('aria-required', 'true');
// close alert warning focus ele.outerFind('.conversations-prompt-container').each(function () { var jim_return = $ae(this); setTimeout(function () { AudioEye.focusElement('.conversations-prompt-container .conversations-prompt-title'); //.fancybox-wrap form input:first AudioEye.modals.enableTabLoop('.conversations-prompt-container'); $ae('.conversations-prompt-container .conversations-prompt-control-cancel ').click(function () { AudioEye.focusElement(jim_return); }); }, 1000); }); // hide cta on load of chat widget ele.outerFind('body.ae-launcher .conversations-cta').click(function () { setTimeout(function () { $ae('#ae_app #ae_launcher.ae-active .ae-right').addClass('js_hide-cta'); }, 1000); }); ele.outerFind('.conversations-control-close a').click(function () { var jim_return = $ae(this); setTimeout(function () { AudioEye.focusElement('a.conversations-cta'); $ae('#ae_app #ae_launcher.ae-active .ae-right ').removeClass('js_hide-cta'); }, 1000); });
// close window alert heading level api.setHeadingLevel('.conversations-prompt-container .conversations-prompt-title', '2'); // dynamic messages ele.outerFind('span.conversations-message-body').attr({ 'aria-live': 'assertive', 'role': 'alert' });
// chat survey link context ele.outerFind('.conversations-survey .conversations-survey-value-01').attr('aria-label', 'Not Happy Client'); ele.outerFind('.conversations-survey .conversations-survey-value-03').attr('aria-label', 'Neutral Client'); ele.outerFind('.conversations-survey .conversations-survey-value-05').attr('aria-label', 'Happy Client');
// hide seperator api.hideFromAT('.conversations-survey hr');
////////////////////////// TOOLS BUGS //////////////////////////
////////////////////////// PEM Bugs ////////////////////////// // ele.outerFind('#vdp-share-vehicle-form').attr('aria-label', 'Share Vehicle Form'); // ele.outerFind('.gg-popup.gg-chatbox .gg-form').attr('aria-label', 'Chat Form'); // ele.outerFind('.gg-popup.gg-chatbox .gg-sms .gg-form').attr('aria-label', 'Text Us Form'); // ele.outerFind('.gg-invite form.gg-form').attr('aria-label', 'Online Chat Form');
////////////////////////// END PEM Bugs //////////////////////////
////////////////////////// Reader Bugs ////////////////////////// //append text for visibility in reader ele.outerFind('.close-overlay').append('Close'); ele.outerFind('.gg-chat-close').append('Close'); ele.outerFind('.gg-chat-reply__emoji.gg-show-emoji').append('Pick an emoji'); ele.outerFind('form.getdirections button.search-anything-submit-btn').append('Search Submit'); ele.outerFind('.lo_button.lo_close_button').append('Close');
// ae-exclude from reader
// reader layouttable ele.outerFind('#results-page').attr({ 'data-ae-blurbtype': 'layouttable', 'role': 'presentation' }); // add aria-label to counteract Auto Remediations ele.outerFind('select#service_phone').attr('aria-label', 'service phone'); ele.outerFind('.gg-sms__select').attr('aria-label', 'service phone');
// reader form element labels ele.outerFind('#header form#searchform').removeAttr('role'); ele.outerFind('#header form#searchform').attr('aria-label', 'Search Form'); ele.outerFind('.ginput_container_date select').each(function () { $ae(this).attr('aria-label', $ae(this).find('option:nth-of-type(1)').text().trim()); }); ele.outerFind('#vdp-share-vehicle-form').find('input[type="text"], input[type="email"], input[type="password"], input[type="number"], textarea').each(function () { $ae(this).attr('aria-label', $ae(this).prev('label').text().trim()); }); //chat button context ele.outerFind('.ContactBubble__Icon').append('Text Us'); ele.outerFind('.ContactBubble__CloseSvg').append('Close');
// reader close button context ele.outerFind('.closebutton.disclaimerclose').each(function () { $ae(this).append('' + $ae(this).attr('aria-label') + ''); }); ele.outerFind('.closebutton.disclaimerclose').removeAttr('aria-label');
ele.outerFind('.cn-www-widget button[title="Close"]').append('Close');
////////////////////////// Player Bugs //////////////////////////
ele.outerFind('h1').filter(':contains(Apply for Financing)').next().find('form[action="https://secure.dealerinspire.com/application/submit"]').attr('aria-label', 'Apply for Financing');
// focus to error message ele.outerFind('#myModal').each(function () { AudioEye.focusElement($ae(this)); }); // AE - add click event to anchor checkboxes with the spacebar for player ele.outerFind('.filter-checkbox a').on('keydown', function (e) { if (e.which === 32) { this.click(); } }); // player click event for next step button in modal ele.outerFind('.lo_nextstep_button').on('keydown', function (e) { if (e.which === 32) { this.click(); } }); ele.outerFind('#gform_submit_button_13').on('keydown', function (e) { if (e.which === 32) { this.click(); } }); ele.outerFind('#headertab').on('keydown', function (e) { if (e.which === 32) { this.click(); } }); // AE - Click event for contact service button ele.outerFind('a.primary-button.block').filter(':contains(Contact Service)').click(function () { var jim_return = $ae(this); setTimeout(function () { // tab trap AudioEye.modals.enableTabLoop('#DIModal'); // focus to the close button most of the time AudioEye.focusElement('#DIModal button.close'); $ae('#DIModal button.close').click(function () { AudioEye.focusElement(jim_return); }); }, 1000); });
// AE - add click event for player ele.outerFind('.drivemotors .button-list li').on('keydown', function (e) { if (e.which === 32 || e.which === 13) { this.click(); } }); ele.outerFind('.caoStandardChatOnlyAreaStyle').on('keydown', function (e) { if (e.which === 32 || e.which === 13) { this.click(); } }); ele.outerFind('.nanoModalBtn').on('keydown', function (e) { if (e.which === 32 || e.which === 13) { this.click(); } }); // remove alt text for close button in slider modal to avoid duplicate announcement api.setAlt('.lo_button.lo_close_button img', '');
// player focus on share results link ele.outerFind('.small.im-share-vrp').click(function () { var jim_return = $ae(this); setTimeout(function () { // tab trap AudioEye.modals.enableTabLoop('#vrp-notifications-modal-container'); // focus to the close button most of the time AudioEye.focusElement('#vrp-notifications-modal-container .close'); $ae('#vrp-notifications-modal-container .close').click(function () { AudioEye.focusElement(jim_return); }); }, 1000);
}); // AE - Google translate focus [AEI-37660]
ele.outerFind('a.goog-te-menu-value').attr('data-ae-ignore-keys', 'enter space').click(function () { setTimeout(function () { AudioEye.focusElement($ae('iframe.goog-te-menu-frame.skiptranslate').contents().find('a').first()); }, 350); }).on('keydown', function (e) { if (e.keyCode === 32) { e.preventDefault(); this.click(); } });
ele.outerFind('iframe.goog-te-menu-frame.skiptranslate').contents().find('a').last().on('keydown', function (e) { if (e.keyCode === 9 && !e.shiftKey) { e.preventDefault(); AudioEye.focusElement('a.goog-te-menu-value'); } }).end().first().on('keydown', function (e) { if (e.keyCode === 9 && e.shiftKey) { e.preventDefault(); AudioEye.focusElement('a.goog-te-menu-value'); } }); ele.outerFind('iframe.goog-te-banner-frame.skiptranslate table').attr('data-ae-blurbtype', 'layouttable'); // Accordion state player announcement
// checkbox state announcement for player ele.outerFind('.filter-option a[aria-checked="true"]').data('contents', function () { return 'Checked Option'; });
ele.outerFind('.filter-option a[aria-checked="false"]').data('contents', function () { return 'Unchecked Option'; }); // exclude duplicate announcements from player ele.outerFind('.price-block .price-label.visible-xs').addClass('ae-exclude');
// aria label for chat textarea ele.outerFind('#di-conversations-embed-root textarea').attr('aria-label', 'Chat Edit Text');
ele.outerFind('.conversations-control-close a').attr({ 'role': 'button', 'tabindex': '0', 'aria-label': 'Close' }); // focus for conversations chat popup ele.outerFind('.conversations-cta').click(function () { setTimeout(function () { AudioEye.modals.enableTabLoop('#di-conversations-embed-root'); AudioEye.focusElement('#di-conversations-embed-root .conversations-control-close'); }, 1000); });
// Value your trade input. Resume playback so that player announces chosen suggested ele.outerFind('#ae_app').on('AfterModuleActivate', function (e) { if (e.detail.module === 'player') { $ae('#tradepending-input input').on('keydown', function (event) { if (event.keyCode === 38 || event.keyCode === 40) { AudioEye.player.play(); } }); } }); ele.outerFind('#tradepending-input input').attr('data-ae-ignore-keys', 'enter'); // On Value Your Trade input click, enable tabloop and focus on modal close button ele.outerFind('#tradepending-input input').click(function () { var clkdlink = $ae(this); AudioEye.modals.enableTabLoop('#cboxTPContent'); setTimeout(function () { AudioEye.focusElement('button#cboxTPClose'); AudioEye.player.goToElement('button#cboxTPClose'); }, 1000);
//Handle focus on close button click $ae('button#cboxTPClose').click(function () { setTimeout(function () { AudioEye.focusElement(clkdlink); }, 1000); }); });
ele.outerFind('button#cboxTPClose').on('keydown', function (e) { if (e.keyCode === 9 && !e.shiftKey) { AudioEye.focusElement('#tradepending-dialog input#first_name'); AudioEye.player.goToElement('#tradepending-dialog input#first_name'); } });
////////////////////////// END TOOLS BUGS //////////////////////////
ele.outerFind('img[src*="https://fzlnk.com/pfzurl.ashx?"]').attr('alt', ''); ele.outerFind('img[src*="https://fzlnk.com/HandleSignal.ashx"]').attr('alt', ''); $ae('img[src^="https://fzlnk.com/HandleSignal.ashx?"]'); $ae('img[src*="https://fzlnk.com/pfzurl.ashx?"]'); $ae('img[src^="http://fzlnk.com/HandleSignal.ashx?"]'); $ae('img[src*="http://fzlnk.com/pfzurl.ashx?"]');
ele.outerFind('.contact-primary h4').attr({ 'aria-level': '3', 'role': 'heading' }); api.setPresentation($ae('.resultsCount h4').filter(':contains(vehicles match these filters)'));
ele.outerFind('.caoStandardChatOnlyAreaStyle').click(function () { setTimeout(function () { $ae(this).find('button').each(function () { $ae(this).attr('aria-label', $ae(this).find('img').attr('alt')); }); AudioEye.focusElement('#lpChat'); AudioEye.modals.enableTabLoop('#lpChat .lp_maximized'); }, 4000); });
ele.outerFind('.vehicle .vehicle-image a img').each(function () { $ae(this).attr('alt', $ae(this).closest('.vehicle').find('.vehicle-title').text().trim()); }); api.convertToBtn('.ContactBubble__Bubble ');
// AE - after loader is activated, counteract auto remediations on ul with one or less li, specifically for the top filters in the results pages // after toolbar is activated, set roles on dropdown list elements ele.find("#ae_app").on('AudioEyeReady', function (e) { setTimeout(function () { $ae('.top-filter ul.dropdown-menu.inner').attr('role', 'listbox'); $ae('.top-filter ul.dropdown-menu.inner > li').attr('role', 'option'); }, 50);
});
ele.outerFind('.shopping-icon a.history_report').attr({ 'aria-hidden': 'false', 'role': 'link', 'tabindex': '0' }); ele.outerFind('.shopping-label a.history_report').attr({ 'tabindex': '-1' });
// temp setupModal api function function setupModal(trigger, wrapper, close, label, labelFlag) { // ATTACH MODAL EVENT TO OUR MODAL TRIGGER ele.outerFind(trigger).click(function () { // SET UP OUR VARIABLES var return_target = this;
// RUN CONTENT CHECK / MANAGEMENT IN AN INTERVAL LOOP var modal_interval = window.setInterval(function () {
// MAKE SURE OUR MODAL EXISTS if ($ae(wrapper).length > 0) { window.clearInterval(modal_interval);
// MANAGE MODAL INTERIOR
//PREPARE MODAL ROLE AND LABEL if (labelFlag === 1) { label = $ae(wrapper).outerFind(label).first().text().trim(); } ele.outerFind(wrapper).attr({ 'role': 'dialog', 'aria-modal': 'true', 'aria-label': label });
// ADD RETURN CODE TO CLOSE BUTTON AND ENSURE CLOSE BUTTON ACCESSIBILITY if (!$ae(wrapper).find(close).is('button, input')) { api.convertToBtn(ele.outerFind(wrapper).find(close)); }
if ($ae(wrapper).find(close).text().toLowerCase().trim().length < 5) { $ae(wrapper).find(close).find('img').attr('alt', ''); api.addComplianceIndent(ele.outerFind(wrapper).find(close), 'append', 'span', ' Close'); } ele.outerFind(wrapper).find(close).click(function () { AudioEye.focusElement(return_target); }); // SET OUR FOCUS AND TAB TRAP AudioEye.focusElement($ae(wrapper).find(close)); AudioEye.modals.enableTabLoop(wrapper); //CLEAR INTERVAL if (modal_interval > 10000) { window.clearInterval(modal_interval); } } }, 300); }); }
// powerful style override // after toolbar is activated, resize the window ele.outerFind("#ae_app").on('AfterModuleActivate', function (e) { setTimeout(function () { if (e.detail.module === "toolbar") { $ae('#etsTopButton').attr('style', 'margin: 0px !important; padding: 0px !important; position: fixed !important; z-index: 1000 !important; bottom: 0px !important; right: 0px !important; display: block; margin-right: 16px !important'); } }, 50); });
ele.outerFind('span.ae-compliance-indent').each(function () { if ($ae(this).next().hasClass('ae-compliance-indent')) { if ($ae(this).text === $ae(this).next().text) { $ae(this).remove(); } } });
//AE- New & Used toggle button [AEI-118424] function updateToggleBtn() { ele.outerFind('a.facet-link.toggle-refine').each(function() { if($ae(this).find('.switch-toggle').attr('role') && $ae(this).find('.switch-toggle').attr('role') === 'switch'){ var text = $ae(this).text().trim(); var ae_checked = $ae(this).find('.switch-toggle').attr('aria-checked'); $ae(this).attr({'role': 'switch', 'aria-checked': ae_checked, 'tabindex': 0}); $ae(this).find('.switch-toggle').removeAttr('role aria-checked');
$ae(this).on('keydown', function(e) { if ( e.keyCode == 13 || e.keyCode == 32 ) { e.preventDefault(); this.click(); } }).click(function() { var stopper = 0; var focus_interval = setInterval(function() { if ( ele.outerFind('.switch-toggle[aria-checked]').length > 0) { updateToggleBtn(); ele.outerFind('.toggle-refine').filter(':contains(' + text + ')').attr('ae-toggle-refocus', ''); AudioEye.focusElement($ae('.toggle-refine[ae-toggle-refocus]').eq(0)); clearInterval(focus_interval); } if (stopper > 20) { clearInterval(focus_interval); } stopper++; }, 100); }); } }); } updateToggleBtn();
// AE - MODAL FUNCTION function intModal (trigger, modalClose, modalContainer, activeElement) { ele.outerFind(trigger).attr(api.btn).off('keydown').on('keydown', function(e) { if ( e.keyCode == 13 || e.keyCode == 32 ) { e.preventDefault(); this.click(); } }).off('click').click(function() { $ae('body').data('aeRefocus', this); var stopper = 0; var focus_interval = setInterval(function() { if (ele.outerFind(activeElement).length > 0) {
$ae(modalClose).attr(api.btn).on('keydown', function(e) { if ( e.keyCode == 13 || e.keyCode == 32 ) { e.preventDefault(); this.click(); } }).off('click').on('click', function(e) { setTimeout(function() { var refocus = $ae('body').data('ae-refocus'); AudioEye.focusElement(refocus); }, 500); });
AudioEye.focusElement(modalClose); AudioEye.modals.enableTabLoop(modalContainer); clearInterval(focus_interval); } clearInterval(focus_interval);
stopper++; }, 100); }); } //intModal(trigger, modalClose, modalContainer, activeElement)
// MAS-758 intModal('.vehicle a.fancy.cta-button', 'a.fancybox-close', '.fancybox-wrap', 'a.fancybox-close'); }; f.id = "833540"; f.title = "*DI Master JS #4"; f.type = "javascript";
!function(f){ if (window.AudioEye && window.AudioEye.manualRemediations) { window.AudioEye.manualRemediations.push(f); } }(f); //# sourceURL=https://wsv3cdn.audioeye.com/helpers-remediations/_DI_Master_JS__4.js
AudioEye.smartRemediations = []; AudioEye.autoSmartRemediations = [{"id":"4197232","type":"addFrameTitles","params":null,"parent_id":"14924","smart_remediation_number":"8762"},{"id":"4197226","type":"setDocLang","params":null,"parent_id":"14916","smart_remediation_number":"8746"},{"id":"4197242","type":"addNewWindowWarnings","params":null,"parent_id":"14926","smart_remediation_number":"8766"},{"id":"4197297","type":"addDownloadableDocumentWarnings","params":null,"parent_id":"167938","smart_remediation_number":"20621"},{"id":"4197278","type":"addFormLabels","params":null,"parent_id":"14918","smart_remediation_number":"8750"},{"id":"4197238","type":"hideEmptyHeaders","params":null,"parent_id":"14922","smart_remediation_number":"8758"},{"id":"4197267","type":"addLinkText","params":null,"parent_id":"14921","smart_remediation_number":"8756"},{"id":"4197258","type":"removeLinkRedundancies","params":null,"parent_id":"14925","smart_remediation_number":"8764"},{"id":"4197270","type":"automaticSingleListItem","params":null,"parent_id":"14927","smart_remediation_number":"8768"},{"id":"4197225","type":"addSmartAltText","params":null,"parent_id":"14923","smart_remediation_number":"8760"},{"id":"4197236","type":"makeLinkImgAltDecorative","params":null,"parent_id":"14920","smart_remediation_number":"8754"},{"id":"4197287","type":"automaticNestedLayoutTable","params":null,"parent_id":"14917","smart_remediation_number":"8748"},{"id":"4197290","type":"addFormRequiredAriaLabel","params":null,"parent_id":"14919","smart_remediation_number":"8752"}];