
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.
53 lines
1.4 KiB
Plaintext
53 lines
1.4 KiB
Plaintext
== Why is this an issue?
|
|
|
|
For users of assistive technology such as screen readers, it may be challenging to know what is expected in each form's input. The input's label alone might not be sufficient: 'street' could be part of a billing or a shipping address for instance.
|
|
|
|
|
|
Fieldset legends are read out loud by screen readers before the label each time the focus is set on an input. For example, a legend 'Billing address' with a label 'Street' will read 'Billing address street'. Legends should be short, and 'Your' should not be repeated in both the legend and the label, as it would result in 'Your address Your City' being read.
|
|
|
|
|
|
=== Noncompliant code example
|
|
|
|
[source,html]
|
|
----
|
|
<fieldset> <!-- Noncompliant -->
|
|
Street: <input type="text"><br />
|
|
Town: <input type="text"><br />
|
|
Country: <input type="text"><br />
|
|
</fieldset>
|
|
----
|
|
|
|
|
|
=== Compliant solution
|
|
|
|
[source,html]
|
|
----
|
|
<fieldset>
|
|
<legend>Billing address</legend>
|
|
Street: <input type="text"><br />
|
|
Town: <input type="text"><br />
|
|
Country: <input type="text"><br />
|
|
</fieldset>
|
|
----
|
|
|
|
|
|
ifdef::env-github,rspecator-view[]
|
|
|
|
'''
|
|
== Implementation Specification
|
|
(visible only on this page)
|
|
|
|
=== Message
|
|
|
|
Add a <legend> tag to this fieldset.
|
|
|
|
|
|
'''
|
|
== Comments And Links
|
|
(visible only on this page)
|
|
|
|
=== on 8 Jul 2013, 18:23:32 Freddy Mallet wrote:
|
|
Is implemented by \http://jira.codehaus.org/browse/SONARPLUGINS-2989
|
|
|
|
endif::env-github,rspecator-view[]
|