Skip to content

Commit

Permalink
Add required and aria-required attributes to mandatory fields, a litt…
Browse files Browse the repository at this point in the history
…le step for a11y
  • Loading branch information
franck-paul committed Jun 2, 2020
1 parent d9ed350 commit 58a9396
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion _define.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"ContactMe", // Name
"Add a simple contact form on your blog", // Description
"Olivier Meunier and contributors", // Author
'1.9', // Version
'1.9.1', // Version
[
'requires' => [['core', '2.16']], // Dependencies
'permissions' => 'admin', // Permissions
Expand Down
8 changes: 4 additions & 4 deletions default-templates/currywurst/contact_me.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ <h2>{{tpl:ContactMePageTitle encode_html="1"}}</h2>
<fieldset>
<p class="field"><label for="c_name">{{tpl:lang Name or nickname}}&nbsp;:</label>
<input name="c_name" id="c_name" type="text" size="30" maxlength="255"
value="{{tpl:ContactMeName encode_html="1"}}" />
value="{{tpl:ContactMeName encode_html="1"}}" required aria-required="true" />
</p>

<p class="field"><label for="c_mail">{{tpl:lang Email address}}&nbsp;:</label>
<input name="c_mail" id="c_mail" type="text" size="30" maxlength="255"
value="{{tpl:ContactMeEmail encode_html="1"}}" />
value="{{tpl:ContactMeEmail encode_html="1"}}" required aria-required="true" />
</p>

<p class="field"><label for="c_site">{{tpl:lang Website}}
Expand All @@ -47,15 +47,15 @@ <h2>{{tpl:ContactMePageTitle encode_html="1"}}</h2>

<p class="field"><label for="c_subject">{{tpl:lang Subject}}&nbsp;:</label>
<input name="c_subject" id="c_subject" type="text" size="30" maxlength="255"
value="{{tpl:ContactMeSubject encode_html="1"}}" />
value="{{tpl:ContactMeSubject encode_html="1"}}" required aria-required="true" />
</p>

<p style="display:none"><input name="f_mail" type="text" size="30"
maxlength="255" value="" /></p>

<p class="field"><label for="c_message">{{tpl:lang Message}}&nbsp;:</label>
<textarea name="c_message" id="c_message" cols="35"
rows="7">{{tpl:ContactMeMessage raw="1" encode_html="1"}}</textarea>
rows="7" required aria-required="true">{{tpl:ContactMeMessage raw="1" encode_html="1"}}</textarea>
</p>

<p><input type="submit" class="submit" value="{{tpl:lang send}}" /></p>
Expand Down
8 changes: 4 additions & 4 deletions default-templates/dotty/contact_me.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ <h2>{{tpl:ContactMePageTitle encode_html="1"}}</h2>
<fieldset>
<p class="field"><label for="c_name">{{tpl:lang Name or nickname}}&nbsp;:</label>
<input name="c_name" id="c_name" type="text" size="30" maxlength="255"
value="{{tpl:ContactMeName encode_html="1"}}" />
value="{{tpl:ContactMeName encode_html="1"}}" required aria-required="true" />
</p>

<p class="field"><label for="c_mail">{{tpl:lang Email address}}&nbsp;:</label>
<input name="c_mail" id="c_mail" type="email" size="30" maxlength="255"
value="{{tpl:ContactMeEmail encode_html="1"}}" />
value="{{tpl:ContactMeEmail encode_html="1"}}" required aria-required="true" />
</p>

<p class="field"><label for="c_site">{{tpl:lang Website}}
Expand All @@ -47,15 +47,15 @@ <h2>{{tpl:ContactMePageTitle encode_html="1"}}</h2>

<p class="field"><label for="c_subject">{{tpl:lang Subject}}&nbsp;:</label>
<input name="c_subject" id="c_subject" type="text" size="30" maxlength="255"
value="{{tpl:ContactMeSubject encode_html="1"}}" />
value="{{tpl:ContactMeSubject encode_html="1"}}" required aria-required="true" />
</p>

<p style="display:none"><input name="f_mail" type="text" size="30"
maxlength="255" value="" /></p>

<p class="field"><label for="c_message">{{tpl:lang Message}}&nbsp;:</label>
<textarea name="c_message" id="c_message" cols="35"
rows="7">{{tpl:ContactMeMessage raw="1" encode_html="1"}}</textarea>
rows="7" required aria-required="true">{{tpl:ContactMeMessage raw="1" encode_html="1"}}</textarea>
</p>

<p><input type="submit" class="submit" value="{{tpl:lang send}}" /></p>
Expand Down
8 changes: 4 additions & 4 deletions default-templates/mustek/contact_me.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ <h2>{{tpl:ContactMePageTitle encode_html="1"}}</h2>
<fieldset>
<p class="field"><label for="c_name">{{tpl:lang Name or nickname}}&nbsp;:</label>
<input name="c_name" id="c_name" type="text" size="30" maxlength="255"
value="{{tpl:ContactMeName encode_html="1"}}" />
value="{{tpl:ContactMeName encode_html="1"}}" required aria-required="true" />
</p>

<p class="field"><label for="c_mail">{{tpl:lang Email address}}&nbsp;:</label>
<input name="c_mail" id="c_mail" type="text" size="30" maxlength="255"
value="{{tpl:ContactMeEmail encode_html="1"}}" />
value="{{tpl:ContactMeEmail encode_html="1"}}" required aria-required="true" />
</p>

<p class="field"><label for="c_site">{{tpl:lang Website}}
Expand All @@ -47,15 +47,15 @@ <h2>{{tpl:ContactMePageTitle encode_html="1"}}</h2>

<p class="field"><label for="c_subject">{{tpl:lang Subject}}&nbsp;:</label>
<input name="c_subject" id="c_subject" type="text" size="30" maxlength="255"
value="{{tpl:ContactMeSubject encode_html="1"}}" />
value="{{tpl:ContactMeSubject encode_html="1"}}" required aria-required="true" />
</p>

<p style="display:none"><input name="f_mail" type="text" size="30"
maxlength="255" value="" /></p>

<p class="field"><label for="c_message">{{tpl:lang Message}}&nbsp;:</label>
<textarea name="c_message" id="c_message" cols="35"
rows="7">{{tpl:ContactMeMessage raw="1" encode_html="1"}}</textarea>
rows="7" required aria-required="true">{{tpl:ContactMeMessage raw="1" encode_html="1"}}</textarea>
</p>

<p><input type="submit" class="submit" value="{{tpl:lang send}}" /></p>
Expand Down

0 comments on commit 58a9396

Please sign in to comment.