Skip to content

Commit

Permalink
Update action elements to be buttons instead of links
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Gan committed Oct 21, 2024
1 parent 271af58 commit 6bcb661
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<a class="back-link" data-subnav-back>
<button class="button back-link" role="link" tabindex="0" data-subnav-back>
<svg class="back-link__icon" width="12" height="8" aria-hidden="true"><use xlink:href="#arrow"></use></svg>
<span class="back-link__text">Back</span>
</a>
</button>
4 changes: 2 additions & 2 deletions rca/project_styleguide/templates/patterns/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@
<nav class="app__navigation" data-nav-container>
{% include "patterns/atoms/grid-lines/grid-lines.html" %}
<div class="header__menus">
{% cache 3600 "primarynav" settings.navigation.NavigationSettings.last_updated_at %}
{% comment %} {% cache 3600 "primarynav" settings.navigation.NavigationSettings.last_updated_at %} {% endcomment %}
{% primarynav %}
{% endcache %}
{% comment %} {% endcache %} {% endcomment %}
</div>
</nav>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
<a data-modal-open>Open video</a>
{% endif %}
<div data-modal-window class="video-modal" aria-live="polite">
<a data-modal-close class="video-modal__close">
<button data-modal-close class="button video-modal__close">
<svg class="video-modal__close-icon" width="20" height="20"><use xlink:href="#close"></use></svg>
</a>
</button>
<div class="video-modal__container">
<div style="padding-bottom: 56.25%" class="responsive-object">
{% embed video %}
Expand Down
6 changes: 5 additions & 1 deletion rca/static_src/sass/components/_back-link.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
display: flex;
pointer-events: none;

&:focus {
outline: 2px solid $color--focus;
}

@include media-query(medium) {
margin-top: ($gutter * 3.25);
}
Expand All @@ -31,7 +35,7 @@
}
}

&:hover {
&:hover, &:focus {
span {
&::after {
width: 100%;
Expand Down
4 changes: 4 additions & 0 deletions rca/static_src/sass/components/_video-modal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@
top: 20px;
right: 20px;

&:focus {
outline: 2px solid $color--focus;
}

.is-open & {
pointer-events: all;
}
Expand Down

0 comments on commit 6bcb661

Please sign in to comment.