Skip to content

Commit

Permalink
adapted accessible footnotes test to add role=doc-noteref - it looks …
Browse files Browse the repository at this point in the history
…like Kramdown's output required the test to include role=doc-noteref to validate accessible HTML
  • Loading branch information
sarahcrack committed Jan 20, 2025
1 parent a4e8644 commit e071d7b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spec/requests/accessible_footnotes_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
subject { response.body }

it "makes footnotes accessible" do
is_expected.to include(%(<a href="#fn:1" class="footnote" rel="footnote"><span class="visually-hidden">Footnote </span>1</a>))
is_expected.to include(%(<a href="#fn:2" class="footnote" rel="footnote"><span class="visually-hidden">Footnote </span>2</a>))
is_expected.to include(%(<a href="#fn:1" class="footnote" rel="footnote" role="doc-noteref"><span class="visually-hidden">Footnote </span>1</a>))
is_expected.to include(%(<a href="#fn:2" class="footnote" rel="footnote" role="doc-noteref"><span class="visually-hidden">Footnote </span>2</a>))

is_expected.to include(%(<a href="#fnref:1" class="reversefootnote" role="doc-backlink"><span class="visually-hidden">Location of footnote 1</span>↩</a>))
is_expected.to include(%(<a href="#fnref:2" class="reversefootnote" role="doc-backlink"><span class="visually-hidden">Location of footnote 2</span>↩</a>))
Expand Down

0 comments on commit e071d7b

Please sign in to comment.