Skip to content

Commit

Permalink
Set tabindex for the main element
Browse files Browse the repository at this point in the history
Chromium bug: Skip links do not work when using screenreader.
https://bugs.chromium.org/p/chromium/issues/detail?id=37721

Once the page has loaded, press tab to navigate the page.
Tab to a skip link and press enter.

Adding tabindex="-1" to the destination element fixes this.
  • Loading branch information
gemmaleigh committed May 9, 2016
1 parent 37a93c7 commit 09f2e28
Show file tree
Hide file tree
Showing 19 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion views/examples/example_date.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{{$pageTitle}}Example: Date Form elements GOV.UK elements{{/pageTitle}}

{{$content}}
<main id="content" role="main">
<main id="content" role="main" tabindex="-1">

{{>breadcrumb}}

Expand Down
2 changes: 1 addition & 1 deletion views/examples/example_details_summary.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{{$pageTitle}}Example: Details summary Typography GOV.UK elements{{/pageTitle}}

{{$content}}
<main id="content" role="main">
<main id="content" role="main" tabindex="-1">

{{>breadcrumb}}

Expand Down
2 changes: 1 addition & 1 deletion views/examples/example_form_elements.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{{$pageTitle}}Example: Form elements Form elements GOV.UK elements{{/pageTitle}}

{{$content}}
<main id="content" role="main">
<main id="content" role="main" tabindex="-1">

{{>breadcrumb}}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{{$pageTitle}}Example: Form validation Errors GOV.UK elements{{/pageTitle}}

{{$content}}
<main class="js-error-example" id="content" role="main">
<main class="js-error-example" id="content" role="main" tabindex="-1">

{{>breadcrumb}}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{{$pageTitle}}Example: Form validation Errors GOV.UK elements{{/pageTitle}}

{{$content}}
<main class="js-error-example" id="content" role="main">
<main class="js-error-example" id="content" role="main" tabindex="-1">

{{>breadcrumb}}

Expand Down
2 changes: 1 addition & 1 deletion views/examples/example_grid_layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{{$pageTitle}}Example: Grid layout Layout GOV.UK elements{{/pageTitle}}

{{$content}}
<main id="content" role="main">
<main id="content" role="main" tabindex="-1">

{{>breadcrumb}}

Expand Down
2 changes: 1 addition & 1 deletion views/examples/example_icons.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{{$pageTitle}}Example: Icons Icons and images GOV.UK elements{{/pageTitle}}

{{$content}}
<main id="content" role="main">
<main id="content" role="main" tabindex="-1">

{{>breadcrumb}}

Expand Down
2 changes: 1 addition & 1 deletion views/examples/example_radios_checkboxes.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{{$pageTitle}}Example: Radio buttons and checkboxes Form elements GOV.UK elements{{/pageTitle}}

{{$content}}
<main id="content" role="main">
<main id="content" role="main" tabindex="-1">

{{>breadcrumb}}

Expand Down
2 changes: 1 addition & 1 deletion views/examples/example_typography.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{{$pageTitle}}Example: Typography Typography GOV.UK elements{{/pageTitle}}

{{$content}}
<main id="content" role="main">
<main id="content" role="main" tabindex="-1">

{{>breadcrumb}}

Expand Down
2 changes: 1 addition & 1 deletion views/guide_alpha_beta.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

{{$content}}

<main id="content" role="main">
<main id="content" role="main" tabindex="-1">

{{>phase_banner}}
{{>breadcrumb}}
Expand Down
2 changes: 1 addition & 1 deletion views/guide_buttons.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

{{$content}}

<main id="content" role="main">
<main id="content" role="main" tabindex="-1">

{{>phase_banner}}
{{>breadcrumb}}
Expand Down
2 changes: 1 addition & 1 deletion views/guide_colour.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

{{$content}}

<main id="content" role="main">
<main id="content" role="main" tabindex="-1">

{{>phase_banner}}
{{>breadcrumb}}
Expand Down
2 changes: 1 addition & 1 deletion views/guide_data.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

{{$content}}

<main id="content" role="main">
<main id="content" role="main" tabindex="-1">

{{>phase_banner}}
{{>breadcrumb}}
Expand Down
2 changes: 1 addition & 1 deletion views/guide_errors.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

{{$content}}

<main id="content" role="main">
<main id="content" role="main" tabindex="-1">

{{>phase_banner}}
{{>breadcrumb}}
Expand Down
2 changes: 1 addition & 1 deletion views/guide_form_elements.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

{{$content}}

<main id="content" role="main">
<main id="content" role="main" tabindex="-1">

{{>phase_banner}}
{{>breadcrumb}}
Expand Down
2 changes: 1 addition & 1 deletion views/guide_icons_images.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

{{$content}}

<main id="content" role="main">
<main id="content" role="main" tabindex="-1">

{{>phase_banner}}
{{>breadcrumb}}
Expand Down
2 changes: 1 addition & 1 deletion views/guide_layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

{{$content}}

<main id="content" role="main">
<main id="content" role="main" tabindex="-1">

{{>phase_banner}}
{{>breadcrumb}}
Expand Down
2 changes: 1 addition & 1 deletion views/guide_typography.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

{{$content}}

<main id="content" role="main">
<main id="content" role="main" tabindex="-1">

{{>phase_banner}}
{{>breadcrumb}}
Expand Down
2 changes: 1 addition & 1 deletion views/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

{{$content}}

<main class="elements-index" id="content" role="main">
<main class="elements-index" id="content" role="main" tabindex="-1">

{{>phase_banner}}
{{>breadcrumb}}
Expand Down

0 comments on commit 09f2e28

Please sign in to comment.