Skip to content

Commit

Permalink
D8CORE-2536: adding aria-label (#716)
Browse files Browse the repository at this point in the history
* D8CORE-2536: adding aria-label

* fixup

* D8CORE-2536: adding external link template

* D8CORE-2536: Added external_link_text variable for easier maintenance

* fixup

* D8CORE-2536: need to hide it visually

* D8CORE-2536: use SASS for styling the external link

* D8CORE-2536: update to extternal links solution

* Update core/src/templates/components/global-footer/global-footer.twig

* Update core/src/templates/components/global-footer/global-footer.twig

* fixup

* fixup

Co-authored-by: Sherakama <[email protected]>
  • Loading branch information
cjwest and sherakama authored Sep 17, 2020
1 parent 433786f commit 2aa311e
Showing 3 changed files with 20 additions and 12 deletions.
2 changes: 1 addition & 1 deletion core/dist/css/decanter.css

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions core/src/scss/components/global-footer/_global-footer.scss
Original file line number Diff line number Diff line change
@@ -93,6 +93,9 @@
flex-grow: 1;
}

.su-global-footer__link-a11y {
@include hide-visually;
}

.su-global-footer__menu {
@include margin(0 0 1rem);
27 changes: 16 additions & 11 deletions core/src/templates/components/global-footer/global-footer.twig
Original file line number Diff line number Diff line change
@@ -11,33 +11,38 @@
{% if template_path_logo is empty -%}
{%- set template_path_logo = "@decanter/components/logo/logo.twig" -%}
{%- endif %}
{% if external_link_text is empty -%}
{%- set external_link_text -%}
<span class="su-global-footer__link-a11y">(link is external)</span>
{% endset %}
{%- endif %}

<div class="su-global-footer {{ modifier_class }}">
<div class="su-global-footer__container">
<div class="su-global-footer__container" title="Common Stanford resources">
<div class="su-global-footer__brand">
{%- include template_path_logo -%}
</div>
<div class="su-global-footer__content">
<nav aria-label="global footer menu">
<ul class="su-global-footer__menu su-global-footer__menu--global">
<li><a href="https://www.stanford.edu">Stanford Home</a></li>
<li><a href="https://visit.stanford.edu/plan/">Maps &amp; Directions</a></li>
<li><a href="https://www.stanford.edu/search/">Search Stanford</a></li>
<li><a href="https://emergency.stanford.edu">Emergency Info</a></li>
<li><a href="https://www.stanford.edu">Stanford Home{{ external_link_text }}</a></li>
<li><a href="https://visit.stanford.edu/plan/">Maps &amp; Directions{{ external_link_text }}</a></li>
<li><a href="https://www.stanford.edu/search/">Search Stanford{{ external_link_text }}</a></li>
<li><a href="https://emergency.stanford.edu">Emergency Info{{ external_link_text }}</a></li>
</ul>
<ul class="su-global-footer__menu su-global-footer__menu--policy">
<li><a href="https://www.stanford.edu/site/terms/"
title="Terms of use for sites">Terms of Use</a></li>
title="Terms of use for sites">Terms of Use{{ external_link_text }}</a></li>
<li><a href="https://www.stanford.edu/site/privacy/"
title="Privacy and cookie policy">Privacy</a></li>
title="Privacy and cookie policy">Privacy{{ external_link_text }}</a></li>
<li><a href="https://uit.stanford.edu/security/copyright-infringement"
title="Report alleged copyright infringement">Copyright</a></li>
title="Report alleged copyright infringement">Copyright{{ external_link_text }}</a></li>
<li><a href="https://adminguide.stanford.edu/chapter-1/subchapter-5/policy-1-5-4"
title="Ownership and use of Stanford trademarks and images">Trademarks</a></li>
title="Ownership and use of Stanford trademarks and images">Trademarks{{ external_link_text }}</a></li>
<li><a href="http://exploredegrees.stanford.edu/nonacademicregulations/nondiscrimination/"
title="Non-discrimination policy">Non-Discrimination</a></li>
title="Non-discrimination policy">Non-Discrimination{{ external_link_text }}</a></li>
<li><a href="https://www.stanford.edu/site/accessibility"
title="Report web accessibility issues">Accessibility</a></li>
title="Report web accessibility issues">Accessibility{{ external_link_text }}</a></li>
</ul>
</nav>
<div class="su-global-footer__copyright">

0 comments on commit 2aa311e

Please sign in to comment.