Skip to content

Commit

Permalink
VACMS-16062, 16063 Accessibility fixes for VAMC Staff Profile pages (#…
Browse files Browse the repository at this point in the history
…2172)

* VACMS-16062 Add aria label to side nav on staff profile pages

* VACMS-16063 Fix empty ul element
  • Loading branch information
randimays authored Jul 12, 2024
1 parent 4fa4e1c commit 2b1ee65
Showing 1 changed file with 29 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,13 @@
For an example of how to make a string look like this, look at in `src/site/layouts/person_profile.drupal.liquid` where sidebarData is being assigned.
{% endcomment %}

<nav data-template="navigation/facility_no_drupal_page_sidebar_nav" id="va-detailpage-sidebar" data-drupal-sidebar
class="va-c-facility-sidebar usa-width-one-fourth va-sidebarnav">
<nav
aria-label="Secondary"
data-template="navigation/facility_no_drupal_page_sidebar_nav"
id="va-detailpage-sidebar"
data-drupal-sidebar
class="va-c-facility-sidebar usa-width-one-fourth va-sidebarnav"
>
<div>
<button class="va-btn-close-icon va-sidebarnav-close" type="button" aria-label="Close this menu"></button>

Expand All @@ -23,25 +28,27 @@
<a href="{{ deepLinksObj.parent.url.path }}">{{ deepLinksObj.parent.label }}</a>
</div>

<ul class="usa-sidenav-list">
{% for link in deepLinks %}
<li {% if entityUrl.path == link.url.path %} class="active-level" {% endif %}>
<a {% if entityUrl.path == link.url.path %} class="usa-current" {% endif %}
href="{{ link.url.path }}" onClick="recordEvent({ event: 'nav-sidenav' });">{{ link.label }}</a>
{% if link.links.length %}
<ul class="usa-sidenav-sub_list">
{% for link in link.links %}
<li>
<a {% if entityUrl.path == link.url.path %} class="usa-current" {% endif %}
href="{{ link.url.path }}" onClick="recordEvent({ event: 'nav-sidenav' });">{{ link.label }}</a>
</li>
{% endfor %}
</ul>
</li>
{% else %}
</li>
{% endif %}
{% endfor %}
</ul>
{% if deepLinks.length %}
<ul class="usa-sidenav-list">
{% for link in deepLinks %}
<li {% if entityUrl.path == link.url.path %} class="active-level" {% endif %}>
<a {% if entityUrl.path == link.url.path %} class="usa-current" {% endif %}
href="{{ link.url.path }}" onClick="recordEvent({ event: 'nav-sidenav' });">{{ link.label }}</a>
{% if link.links.length %}
<ul class="usa-sidenav-sub_list">
{% for link in link.links %}
<li>
<a {% if entityUrl.path == link.url.path %} class="usa-current" {% endif %}
href="{{ link.url.path }}" onClick="recordEvent({ event: 'nav-sidenav' });">{{ link.label }}</a>
</li>
{% endfor %}
</ul>
</li>
{% else %}
</li>
{% endif %}
{% endfor %}
</ul>
{% endif %}
</div>
</nav>

0 comments on commit 2b1ee65

Please sign in to comment.