You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Improve accessibility by nesting bottom footnotes inside footer element (#2688)
This adds semantic meaning to the footnotes organization and improves
accessibility by aiding disabled users who rely on assistive devices
such as screen readers which utilize semantic tags such as the footer
element in order to navigate properly.
The hr element is semantically defined as representing a paragraph-level
thematic break. Now that the footnotes are descendants of the footer
element, the hr element originally preceding the footnotes list is
no longer necessary (footnotes are no longer paragraph-level content)
and thus replaced. However, the footer element is given the class
"footnotes" to allow for styling, so the following CSS could be used to
provide a stylistically equivalent visible border separating the
footnotes from the content if so desired:
.footnotes {
border-top: 2px groove gray;
}
Test snapshots are also updated to reflect the new footer elements.
<p>This text has two<supclass="footnote-reference"id="fr-1-1"><ahref="#fn-1">1</a></sup> identical footnotes<supclass="footnote-reference"id="fr-1-2"><ahref="#fn-1">1</a></sup></p>
6
-
<hr><olclass="footnotes-list">
6
+
<footerclass="footnotes">
7
+
<olclass="footnotes-list">
7
8
<liid="fn-1">
8
9
<p>So one is present. <ahref="#fr-1-1">↩</a> <ahref="#fr-1-2">↩2</a></p>
<p>This text has two<supclass="footnote-reference"id="fr-2-1"><ahref="#fn-2">1</a></sup> footnotes<supclass="footnote-reference"id="fr-1-1"><ahref="#fn-1">2</a></sup></p>
Copy file name to clipboardExpand all lines: components/markdown/tests/snapshots/markdown__github_style_footnotes.snap
+3-1
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,8 @@ expression: body
8
8
<p>This text has two<supclass="footnote-reference"id="fr-5-1"><ahref="#fn-5">5</a></sup> identical footnotes<supclass="footnote-reference"id="fr-5-2"><ahref="#fn-5">5</a></sup></p>
9
9
<p>This text has a footnote<supclass="footnote-reference"id="fr-7-1"><ahref="#fn-7">6</a></sup></p>
10
10
<p>Footnotes can also be referenced with identifiers<supclass="footnote-reference"id="fr-first-1"><ahref="#fn-first">8</a></sup>.</p>
11
-
<hr><olclass="footnotes-list">
11
+
<footerclass="footnotes">
12
+
<olclass="footnotes-list">
12
13
<liid="fn-1">
13
14
<p>But it is meaningless. <ahref="#fr-1-1">↩</a></p>
0 commit comments