|
26 | 26 |
|
27 | 27 | {{#if hideHelp}}
|
28 | 28 | {{!-- even if help text is hidden, still screen read the main comment box label/prompt --}}
|
29 |
| - <label for="comment_form_textarea" |
30 |
| - style="display:none;"> |
| 29 | + <label id="writeCommentHelpText" |
| 30 | + class="screen-reader-text"> |
31 | 31 | {{{s.writeCommentHelpText}}}
|
32 | 32 | </label>
|
33 | 33 | {{else}}
|
34 |
| - <label for="comment_form_textarea" |
| 34 | + <label id="writeCommentHelpText" |
35 | 35 | style="display:block;">
|
36 | 36 | {{{s.writeCommentHelpText}}}
|
37 | 37 | </label>
|
|
43 | 43 | <li>{{{s.helpWriteListRaisNew}}}</li>
|
44 | 44 | <li>{{{s.helpWriteListShort}}}</li>
|
45 | 45 | </ul>
|
46 |
| - <label for="comment_form_textarea" style="display:block"> |
| 46 | + <p id="tipCommentsRandom" style="display:block"> |
47 | 47 | {{{s.tipCommentsRandom}}}
|
48 |
| - </label> |
| 48 | + </p> |
49 | 49 | {{/if}}
|
50 | 50 |
|
51 | 51 | {{!-- end screen-reader-text --}}
|
|
54 | 54 | {{!-- present all hints to screen reader --}}
|
55 | 55 | <div class="screen-reader-text">
|
56 | 56 | <h2>{{s.commentWritingTipsHintsHeader}}</h2>
|
57 |
| - <label for="comment_form_textarea" style="display:block">{{charLimitString}}</label> |
58 |
| - <label for="comment_form_textarea" style="display:block">{{s.tipNoQuestions}}</label> |
59 |
| - <label for="comment_form_textarea" style="display:block">{{s.tipOneIdea}}</label> |
| 57 | + <ul> |
| 58 | + <li id="charLimitString" style="display:block">{{charLimitString}}</li> |
| 59 | + <li id="tipNoQuestions" style="display:block">{{s.tipNoQuestions}}</li> |
| 60 | + <li id="tipOneIdea" style="display:block">{{s.tipOneIdea}}</li> |
| 61 | + </ul> |
60 | 62 | </div> {{!-- end screen-reader-text --}}
|
61 | 63 |
|
62 | 64 |
|
|
131 | 133 | name="txt"
|
132 | 134 | type="text"
|
133 | 135 | maxlength="400"
|
| 136 | + aria-labelledby="writeCommentHelpText" |
| 137 | + aria-describedby="{{#unless hideHelp}}tipCommentsRandom {{/unless}}charLimitString tipNoQuestions tipOneIdea commentCharCountExceededContainer" |
134 | 138 | {{!-- placeholder="Submit your own opinions here. Shorter is better - break up your ideas. You are not responding to anyone else directly - comments are sent out randomly to all participants." --}}
|
135 | 139 | placeholder="{{s.writePrompt}}"
|
136 | 140 | {{#if shouldAutofocusOnTextarea}}autofocus{{/if}}
|
|
211 | 215 | style="display: none; color: gray; {{#if desktop}}min-width: 20px;{{/if}}"
|
212 | 216 | class="comment_form_control_hideable unselectable">
|
213 | 217 | </span>
|
214 |
| - <label |
215 |
| - id="commentCharCountExceeded" |
216 |
| - for="comment_form_textarea" |
217 |
| - role="alert" |
218 |
| - style="display: none; color: red; {{#if desktop}}min-width: 20px;{{/if}}" |
219 |
| - class="comment_form_control_hideable unselectable"> |
220 |
| - </label> |
| 218 | + <span id="commentCharCountExceededContainer"> |
| 219 | + <span |
| 220 | + id="commentCharCountExceeded" |
| 221 | + role="alert" |
| 222 | + style="display: none; color: red; {{#if desktop}}min-width: 20px;{{/if}}" |
| 223 | + class="comment_form_control_hideable unselectable"> |
| 224 | + </span> |
| 225 | + </span> |
221 | 226 | <button
|
222 | 227 | class="
|
223 | 228 | Btn
|
|
0 commit comments