You can see this on this test page in the sidebar. Here's the code in that Radius snippet:
<p>Sub menu (no sub pages / empty ul):</p>
<r:sub_menu ul_class="sub-menu" />
<p>Ancestor Menu (empty ul)</p>
<r:ancestor_menu ul_class="ancestor-menu" start_depth="6" max_depth="1" />
Results
r:sub_menu and r:ancestor_menu output empty <ul>'s when no pages are returned. Here's the markup from the test page above:
<p>Sub menu (no sub pages / empty ul):</p>
<ul class="sub-menu"></ul>
<p>Ancestor Menu</p>
<ul class="ancestor-menu"></ul>
Expected results
If a sub_menu or ancestor_menu is called and returns zero pages, the <ul> should not be output into the DOM.
Expected markup:
<p>Sub menu (no sub pages / empty ul):</p>
<p>Ancestor Menu</p>
Siteimprove NextGen Accessibility flags this as an issue and will 1) get flagged in their UI as such and 2) subtract points from the overall accessibility score. You can see the issue for yourself by downloading one of the Siteimprove Accessibility Browser Extensions and running it on the test page.
Steps to reproduce the issue
You can see this on this test page in the sidebar. Here's the code in that Radius snippet:
Results
r:sub_menu
andr:ancestor_menu
output empty<ul>
's when no pages are returned. Here's the markup from the test page above:Expected results
If a
sub_menu
orancestor_menu
is called and returns zero pages, the<ul>
should not be output into the DOM.Expected markup:
Siteimprove NextGen Accessibility flags this as an issue and will 1) get flagged in their UI as such and 2) subtract points from the overall accessibility score. You can see the issue for yourself by downloading one of the Siteimprove Accessibility Browser Extensions and running it on the test page.