Bug 37977 - Fix some issues with labels in Inventory form
Summary: Fix some issues with labels in Inventory form
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P3 normal
Assignee: Phil Ringnalda
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-09-20 21:40 UTC by Phil Ringnalda
Modified: 2024-09-25 23:49 UTC (History)
0 users

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 37977: Fix some issues with labels in Inventory form (4.00 KB, patch)
2024-09-20 21:57 UTC, Phil Ringnalda
Details | Diff | Splinter Review
Bug 37977: Fix some issues with labels in Inventory form (4.06 KB, patch)
2024-09-21 15:18 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Phil Ringnalda 2024-09-20 21:40:28 UTC
Or for a more accurate summary, "Fix the easy issues with..." because the hard ones with presentation impacts will come in a separate bug.

In Cataloging - Inventory, the labels for Collection and Call number classification scheme just don't have a for="" that matches the id of the input, the former by using the name rather than the id, and the latter because the input doesn't have an id.

The labels for the Optional filters for inventory list or comparing barcodes section of authorized values have correct for attributes, but wonky ids on the inputs: instead of using the authorized value's id, a unique number, they use the authorized value's value, so if you have a value "1" for notforloan and lost and withdrawn and damaged, like you probably do, there are four duplicate ids and zero labels for any of them, since the labels are all using things like 1011, not 1.
Comment 1 Phil Ringnalda 2024-09-20 21:57:40 UTC
Created attachment 171842 [details] [review]
Bug 37977: Fix some issues with labels in Inventory form

The inventory form has several issues with labels with a for attribute that
doesn't match the id of the input, so the label doesn't actually get linked
to anything.

Test plan:
 1. Without the patch, go to Cataloging - Inventory
 2. In the section for "Item location filters" click the label for "Shelving
    location (items.location) is", which will focus the select menu, then
    press the down arrow on the keyboard to see that it's focused by opening
    the select menu.
 3. Click in a blank spot to close the select menu, then click the label for
    "Collection" and press the down arrow key, which will scroll the page
    since the label didn't focus the menu, and repeat with "Call number
    classification scheme" which also will scroll the page when you press
    down arrow.
 4. In the section for "Optional filters for inventory list or comparing
    barcodes" click any of the labels below items.notforloan - clicking a
    checkbox label should toggle whether the checkbox is checked, but it
    will not
 5. Apply patch, refresh page
 6. Repeat steps 3 and 4, but this time you will get the proper behavior,
    focusing the select menus and toggling the checkboxes

Sponsored-by: Chetco Community Public Library
Comment 2 Lucas Gass (lukeg) 2024-09-21 15:18:33 UTC
Created attachment 171847 [details] [review]
Bug 37977: Fix some issues with labels in Inventory form

The inventory form has several issues with labels with a for attribute that
doesn't match the id of the input, so the label doesn't actually get linked
to anything.

Test plan:
 1. Without the patch, go to Cataloging - Inventory
 2. In the section for "Item location filters" click the label for "Shelving
    location (items.location) is", which will focus the select menu, then
    press the down arrow on the keyboard to see that it's focused by opening
    the select menu.
 3. Click in a blank spot to close the select menu, then click the label for
    "Collection" and press the down arrow key, which will scroll the page
    since the label didn't focus the menu, and repeat with "Call number
    classification scheme" which also will scroll the page when you press
    down arrow.
 4. In the section for "Optional filters for inventory list or comparing
    barcodes" click any of the labels below items.notforloan - clicking a
    checkbox label should toggle whether the checkbox is checked, but it
    will not
 5. Apply patch, refresh page
 6. Repeat steps 3 and 4, but this time you will get the proper behavior,
    focusing the select menus and toggling the checkboxes

Sponsored-by: Chetco Community Public Library
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>