{%- assign currVersion = version.docs | valueIfEmpty: site.version.docs -%}
<div class="dropdown">
  <a href="#" role="button" class="nav-link pe-0" data-cfw="dropdown">
    v{{ version.current | valueIfEmpty: site.version.current }}
    <span class="caret" aria-hidden="true"></span>
  </a>
  <ul class="dropdown-menu position-absolute">
{%- for group in versions %}
    <li class="dropdown-header">{{ group.set}}</li>
    {%- for subver in group.versions -%}
    {% assign isActive = '' %}
    {%- if subver.path == currVersion %}
    {% assign isActive = ' class="active" aria-current="true"' %}
    {% endif -%}
    <li><a href="{{ site.path }}/{{ subver.path }}/"{{ isActive }}>{{ subver.ver}}</a></li>
    {% endfor -%}
    {%- if forloop.last != true %}
    <li class="dropdown-divider"></li>
    {% endif -%}
{% endfor -%}
  </ul>
</div>
{%- assign currVersion = version.docs | valueIfEmpty: site.version.docs -%}
<div class="dropdown">
  <a href="#" role="button" class="nav-link pe-0" data-cfw="dropdown">
    <span class="sr-only">Figuration</span>
    v{{ version.current | valueIfEmpty: site.version.current }}
    <span class="sr-only">(switch to other versions)</span>
    <span class="caret" aria-hidden="true"></span>
  </a>
  <ul class="dropdown-menu position-absolute">
{%- for group in versions %}
    <li class="dropdown-header">{{ group.set}}</li>
    {%- for subver in group.versions -%}
    {% assign isActive = '' %}
    {%- if subver.path == currVersion %}
    {% assign isActive = ' class="active" aria-current="true"' %}
    {% endif -%}
    <li><a href="{{ site.path }}/{{ subver.path }}/"{{ isActive }}>{{ subver.ver}}</a></li>
    {% endfor -%}
    {%- if forloop.last != true %}
    <li class="dropdown-divider"></li>
    {% endif -%}
{% endfor -%}
  </ul>
</div>
Improve a11y of docs version selector
Improve a11y of docs version selector
