Skip to content

Commit

Permalink
Fix language toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewmascord committed Apr 22, 2020
1 parent 551e677 commit 11110d1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/components/language-select/template.njk
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
lang="cy"
rel="alternate"
class="govuk-link"
data-journey-click="link - click:lang-select:English">
data-journey-click="link - click:lang-select:Cymraeg">
<span class="govuk-visually-hidden">Newid yr iaith ir Gymraeg</span>
<span aria-hidden="true">Cymraeg</span>
</a>
Expand All @@ -28,7 +28,7 @@
lang="en"
rel="alternate"
class="govuk-link"
data-journey-click="link - click:lang-select:Cymraeg">
data-journey-click="link - click:lang-select:English">
<span class="govuk-visually-hidden">Change the language to English</span>
<span aria-hidden="true">English</span>
</a>
Expand Down
4 changes: 2 additions & 2 deletions src/components/language-select/template.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe('New Tab Link', () => {
expect($component.attr('hreflang')).toEqual('cy')
expect($component.attr('lang')).toEqual('cy')
expect($component.attr('href')).toEqual(examples.default.cy.href)
expect($component.data('journeyClick')).toEqual('link - click:lang-select:English')
expect($component.data('journeyClick')).toEqual('link - click:lang-select:Cymraeg')

expect($component.find('.govuk-visually-hidden').eq(0).text()).toEqual('Newid yr iaith ir Gymraeg')
expect($component.find('[aria-hidden="true"]').eq(0).text()).toEqual('Cymraeg')
Expand All @@ -44,7 +44,7 @@ describe('New Tab Link', () => {
expect($component.attr('hreflang')).toEqual('en')
expect($component.attr('lang')).toEqual('en')
expect($component.attr('href')).toEqual(examples.welsh.en.href)
expect($component.data('journeyClick')).toEqual('link - click:lang-select:Cymraeg')
expect($component.data('journeyClick')).toEqual('link - click:lang-select:English')

expect($component.find('.govuk-visually-hidden').eq(0).text()).toEqual('Change the language to English')
expect($component.find('[aria-hidden="true"]').eq(0).text()).toEqual('English')
Expand Down

0 comments on commit 11110d1

Please sign in to comment.