Skip to content

Commit

Permalink
Make sure invisible buttons can't be focused by keyboard (#775)
Browse files Browse the repository at this point in the history
  • Loading branch information
gunndabad authored Jan 4, 2024
1 parent 7ae59c3 commit a6677c9
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</govuk-input>

@* Pressing the Enter key will submit the first submit button - make sure it's the default action *@
<button type="submit" class="govuk-!-display-none"></button>
<button type="submit" class="govuk-!-display-none" tabindex="-1"></button>

<govuk-details>
<govuk-details-summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
label-class="govuk-label--s" />

@* Pressing the Enter key will submit the first submit button - make sure it's the default action *@
<button type="submit" class="govuk-!-display-none"></button>
<button type="submit" class="govuk-!-display-none" tabindex="-1"></button>

<govuk-details>
<govuk-details-summary>I do not have access to a mobile phone</govuk-details-summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
label-class="govuk-label--s" />

@* Pressing the Enter key will submit the first submit button - make sure it's the default action *@
<button type="submit" class="govuk-!-display-none"></button>
<button type="submit" class="govuk-!-display-none" tabindex="-1"></button>

<govuk-details>
<govuk-details-summary>I have not received a code</govuk-details-summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
label-class="govuk-label--s"/>

@* Pressing the Enter key will submit the first submit button - make sure it's the default action *@
<button type="submit" class="govuk-!-display-none"></button>
<button type="submit" class="govuk-!-display-none" tabindex="-1"></button>

@if (Model.ShowContinueWithoutTrnButton)
{
Expand Down

0 comments on commit a6677c9

Please sign in to comment.