rspec/rules/S1101/html/rule.adoc
Fred Tingaud 16f6c0aecf
Inline adoc when include has no additional value (#1940)
Inline adoc files when they are included exactly once.

Also fix language tags because this inlining gives us better information
on what language the code is written in.
2023-05-25 14:18:12 +02:00

56 lines
1.5 KiB
Plaintext

== Why is this an issue?
When links with different targets are given identical link text, this can produce confusion for users of assistive technologies, some of which provide users the ability to view a list of all links on the page.
When this list of links is presented to the user they may be left not knowing the links go to different destinations.
Even if they do realize the links go to different destinations, they may be left not knowing which link to follow to go to the destination they desire.
=== Noncompliant code example
[source,html]
----
<a href="a.html">qux</a>
<a href="b.html">qux</a> <!-- Noncompliant; same text, different targets -->
<a href="c.html">foo</a>
<a href="d.html">foo</a> <!-- Noncompliant; same text, different targets -->
----
=== Compliant solution
[source,html]
----
<a href="a.html">qux</a>
<a href="b.html">qaz</a> <!-- Compliant; different text, different targets -->
<a href="c.html">foo</a>
<a href="c.html">foo</a> <!-- Compliant; same text, same targets -->
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
=== Message
Use distinct texts or point to the same target for this link and the one at line X.
'''
== Comments And Links
(visible only on this page)
=== on 24 Jun 2013, 13:51:59 Dinesh Bolkensteyn wrote:
SQALE to be added
=== on 8 Jul 2013, 18:18:11 Freddy Mallet wrote:
Is implemented by \http://jira.codehaus.org/browse/SONARPLUGINS-3010
endif::env-github,rspecator-view[]