Skip to main content

Teaser Markdown Accessibility Error Fix / No Click teaser accessibility error fix

Code from STPUD 

<!-- Disable Resources and Online Resources header links -->
<script>
// Wait for the DOM to load
document.addEventListener('DOMContentLoaded', function() {
  // Select the h3 links for Resources and Online Resources
  const h3Links = document.querySelectorAll('.poc-instance .inner > a[href="/resources"], .poc-instance .inner > a[href="/online-resources"]');
  // Loop through the selected h3 links and remove the href attribute
  h3Links.forEach(function(link) {
    link.removeAttribute('href');
  });
});
</script>

<!-- Bandaid solution to remove empty Online Resources link -->
<script>
document.addEventListener('DOMContentLoaded', function() {
  // Path to the fake teaser link goes here
  const emptyLink = document.querySelector('.poc-instance .inner > p.teaser > a[href="/online-resources"]');
  if (emptyLink) {
    emptyLink.remove();
  }
});
</script>