Acessibility: A checkbox is a checkbox

2022.09-rc
Michael 2020-02-05 08:08:32 +00:00
rodzic 480d936685
commit 07148ecf6b
12 zmienionych plików z 18 dodań i 66 usunięć

Wyświetl plik

@ -178,14 +178,3 @@ Field parameter:
2. Current text for the box,
3. Help text for the input box.
4. if set to "required" modern browser will check that this input box is filled when submitting the form,
### field_yesno.tpl
A button that has two states *yes* or *no*.
Field parameter:
0. Name of the input field,
1. Label for the button,
2. Current value,
3. Help text for the button
4. if set to an array of two values, these two will be used, otherwise "off" and "on".

Wyświetl plik

@ -1075,7 +1075,7 @@ function settings_content(App $a)
$openid_field = ['openid_url', DI::l10n()->t('OpenID:'), $openid, DI::l10n()->t("\x28Optional\x29 Allow this OpenID to login to this account."), "", "readonly", "url"];
}
$opt_tpl = Renderer::getMarkupTemplate("field_yesno.tpl");
$opt_tpl = Renderer::getMarkupTemplate("field_checkbox.tpl");
if (DI::config()->get('system', 'publish_all')) {
$profile_in_dir = '<input type="hidden" name="profile_in_directory" value="1" />';
} else {

Wyświetl plik

@ -11,8 +11,8 @@
<div class="settings-content-block">
{{foreach $f.1 as $fcat}}
<div class="settings-block">
{{include file="field_yesno.tpl" field=$fcat.0}}
{{include file="field_yesno.tpl" field=$fcat.1}}
{{include file="field_checkbox.tpl" field=$fcat.0}}
{{include file="field_checkbox.tpl" field=$fcat.1}}
</div>
{{/foreach}}

Wyświetl plik

@ -51,7 +51,7 @@
<div id="dfrn-request-info-wrapper" >
{{include file="field_yesno.tpl" field=$does_know_you}}
{{include file="field_checkbox.tpl" field=$does_know_you}}
<!--
<p id="doiknowyou">
{{$does_know}}

Wyświetl plik

@ -1,16 +0,0 @@
<div class="field yesno">
<label for="id_{{$field.0}}">{{$field.1}}</label>
<div class="onoff" id="id_{{$field.0}}_onoff">
<input type="hidden" name="{{$field.0}}" id="id_{{$field.0}}" value="{{$field.2 nofilter}}" aria-describedby="{{$field.0}}_tip">
<a href="#" class="off">
{{if $field.4}}{{$field.4.0}}{{else}}OFF{{/if}}
</a>
<a href="#" class="on">
{{if $field.4}}{{$field.4.1}}{{else}}ON{{/if}}
</a>
</div>
{{if $field.3}}
<span class="field_help" role="tooltip" id="{{$field.0}}_tip">{{$field.3 nofilter}}</span>
{{/if}}
</div>

Wyświetl plik

@ -10,7 +10,7 @@
<div class="settings-content-block">
{{foreach $f.1 as $fcat}}
{{include file="field_yesno.tpl" field=$fcat}}
{{include file="field_checkbox.tpl" field=$fcat}}
{{/foreach}}
<div class="settings-submit-wrapper" >
<input type="submit" name="submit" class="settings-features-submit" value="{{$submit}}" />

Wyświetl plik

@ -1,3 +1,3 @@
<div id="profile-edit-hide-friends-wrapper">
{{include file="field_yesno.tpl" field=$yesno}}
{{include file="field_checkbox.tpl" field=$yesno}}
</div>

Wyświetl plik

@ -72,10 +72,10 @@
<div style="display: none;">
<div id="advanced-expire-popup" style="width:auto;height:auto;overflow:auto;">
<h3>{{$expire.advanced}}</h3>
{{include file="field_yesno.tpl" field=$expire.items}}
{{include file="field_yesno.tpl" field=$expire.notes}}
{{include file="field_yesno.tpl" field=$expire.starred}}
{{include file="field_yesno.tpl" field=$expire.network_only}}
{{include file="field_checkbox.tpl" field=$expire.items}}
{{include file="field_checkbox.tpl" field=$expire.notes}}
{{include file="field_checkbox.tpl" field=$expire.starred}}
{{include file="field_checkbox.tpl" field=$expire.network_only}}
</div>
</div>
@ -130,7 +130,7 @@
{{include file="field_checkbox.tpl" field=$email_textonly}}
{{include file="field_checkbox.tpl" field=$detailed_notif}}
{{include file="field_yesno.tpl" field=$desktop_notifications}}
{{include file="field_checkbox.tpl" field=$desktop_notifications}}
<script>
(function(){
var elm = $("#id_{{$desktop_notifications.0}}_onoff");

Wyświetl plik

@ -52,7 +52,7 @@
<div id="dfrn-request-info-wrapper" >
{{include file="field_yesno.tpl" field=$does_know_you}}
{{include file="field_checkbox.tpl" field=$does_know_you}}
<!--
<p id="doiknowyou">
{{$does_know}}

Wyświetl plik

@ -1,21 +0,0 @@
<div class="field yesno">
<label for="id_{{$field.0}}">{{$field.1}}</label>
<div class="onoff toggle btn btn-xs pull-right" id="id_{{$field.0}}_onoff">
<div class="switchlabel toggle-group">
<input type="hidden" name="{{$field.0}}" id="id_{{$field.0}}" value="{{$field.2 nofilter}}" aria-describedby="{{$field.0}}_tip">
<label class="btn btn-default btn-xs active toggle-off">
{{if $field.4}}{{$field.4.0}}{{else}}OFF{{/if}}
</label>
<label class="btn btn-primary btn-xs toggle-on">
{{if $field.4}}{{$field.4.1}}{{else}}ON{{/if}}
</label>
<span class="toggle-handle btn btn-default btn-xs"></span>
</div>
</div>
{{if $field.3}}
<span class="help-block" id="{{$field.0}}_tip" role="tooltip">{{$field.3 nofilter}}</span>
{{/if}}
</div>
<div class="clear"></div>

Wyświetl plik

@ -19,7 +19,7 @@
<div id="{{$g}}-settings-content" class="panel-collapse collapse" role="tabpanel" aria-labelledby="{{$g}}-settings-title">
<div class="section-content-tools-wrapper">
{{foreach $f.1 as $fcat}}
{{include file="field_yesno.tpl" field=$fcat}}
{{include file="field_checkbox.tpl" field=$fcat}}
{{/foreach}}
<div class="form-group pull-right settings-submit-wrapper" >

Wyświetl plik

@ -113,10 +113,10 @@
<h4 class="modal-title">{{$expire.advanced}}</h4>
</div>
<div class="modal-body">
{{include file="field_yesno.tpl" field=$expire.items}}
{{include file="field_yesno.tpl" field=$expire.notes}}
{{include file="field_yesno.tpl" field=$expire.starred}}
{{include file="field_yesno.tpl" field=$expire.network_only}}
{{include file="field_checkbox.tpl" field=$expire.items}}
{{include file="field_checkbox.tpl" field=$expire.notes}}
{{include file="field_checkbox.tpl" field=$expire.starred}}
{{include file="field_checkbox.tpl" field=$expire.network_only}}
</div>
</div>
</div>
@ -192,7 +192,7 @@
</div>
*}}
{{include file="field_yesno.tpl" field=$desktop_notifications}}
{{include file="field_checkbox.tpl" field=$desktop_notifications}}
<script type="text/javascript">
(function(){
var elm = $("#id_{{$desktop_notifications.0}}_onoff");