From 860d6d51b9b419c15d48f918138d0f0385fd38be Mon Sep 17 00:00:00 2001 From: rabuzarus <trebor@central-unit> Date: Tue, 3 Jan 2017 17:38:08 +0100 Subject: [PATCH] Frio: add "aria-describedby" to the field templates --- view/theme/frio/templates/field_checkbox.tpl | 6 +++--- view/theme/frio/templates/field_colorinput.tpl | 5 +++-- view/theme/frio/templates/field_fileinput.tpl | 5 +++-- view/theme/frio/templates/field_intcheckbox.tpl | 4 ++-- view/theme/frio/templates/field_radio.tpl | 4 ++-- view/theme/frio/templates/field_themeselect.tpl | 2 +- view/theme/frio/templates/group_side.tpl | 1 + view/theme/frio/templates/theme_settings.tpl | 5 ++--- 8 files changed, 17 insertions(+), 15 deletions(-) diff --git a/view/theme/frio/templates/field_checkbox.tpl b/view/theme/frio/templates/field_checkbox.tpl index 1062269236..f938b55aa1 100644 --- a/view/theme/frio/templates/field_checkbox.tpl +++ b/view/theme/frio/templates/field_checkbox.tpl @@ -1,9 +1,9 @@ <div class="field checkbox" id="div_id_{{$field.0}}"> <input type="hidden" name="{{$field.0}}" value="0"> - <input type="checkbox" name="{{$field.0}}" id="id_{{$field.0}}" value="1" {{if $field.2}}checked="checked"{{/if}}> + <input type="checkbox" name="{{$field.0}}" id="id_{{$field.0}}" value="1" {{if $field.2}}checked="checked"{{/if}} aria-checked="{{if $field.2}}true{{else}}false{{/if}}" aria-describedby="{{$field.0}}_tip"> <label for="id_{{$field.0}}"> - {{$field.1}} - <p class="help-block">{{$field.3}}</p> + {{$field.1}} + <span class="help-block" id="{{$field.0}}_tip" role="tooltip">{{$field.3}}</span> </label> </div> \ No newline at end of file diff --git a/view/theme/frio/templates/field_colorinput.tpl b/view/theme/frio/templates/field_colorinput.tpl index c41c50df90..886d647e9c 100644 --- a/view/theme/frio/templates/field_colorinput.tpl +++ b/view/theme/frio/templates/field_colorinput.tpl @@ -2,9 +2,10 @@ <div class="form-group field input color"> <label for="id_{{$field.0}}" id="label_{{$field.0}}">{{$field.1}}</label> <div class="input-group" id="{{$field.0}}"> - <input class="form-control color" name="{{$field.0}}" id="id_{{$field.0}}" type="text" value="{{$field.2}}">{{if $field.4}} <span class="required">{{$field.4}}</span> {{/if}} + <input class="form-control color" name="{{$field.0}}" id="id_{{$field.0}}" type="text" value="{{$field.2}}" aria-describedby="{{$field.0}}_tip"> + {{if $field.4}}<span class="required">{{$field.4}}</span>{{/if}} <span class="input-group-addon"><i></i></span> </div> - <span id="help_{{$field.0}}" class="help-block">{{$field.3}}</span> + <span id="{{$field.0}}_tip" class="help-block" role="tooltip">{{$field.3}}</span> <div id="end_{{$field.0}}" class="field_end"></div> </div> diff --git a/view/theme/frio/templates/field_fileinput.tpl b/view/theme/frio/templates/field_fileinput.tpl index ebaa76941d..721a6535fb 100644 --- a/view/theme/frio/templates/field_fileinput.tpl +++ b/view/theme/frio/templates/field_fileinput.tpl @@ -2,9 +2,10 @@ <div class="form-group field input file"> <label for="id_{{$field.0}}" id="label_{{$field.0}}">{{$field.1}}</label> <div class="input-group" id="{{$field.0}}"> - <input class="form-control file" name="{{$field.0}}" id="id_{{$field.0}}" type="text" value="{{$field.2}}">{{if $field.4}} <span class="required">{{$field.4}}</span> {{/if}} + <input class="form-control file" name="{{$field.0}}" id="id_{{$field.0}}" type="text" value="{{$field.2}}" aria-describedby="{{$field.0}}_tip"> + {{if $field.4}}<span class="required">{{$field.4}}</span>{{/if}} <span class="input-group-addon image-select"><i class="fa fa-picture-o"></i></span> </div> - <span id="help_{{$field.0}}" class="help-block">{{$field.3}}</span> + <span id="{{$field.0}}_tip" class="help-block" role="tooltip">{{$field.3}}</span> <div id="end_{{$field.0}}" class="field_end"></div> </div> diff --git a/view/theme/frio/templates/field_intcheckbox.tpl b/view/theme/frio/templates/field_intcheckbox.tpl index 192cf73841..8863d14c4d 100644 --- a/view/theme/frio/templates/field_intcheckbox.tpl +++ b/view/theme/frio/templates/field_intcheckbox.tpl @@ -1,7 +1,7 @@ <div class="form-group field checkbox"> - <input type="checkbox" name="{{$field.0}}" id="id_{{$field.0}}" value="{{$field.3|escape:'html'}}" {{if $field.2}}checked="checked"{{/if}} aria-describedby='{{$field.0}}_tip'> + <input type="checkbox" name="{{$field.0}}" id="id_{{$field.0}}" value="{{$field.3|escape:'html'}}" {{if $field.2}}checked="checked"{{/if}} aria-checked="{{if $field.2}}true{{else}}false{{/if}}" aria-describedby="{{$field.0}}_tip"> <label for="id_{{$field.0}}">{{$field.1}}</label> - <span class="help-block" role="tooltip">{{$field.4}}</span> + <span class="help-block" role="tooltip" id="{{$field.0}}_tip">{{$field.4}}</span> </div> <div class="clear"></div> diff --git a/view/theme/frio/templates/field_radio.tpl b/view/theme/frio/templates/field_radio.tpl index 3288009536..970e25000b 100644 --- a/view/theme/frio/templates/field_radio.tpl +++ b/view/theme/frio/templates/field_radio.tpl @@ -1,10 +1,10 @@ <div class="field radio"> <div class="radio"> - <input type="radio" name="{{$field.0}}" id="id_{{$field.0}}_{{$field.2}}" value="{{$field.2}}" {{if $field.4}}checked="true"{{/if}}> + <input type="radio" name="{{$field.0}}" id="id_{{$field.0}}_{{$field.2}}" value="{{$field.2}}" {{if $field.4}}checked="true"{{/if}} aria-checked="{{if $field.4}}true{{else}}false{{/if}}" aria-describedby="{{$field.0}}_tip"> <label for="id_{{$field.0}}_{{$field.2}}"> {{$field.1}} - <p class="help-block">{{$field.3}}</p> + <span class="help-block" id="{{$field.0}}_tip" role="tooltip">{{$field.3}}</span> </label> </div> </div> \ No newline at end of file diff --git a/view/theme/frio/templates/field_themeselect.tpl b/view/theme/frio/templates/field_themeselect.tpl index 04f4e82b1c..7ecdf57e64 100644 --- a/view/theme/frio/templates/field_themeselect.tpl +++ b/view/theme/frio/templates/field_themeselect.tpl @@ -5,6 +5,6 @@ <select class="form-control" name="{{$field.0}}" id="id_{{$field.0}}" {{if $field.5=="preview"}}onchange="previewTheme(this);"{{/if}} aria-describedby="{{$field.0}}_tip" > {{foreach $field.4 as $opt=>$val}}<option value="{{$opt}}" {{if $opt==$field.2}}selected="selected"{{/if}}>{{$val}}</option>{{/foreach}} </select> - <span class="help-block" id="{{$field.0}}_tip">{{$field.3}}</span> + <span class="help-block" id="{{$field.0}}_tip" role="tooltip">{{$field.3}}</span> {{if $field.5=="preview"}}<div id="theme-preview"></div>{{/if}} </div> \ No newline at end of file diff --git a/view/theme/frio/templates/group_side.tpl b/view/theme/frio/templates/group_side.tpl index 682da5e118..e892c9bed0 100644 --- a/view/theme/frio/templates/group_side.tpl +++ b/view/theme/frio/templates/group_side.tpl @@ -13,6 +13,7 @@ class="{{if $group.selected}}ticked{{else}}unticked {{/if}} action" onclick="contactgroupChangeMember('{{$group.id}}','{{$group.cid}}');return true;" {{if $group.ismember}}checked="checked"{{/if}} + aria-checked="{{if $group.ismember}}true{{else}}false{{/if}}" /> <label for="group-{{$group.id}}"></label> <div class="clearfix"></div> diff --git a/view/theme/frio/templates/theme_settings.tpl b/view/theme/frio/templates/theme_settings.tpl index aa0b6ca56a..83b466b73b 100644 --- a/view/theme/frio/templates/theme_settings.tpl +++ b/view/theme/frio/templates/theme_settings.tpl @@ -16,8 +16,8 @@ {{if $contentbg_transp}} <div class="form-group field input color"> <label for="id_{{$contentbg_transp.0}}" id="label_{{$contentbg_transp.0}}">{{$contentbg_transp.1}}</label> - <input type="hidden" class="form-control color slider-input" name="{{$contentbg_transp.0}}" id="{{$contentbg_transp.0}}" type="text" value="{{$contentbg_transp.2}}"> - <span id="help_{{$contentbg_transp.0}}" class="help-block">{{$contentbg_transp.3}}</span> + <input type="hidden" class="form-control color slider-input" name="{{$contentbg_transp.0}}" id="{{$contentbg_transp.0}}" type="text" value="{{$contentbg_transp.2}}" aria-describedby="{{$contentbg_transp.0}}_tip"> + <span id="{{$contentbg_transp.0}}_tip" class="help-block" role="tooltip">{{$contentbg_transp.3}}</span> <div id="end_{{$contentbg_transp.0}}" class="field_end"></div> </div> {{/if}} @@ -69,6 +69,5 @@ <div class="clearfix"></div> <script> - $(".inputRange").rangeinput(); </script>