summaryrefslogtreecommitdiffstats
path: root/hugolib/embedded_shortcodes_test.go
diff options
context:
space:
mode:
authorNic Raboy <nraboy@users.noreply.github.com>2017-08-11 15:36:40 -0700
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2017-08-12 00:36:40 +0200
commit919bc9210a69c801c7304c0b529df93d1dca27aa (patch)
treee9b05c65f5ff99e41169c4b208325ee2dae235b5 /hugolib/embedded_shortcodes_test.go
parent07f6e1499c8e58f9bff0b0e802f44433abdc249b (diff)
Add an iFrame title to the YouTube shortcode
To accommodate modern web accessibility as outlined here https://dequeuniversity.com/tips/provide-iframe-titles
Diffstat (limited to 'hugolib/embedded_shortcodes_test.go')
-rw-r--r--hugolib/embedded_shortcodes_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/hugolib/embedded_shortcodes_test.go b/hugolib/embedded_shortcodes_test.go
index 6f47f98c3..1c861dc90 100644
--- a/hugolib/embedded_shortcodes_test.go
+++ b/hugolib/embedded_shortcodes_test.go
@@ -202,17 +202,17 @@ func TestShortcodeYoutube(t *testing.T) {
}{
{
`{{< youtube w7Ft2ymGmfc >}}`,
- "(?s)\n<div style=\".*?\">.*?<iframe src=\"//www.youtube.com/embed/w7Ft2ymGmfc\" style=\".*?\" allowfullscreen frameborder=\"0\">.*?</iframe>.*?</div>\n",
+ "(?s)\n<div style=\".*?\">.*?<iframe src=\"//www.youtube.com/embed/w7Ft2ymGmfc\" style=\".*?\" allowfullscreen frameborder=\"0\" title=\"YouTube Video\">.*?</iframe>.*?</div>\n",
},
// set class
{
`{{< youtube w7Ft2ymGmfc video>}}`,
- "(?s)\n<div class=\"video\">.*?<iframe src=\"//www.youtube.com/embed/w7Ft2ymGmfc\" allowfullscreen frameborder=\"0\">.*?</iframe>.*?</div>\n",
+ "(?s)\n<div class=\"video\">.*?<iframe src=\"//www.youtube.com/embed/w7Ft2ymGmfc\" allowfullscreen frameborder=\"0\" title=\"YouTube Video\">.*?</iframe>.*?</div>\n",
},
// set class and autoplay (using named params)
{
`{{< youtube id="w7Ft2ymGmfc" class="video" autoplay="true" >}}`,
- "(?s)\n<div class=\"video\">.*?<iframe src=\"//www.youtube.com/embed/w7Ft2ymGmfc\\?autoplay=1\".*?allowfullscreen frameborder=\"0\">.*?</iframe>.*?</div>",
+ "(?s)\n<div class=\"video\">.*?<iframe src=\"//www.youtube.com/embed/w7Ft2ymGmfc\\?autoplay=1\".*?allowfullscreen frameborder=\"0\" title=\"YouTube Video\">.*?</iframe>.*?</div>",
},
} {
var (