diff options
author | rhymes <github@rhymes.dev> | 2021-07-15 17:48:39 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-15 17:48:39 +0300 |
commit | f27e542442d19436f1428cc22bb03aca398d37a7 (patch) | |
tree | 9f3b53dc99405d4bcd4957a4ada4bd0077d5818c /hugolib/embedded_shortcodes_test.go | |
parent | ae6cf93c84c3584b111f4b9fa3fb4e3f63d37915 (diff) |
markup: Add tabindex="0" to default <pre> wrapper
Currently the generated `<pre>` element isn't fully accessible as it can't be focused by keyboard users.
To make this fully accessible, the attribute `tabindex="0"` should be added to the `<pre>` tag.
Closes #7194
Diffstat (limited to 'hugolib/embedded_shortcodes_test.go')
-rw-r--r-- | hugolib/embedded_shortcodes_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/hugolib/embedded_shortcodes_test.go b/hugolib/embedded_shortcodes_test.go index 9fb25e22a..53ad2fe8e 100644 --- a/hugolib/embedded_shortcodes_test.go +++ b/hugolib/embedded_shortcodes_test.go @@ -89,13 +89,13 @@ func TestShortcodeHighlight(t *testing.T) { `{{< highlight java >}} void do(); {{< /highlight >}}`, - `(?s)<div class="highlight"><pre style="background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-java"`, + `(?s)<div class="highlight"><pre tabindex="0" style="background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-java"`, }, { `{{< highlight java "style=friendly" >}} void do(); {{< /highlight >}}`, - `(?s)<div class="highlight"><pre style="background-color:#f0f0f0;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-java" data-lang="java">`, + `(?s)<div class="highlight"><pre tabindex="0" style="background-color:#f0f0f0;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-java" data-lang="java">`, }, } { |