HubSpot / cms-theme-boilerplate

A straight-forward starting point for building a great website on the HubSpot CMS
https://boilerplate.hubspotcms.com
Other
355 stars 355 forks source link

Accessibility Bug: menu module does not account for empty "links" #377

Closed johnsfuller closed 3 years ago

johnsfuller commented 3 years ago

The HubSpot navigation UI in settings > website > navigation provides an option for an "item without a link".

In this situation, the anchor tag prints without a valid href attribute.

There should be some sort of a conditional on the element to make it a faux link. Ex:

{% if link.href %}
  <a class="menu__link" href="{{ link.href }}">
{% else %}
  <span class="menu__link">
{% endif %}