Bug 34624 - Many header search forms lack for attribute for label
Summary: Many header search forms lack for attribute for label
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Owen Leonard
QA Contact: Martin Renvoize
URL:
Keywords: accessibility, rel_23_05_candidate
Depends on:
Blocks: 35205
  Show dependency treegraph
 
Reported: 2023-08-25 17:47 UTC by Owen Leonard
Modified: 2023-11-14 15:14 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.11.00,23.05.06


Attachments
Bug 34624: Add "for" attribute to label in header search forms which lack it (32.11 KB, patch)
2023-08-25 18:22 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 34624: Add "for" attribute to label in header search forms which lack it (32.17 KB, patch)
2023-08-28 12:17 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 34624: Add "for" attribute to label in header search forms which lack it (37.11 KB, patch)
2023-09-01 18:07 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 34624: (follow-up) fix broken <span> (1.26 KB, patch)
2023-09-07 05:28 UTC, Victor Grousset/tuxayo
Details | Diff | Splinter Review
Bug 34624: (follow-up) Add "for" attribute to serials-search.inc label (1.19 KB, patch)
2023-09-08 10:58 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 34624: Add "for" attribute to label in header search forms which lack it (37.18 KB, patch)
2023-09-08 13:25 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 34624: (follow-up) fix broken <span> (1.32 KB, patch)
2023-09-08 13:25 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 34624: (follow-up) Add "for" attribute to serials-search.inc label (1.25 KB, patch)
2023-09-08 13:25 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 34624: [23.05.x] Add "for" attribute to label in header search forms which lack it (32.44 KB, patch)
2023-10-13 11:55 UTC, Owen Leonard
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2023-08-25 17:47:44 UTC
In the header search forms, we have a label which is associated with the form field, but in many cases the label doesn't have a "for" attribute. This is a problem for HTML validity and for accessibility.
Comment 1 Owen Leonard 2023-08-25 18:22:35 UTC Comment hidden (obsolete)
Comment 2 Pedro Amorim 2023-08-28 12:17:58 UTC Comment hidden (obsolete)
Comment 3 Pedro Amorim 2023-08-28 12:19:14 UTC
I wonder if we should/could just merge all these *-search.inc files into a single one.
Comment 4 Owen Leonard 2023-09-01 18:07:51 UTC Comment hidden (obsolete)
Comment 5 Victor Grousset/tuxayo 2023-09-07 05:28:54 UTC
Created attachment 155286 [details] [review]
Bug 34624: (follow-up) fix broken <span>
Comment 6 Victor Grousset/tuxayo 2023-09-07 05:30:35 UTC
QA in progress: code looks good, test plan lists all the relevant pages.
Comment 7 Victor Grousset/tuxayo 2023-09-08 05:02:54 UTC
All good except "- Serials: Search subscriptions"

There is no "for", where should it point to? On page load, focus is on ISSN, should it be the same or does Title makes more sense there?
Comment 8 Owen Leonard 2023-09-08 10:58:32 UTC
Created attachment 155394 [details] [review]
Bug 34624: (follow-up) Add "for" attribute to serials-search.inc label
Comment 9 Martin Renvoize 2023-09-08 13:25:38 UTC
Created attachment 155412 [details] [review]
Bug 34624: Add "for" attribute to label in header search forms which lack it

This patch adds a "for" label to header search forms labels which lack
it.

To test, apply the patch and test the affected pages to confirm that
clicking the label corresponding to the active search form can be
clicked to move cursor focus to that input field.

As you activate each search form, the cursor focus will automatically be
moved to the input. Click outside of the field to remove the focus, and
then click the label to test that it is correctly tied to the field.

- Staff interface home page:
  - Checkout, Check in, Renew, Search patrons, and Search catalog.
- Acquisitions: Vendor search and orders search
- Acquisitions -> Vendor search -> Vendor -> Contracts: Contract search
- Acquisitions -> Vendor search -> Vendor -> Basket -> Add to basket ->
  From a suggestion: Search suggestions
- Authorities: Main heading ($a only), Main heading, All headings, and
  Entire record.
- Administration -> Budgets: Search funds
- Administration -> Cities & towns: City search
- Administration -> Currencies: Currencies search
- Administration -> Desks: Search desks
  * With UseCirculationDesks enabled
- Administration -> Patron categories: Search patron categories
- Administration -> System preferences: Search system preferences
- Administration -> Z39.50 servers -> Z39.50 server search
- Cataloging: Cataloging search
- E-resource management: Search agreements, Search licenses, Search
  packages, and Search titles
  * With ERMModule enabled
- Patrons -> Search patrons
- Serials: Search subscriptions
- Tools -> Notices & slips: Search notices

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 10 Martin Renvoize 2023-09-08 13:25:40 UTC
Created attachment 155413 [details] [review]
Bug 34624: (follow-up) fix broken <span>

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 11 Martin Renvoize 2023-09-08 13:25:43 UTC
Created attachment 155414 [details] [review]
Bug 34624: (follow-up) Add "for" attribute to serials-search.inc label

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 12 Martin Renvoize 2023-09-08 13:26:30 UTC
Looking good, thanks Owen.

QA scripts happy, no regressions found.

Passing QA
Comment 13 Victor Grousset/tuxayo 2023-09-10 17:47:10 UTC
Great, thanks all :)
Comment 14 Tomás Cohen Arazi 2023-09-12 12:43:44 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 15 Fridolin Somers 2023-09-14 18:01:57 UTC
Does not apply on 23.05.x, surely because not having Bug 32910
Comment 16 Owen Leonard 2023-09-19 12:53:12 UTC
Is there interest in having this backported?
Comment 17 Martin Renvoize 2023-10-12 19:57:45 UTC
It would be great to see this accessibility improvement backported.. but I've not actually seen it hit am accessibility assessment report yet.. so it really depends if it's much work or not.. I'm sure we could wait for it here at least 😉
Comment 18 Owen Leonard 2023-10-13 11:55:49 UTC
Created attachment 157070 [details] [review]
Bug 34624: [23.05.x] Add "for" attribute to label in header search forms which lack it

This patch adds a "for" label to header search forms labels which lack
it.

To test, apply the patch and test the affected pages to confirm that
clicking the label corresponding to the active search form can be
clicked to move cursor focus to that input field.

As you activate each search form, the cursor focus will automatically be
moved to the input. Click outside of the field to remove the focus, and
then click the label to test that it is correctly tied to the field.

- Staff interface home page:
  - Checkout, Check in, Renew, Search patrons, and Search catalog.
- Acquisitions: Vendor search and orders search
- Acquisitions -> Vendor search -> Vendor -> Contracts: Contract search
- Acquisitions -> Vendor search -> Vendor -> Basket -> Add to basket ->
  From a suggestion: Search suggestions
- Authorities: Main heading ($a only), Main heading, All headings, and
  Entire record.
- Administration -> Budgets: Search funds
- Administration -> Cities & towns: City search
- Administration -> Currencies: Currencies search
- Administration -> Desks: Search desks
  * With UseCirculationDesks enabled
- Administration -> Patron categories: Search patron categories
- Administration -> System preferences: Search system preferences
- Administration -> Z39.50 servers -> Z39.50 server search
- Cataloging: Cataloging search
- E-resource management: Search agreements, Search licenses, Search
  packages, and Search titles
  * With ERMModule enabled
- Patrons -> Search patrons
- Serials: Search subscriptions
- Tools -> Notices & slips: Search notices
Comment 19 Fridolin Somers 2023-11-10 07:23:38 UTC
Pushed to 23.05.x for 23.05.06