html: hide heading anchors from aria
This commit is contained in:
parent
4ce44d1707
commit
8e54898622
|
@ -48,7 +48,7 @@ impl Traverser for Handler {
|
|||
};
|
||||
|
||||
self.exp.push_str(format!(
|
||||
r##"<h{} id="{1}"><a role=none href="#{1}">{2}</a> "##,
|
||||
r##"<h{} id="{1}"><a aria-hidden=true href="#{1}">{2}</a> "##,
|
||||
lvl, id, lead
|
||||
));
|
||||
|
||||
|
@ -307,7 +307,7 @@ AAAA even more
|
|||
res.traverse(&mut exp);
|
||||
assert_eq!(
|
||||
exp.exp.finish(),
|
||||
r##"<main><section></section><h2 id="meow"><a role=none href="#meow">#</a> meow</h2><section><div class="chat"><img class=chat-head width=64 src="faces/fox.png" alt="fox is fox"><div class=chat-text><span class=chat-nick aria-label="fox says"><fox></span> AAAA
|
||||
r##"<main><section></section><h2 id="meow"><a aria-hidden=true href="#meow">#</a> meow</h2><section><div class="chat"><img class=chat-head width=64 src="faces/fox.png" alt="fox is fox"><div class=chat-text><span class=chat-nick aria-label="fox says"><fox></span> AAAA
|
||||
</div></div><p>this__has__under_scores
|
||||
</p><p><a href="#finish-writing-this-test">i am a heading link</a>
|
||||
<a href="hmm/example.org/test.html">should link to .html</a>
|
||||
|
@ -315,8 +315,8 @@ AAAA even more
|
|||
<a href="hmm/example.org/">im a directory!</a>
|
||||
<a href="https://example.org">webbed sight</a>
|
||||
</p><p><img src="https://cheapiesystems.com/media/images/libera-cat.png" alt="the libera.chat logo, but with the mountain replaced with a cat">
|
||||
</p></section><h3 id="foxwash-time"><a role=none href="#foxwash-time">##</a> <span class=todo>TODO</span> wash the fox</h3><section><p></p><div class="chat"><img class=chat-head width=64 src="faces/fox-stimky.png" alt="fox is stimky"><div class=chat-text><span class=chat-nick aria-label="fox says"><fox></span> AAAA even more
|
||||
</div></div></section><h3 id="finish-writing-this-test"><a role=none href="#finish-writing-this-test">##</a> <span class=done>DONE</span> finish writing this test</h3></main>"##
|
||||
</p></section><h3 id="foxwash-time"><a aria-hidden=true href="#foxwash-time">##</a> <span class=todo>TODO</span> wash the fox</h3><section><p></p><div class="chat"><img class=chat-head width=64 src="faces/fox-stimky.png" alt="fox is stimky"><div class=chat-text><span class=chat-nick aria-label="fox says"><fox></span> AAAA even more
|
||||
</div></div></section><h3 id="finish-writing-this-test"><a aria-hidden=true href="#finish-writing-this-test">##</a> <span class=done>DONE</span> finish writing this test</h3></main>"##
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue