Skip to content

Code chunks accessibility issue "Link missing a text alternative" #192

@josenino95

Description

@josenino95

This is my final issue on accessibility, related to #190 and #191.

The SiteImprove tool identified that code chunks weirdly generate hyperlinks that don't have alt text.

For example, looking at the HTML source of the Git SW lesson (right now it's line 443 of the HTML source) for an example with the Git SW lesson. Here an <a ...> tag is created, href="#cb2-1", but there isn't actual text inside between <a></a>. So that's why the accessibility tool is flagging it.

<pre class="sourceCode bash" tabindex="0"><code class="sourceCode bash"><span id="cb2-1"><a href="[#cb2-1](https://swcarpentry.github.io/git-novice/04-changes.html#cb2-1)" tabindex="-1"></a><span class="ex">$</span> nano guacamole.md</span></code></pre>

Do you know the reason why code chunks create these <a> tags? After a quick review, I see this happening to Shell and Python chunks, but not R or Output chunks.

Metadata

Metadata

Assignees

Labels

accessibilityIssues relating to accessibility and WCAG{sandpaper}user interface package{varnish}HTML/CSS/JS templates

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions