Bugzilla – Attachment 161289 Details for
Bug 35329
Move patron searches to a modal
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35329: (follow-up) Label changes for improved accessibility
Bug-35329-follow-up-Label-changes-for-improved-acc.patch (text/plain), 10.42 KB, created by
Martin Renvoize (ashimema)
on 2024-01-23 11:45:46 UTC
(
hide
)
Description:
Bug 35329: (follow-up) Label changes for improved accessibility
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2024-01-23 11:45:46 UTC
Size:
10.42 KB
patch
obsolete
>From 7b7b97a60f28676b1104e964e40c5695e7dc20f7 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Wed, 10 Jan 2024 13:22:28 +0000 >Subject: [PATCH] Bug 35329: (follow-up) Label changes for improved > accessibility > >This patch alters the patron search form so that <label>s wrap the ><input> fields, allowing the label to be clickable without having to >associate it with a unique id. CSS has been modified to accommodate this >change. > >The patch also adds missing Bootstrap classes to the "Clear" button, and >swaps out the "hint" class for the "note" class on the permissions >information ("Only staff with superlibrarian or acquisitions >permissions..."). > >After this patch, form field labels in the patron search modal should be >clickable to give focus to the field (except for Sort 1 and Sort 2 -- >label don't work that way with Select2). > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > .../prog/css/src/staff-global.scss | 10 ++- > .../prog/en/includes/patron-search.inc | 88 +++++++++++-------- > 2 files changed, 58 insertions(+), 40 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss >index 8d44878a641..ff8aae7e4ba 100644 >--- a/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss >+++ b/koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss >@@ -239,7 +239,7 @@ aside { > label { > color: #696969; > display: block; >- margin: .5em 0 0 0; >+ margin: .5em 0; > } > > li { >@@ -1028,7 +1028,6 @@ fieldset { > span.label { > display: block; > font-weight: bold; >- padding: .3em 0; > text-align: left; > > &.inline { >@@ -1037,6 +1036,13 @@ fieldset { > margin-left: 1em; > width: auto; > } >+ >+ input, >+ select, >+ .select2-container { >+ display: block; >+ margin-top: .5em; >+ } > } > > li { >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc >index dbddb606603..9466bc5d7f3 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc >@@ -35,44 +35,54 @@ > <h3>Search for patron</h3> > <ol> > <li> >- <label for="search_patron_filter">Search:</label> >- <input type="text" class="search_patron_filter" value="[% search_filter | html %]" class="focus" /> >+ <label> >+ Search: >+ <input type="text" class="search_patron_filter" value="[% search_filter | html %]" class="focus" /> >+ </label> > </li> > > [% FOR f IN filters %] > [% SWITCH f %] > [% CASE 'branch' %] > <li> >- <label for="branchcode_filter">Library:</label> >- <select class="branchcode_filter"> >- [% SET libraries = Branches.all( only_from_group => 1 ) %] >- [% IF libraries.size != 1 %] >- <option value="">Any</option> >- [% END %] >- [% FOREACH l IN libraries %] >- <option value="[% l.branchcode | html %]">[% l.branchname | html %]</option> >- [% END %] >- </select> >+ <label> >+ Library: >+ <select class="branchcode_filter"> >+ [% SET libraries = Branches.all( only_from_group => 1 ) %] >+ [% IF libraries.size != 1 %] >+ <option value="">Any</option> >+ [% END %] >+ [% FOREACH l IN libraries %] >+ <option value="[% l.branchcode | html %]">[% l.branchname | html %]</option> >+ [% END %] >+ </select> >+ </label> > </li> > [% CASE 'category' %] > <li> >- <label for="categorycode_filter">Category:</label> >- <select class="categorycode_filter"> >- <option value="">Any</option> >- [% FOREACH category IN Categories.limited.unblessed %] >- <option value="[% category.categorycode | html %]">[% category.description | html %]</option> >- [% END %] >- </select> >+ <label> >+ Category: >+ <select class="categorycode_filter"> >+ <option value="">Any</option> >+ [% FOREACH category IN Categories.limited.unblessed %] >+ <option value="[% category.categorycode | html %]">[% category.description | html %]</option> >+ [% END %] >+ </select> >+ </label> > </li> > [% CASE 'sort1' %] > <li> >- <label for="sort1_filter">Sort 1:</label> >- [% PROCESS 'av-build-dropbox.inc' no_id => 1, name="sort1_filter", category="Bsort1", empty=1, size = 20 %] >+ <label> >+ Sort 1: >+ [% PROCESS 'av-build-dropbox.inc' no_id => 1, name="sort1_filter", category="Bsort1", empty=1, size = 20 %] >+ </label> > </li> > [% CASE 'sort2' %] > <li> >- <label for="sort2_filter">Sort 2:</label> >- [% PROCESS 'av-build-dropbox.inc' no_id => 1, name="sort2_filter", category="Bsort2", empty=1, size = 20 %] >+ <label> >+ Sort 2: >+ [% PROCESS 'av-build-dropbox.inc' no_id => 1, name="sort2_filter", category="Bsort2", empty=1, size = 20 %] >+ </label> > </li> > [% CASE 'search_field' %] > <li> >@@ -80,23 +90,25 @@ > </li> > [% CASE 'search_type' %] > <li> >- <label for="searchtype_filter">Search type:</label> >- <select name="searchtype" class="searchtype_filter"> >- [% IF searchtype == "starts_with" %] >- <option value='starts_with' selected="selected">Starts with</option> >- <option value="contains">Contains</option> >- [% ELSE %] >- <option value='starts_with'>Starts with</option> >- <option value="contains" selected="selected">Contains</option> >- [% END %] >- </select> >+ <label> >+ Search type: >+ <select name="searchtype" class="searchtype_filter"> >+ [% IF searchtype == "starts_with" %] >+ <option value='starts_with' selected="selected">Starts with</option> >+ <option value="contains">Contains</option> >+ [% ELSE %] >+ <option value='starts_with'>Starts with</option> >+ <option value="contains" selected="selected">Contains</option> >+ [% END %] >+ </select> >+ </label> > </li> > [% END %] > [% END %] > </ol> > <fieldset class="action"> > <input type="submit" class="btn btn-primary" value="Search" /> >- <input type="button" value="Clear" class="clear_search" /> >+ <input type="button" value="Clear" class="btn btn-default clear_search" /> > </fieldset> > </fieldset> > </form> >@@ -118,13 +130,13 @@ > [% END %] > > [% IF filter == 'suggestions_managers' %] >- <div class="hint">Only staff with superlibrarian or suggestions_manage permissions are returned in the search results</div> >+ <div class="note">Only staff with superlibrarian or suggestions_manage permissions are returned in the search results</div> > [% ELSIF filter == 'orders_managers' OR filter == 'baskets_managers' %] >- <div class="hint">Only staff with superlibrarian or acquisitions permissions (or order_manage permission if granular permissions are enabled) are returned in the search results</div> >+ <div class="note">Only staff with superlibrarian or acquisitions permissions (or order_manage permission if granular permissions are enabled) are returned in the search results</div> > [% ELSIF filter == 'funds_owners' OR filter == 'funds_users' %] >- <div class="hint">Only staff with superlibrarian or acquisitions permissions (or budget_modify permission if granular permissions are enabled) are returned in the search results</div> >+ <div class="note">Only staff with superlibrarian or acquisitions permissions (or budget_modify permission if granular permissions are enabled) are returned in the search results</div> > [% ELSIF filter == 'erm_users' %] >- <div class="hint">Only staff with superlibrarian or ERM permissions are returned in the search results</div> >+ <div class="note">Only staff with superlibrarian or ERM permissions are returned in the search results</div> > [% END %] > > <div class="browse"> >-- >2.43.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 35329
:
160698
|
160699
|
160700
|
160701
|
160702
|
160703
|
160704
|
160705
|
160706
|
160728
|
160729
|
160733
|
160734
|
160735
|
160736
|
160737
|
160738
|
160739
|
160740
|
160741
|
160742
|
160743
|
160759
|
160760
|
160761
|
160762
|
160763
|
160768
|
160769
|
160770
|
160771
|
160773
|
160774
|
160940
|
160941
|
160943
|
160944
|
160945
|
160946
|
160947
|
160948
|
160949
|
160950
|
160951
|
160952
|
160953
|
160954
|
160955
|
160956
|
160957
|
160958
|
160959
|
161165
|
161166
|
161183
|
161184
|
161185
|
161186
|
161187
|
161188
|
161189
|
161190
|
161191
|
161192
|
161193
|
161194
|
161195
|
161196
|
161197
|
161198
|
161199
|
161259
|
161260
|
161274
|
161275
|
161276
|
161277
|
161278
|
161279
|
161280
|
161281
|
161282
|
161283
|
161284
|
161285
|
161286
|
161287
|
161288
|
161289
|
161290
|
161291
|
161292
|
161293
|
161294
|
161295
|
161398
|
161399
|
161400
|
161401
|
161402
|
161403
|
161404
|
161405
|
161406
|
161407
|
161408
|
161409
|
161410
|
161411
|
161412
|
161413
|
161414
|
161415
|
161416
|
161417
|
162436
|
162437
|
162438
|
162439
|
162440
|
162441
|
162442
|
162443
|
162444
|
162445
|
162446
|
162447
|
162448
|
162449
|
162450
|
162451
|
162452
|
162453
|
162454
|
162455
|
162456
|
162457
|
162670
|
162671
|
162713
|
162714