]> git.ipfire.org Git - thirdparty/foundation/foundation-sites.git/commitdiff
fix: relocate menu aria attrs
authorJoe Workman <joe@workmanmail.com>
Thu, 26 Aug 2021 20:58:08 +0000 (13:58 -0700)
committerJoe Workman <joe@workmanmail.com>
Thu, 26 Aug 2021 21:25:42 +0000 (14:25 -0700)
closes #12087

js/foundation.util.nest.js
test/javascript/components/drilldown.js

index 661c92d791068b920cc67ccd22c068dc2a4e4826..df86d8f325786d1c75e10302a942a7b3ad93d6c5 100644 (file)
@@ -20,7 +20,7 @@ const Nest = {
       if ($sub.length) {
         $item.addClass(hasSubClass);
         if(applyAria) {
-          $item.attr({
+          $item.children('a:first').attr({
             'aria-haspopup': true,
             'aria-label': $item.children('a:first').text()
           });
index a33c77dbc63a5e6b8ac6b461d5f3850333c5ca1f..06c98271ec9c85fe740215736a09a529b5e5c7d9 100644 (file)
@@ -77,9 +77,9 @@ describe('Drilldown Menu', function() {
       });
 
       plugin.$element.find('.is-drilldown-submenu-parent').each(function() {
-        $(this).should.have.attr('aria-haspopup', 'true');
         $(this).should.have.attr('aria-expanded', 'false');
-        $(this).should.have.attr('aria-label', $(this).children('a').first().text());
+        $(this).children('a').first().should.have.attr('aria-haspopup', 'true');
+        $(this).children('a').first().should.have.attr('aria-label', $(this).children('a').first().text());
       });
 
     });