Bug 33893 - Use template wrapper for tabs: OPAC checkout history
Summary: Use template wrapper for tabs: OPAC checkout history
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on: 33891
Blocks: 32571
  Show dependency treegraph
 
Reported: 2023-06-05 13:05 UTC by Owen Leonard
Modified: 2023-12-28 20:47 UTC (History)
4 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.02,22.11.08


Attachments
Bug 33893: Use template wrapper for tabs: OPAC checkout history (18.70 KB, patch)
2023-06-05 14:51 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 33893: Use template wrapper for tabs: OPAC checkout history (20.94 KB, patch)
2023-06-30 18:31 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 33893: Use template wrapper for tabs: OPAC checkout history (21.01 KB, patch)
2023-07-07 13:05 UTC, Alexander Blanchard
Details | Diff | Splinter Review
Bug 33893: Use template wrapper for tabs: OPAC checkout history (21.07 KB, patch)
2023-07-09 14:51 UTC, Katrin Fischer
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-06-05 13:05:47 UTC
Continuing the work of Bug 32571, I would like to update the OPAC checkout history page use the new WRAPPER for tabs
Comment 1 Owen Leonard 2023-06-05 14:51:30 UTC
Created attachment 151995 [details] [review]
Bug 33893: Use template wrapper for tabs: OPAC checkout history

This patch updates the OPAC checkout history page so that it uses
the new WRAPPER syntax to generate tabs markup.

To test, apply the patch and make sure the OnSiteCheckouts system
preference is set to "disabled."

- Log into the OPAC as a patron with checkouts.
- View the checkout history page. The checkout history information
  should be displayed without any tabs.
- Enable the OnSiteCheckouts system preference and if necessary check
  out some on-site checkouts to your patron.
- On the OPAC history page there should now be three tabs: All,
  Checkouts, and On-site checokuts.
  - Switching between the tabs should filter the table accordingly.
Comment 2 Lucas Gass 2023-06-05 22:39:11 UTC
The aria-controls attribute's point to all_checkouts_panel, checkout_panel, onsite_checkout_panel but I don't see those elements on the page.
Comment 3 Owen Leonard 2023-06-06 14:02:44 UTC
(In reply to Lucas Gass from comment #2)
> The aria-controls attribute's point to all_checkouts_panel, checkout_panel,
> onsite_checkout_panel but I don't see those elements on the page.

I'm not sure how to resolve this one... There aren't actually three panels, so with the way the WRAPPER works at the moment we can either have uniquely-named tabs ("#all_checkouts-tab," "#checkout-tab," "onsite_checkout-tab") and invalid aria-controls, or duplicate tab IDs and aria-controls attributes that all point to the same (existing) tab.

I guess the accessibility-compliant option would be better?
Comment 4 Lucas Gass 2023-06-06 14:36:51 UTC
> I guess the accessibility-compliant option would be better?

Is having duplicate ID's but correct aria-controls the accessibility-compliant option?
Comment 5 Owen Leonard 2023-06-06 14:47:04 UTC
I would assume so. My assumption is that the rule against duplicate ID is more about semantics and DOM validity and less about making things work well with assistive technology. But that is just an assumption.
Comment 6 Lucas Gass 2023-06-06 14:56:36 UTC
(In reply to Owen Leonard from comment #5)
> I would assume so. My assumption is that the rule against duplicate ID is
> more about semantics and DOM validity and less about making things work well
> with assistive technology. But that is just an assumption.

I'd have that assumption as well. I did find this:

https://accessibilityinsights.io/info-examples/web/duplicate-id/

So duplicate ID's are not great for accessibility but if the aria-controls are correct assistive technologies should behave as expected?
Comment 7 Owen Leonard 2023-06-30 18:31:32 UTC
Created attachment 152912 [details] [review]
Bug 33893: Use template wrapper for tabs: OPAC checkout history

This patch updates the OPAC checkout history page so that it uses
the new WRAPPER syntax to generate tabs markup.

This patch also updates tab WRAPPER directives in html_helpers.inc to
allow us to pass a custom id for tab links in situations like this one
where we have multiple tabs requiring unique IDs but they all point to
the same panel.

To test, apply the patch and make sure the OnSiteCheckouts system
preference is set to "disabled."

- Log into the OPAC as a patron with checkouts.
- View the checkout history page. The checkout history information
  should be displayed without any tabs.
- Enable the OnSiteCheckouts system preference and if necessary check
  out some on-site checkouts to your patron.
- On the OPAC history page there should now be three tabs: All,
  Checkouts, and On-site checokuts.
  - Switching between the tabs should filter the table accordingly.
- Test that the changes to the tab wrapper have not broken tabs on other
  pages, e.g. bibliographic details or user summary.
Comment 8 Alexander Blanchard 2023-07-07 13:05:15 UTC
Created attachment 153178 [details] [review]
Bug 33893: Use template wrapper for tabs: OPAC checkout history

This patch updates the OPAC checkout history page so that it uses
the new WRAPPER syntax to generate tabs markup.

This patch also updates tab WRAPPER directives in html_helpers.inc to
allow us to pass a custom id for tab links in situations like this one
where we have multiple tabs requiring unique IDs but they all point to
the same panel.

To test, apply the patch and make sure the OnSiteCheckouts system
preference is set to "disabled."

- Log into the OPAC as a patron with checkouts.
- View the checkout history page. The checkout history information
  should be displayed without any tabs.
- Enable the OnSiteCheckouts system preference and if necessary check
  out some on-site checkouts to your patron.
- On the OPAC history page there should now be three tabs: All,
  Checkouts, and On-site checokuts.
  - Switching between the tabs should filter the table accordingly.
- Test that the changes to the tab wrapper have not broken tabs on other
  pages, e.g. bibliographic details or user summary.

Signed-off-by: AlexanderBlanchardAC <alexander.blanchard@ptfs-europe.com>
Comment 9 Katrin Fischer 2023-07-09 14:31:24 UTC
Welcome, Alexander :)
Comment 10 Katrin Fischer 2023-07-09 14:51:45 UTC
Created attachment 153224 [details] [review]
Bug 33893: Use template wrapper for tabs: OPAC checkout history

This patch updates the OPAC checkout history page so that it uses
the new WRAPPER syntax to generate tabs markup.

This patch also updates tab WRAPPER directives in html_helpers.inc to
allow us to pass a custom id for tab links in situations like this one
where we have multiple tabs requiring unique IDs but they all point to
the same panel.

To test, apply the patch and make sure the OnSiteCheckouts system
preference is set to "disabled."

- Log into the OPAC as a patron with checkouts.
- View the checkout history page. The checkout history information
  should be displayed without any tabs.
- Enable the OnSiteCheckouts system preference and if necessary check
  out some on-site checkouts to your patron.
- On the OPAC history page there should now be three tabs: All,
  Checkouts, and On-site checokuts.
  - Switching between the tabs should filter the table accordingly.
- Test that the changes to the tab wrapper have not broken tabs on other
  pages, e.g. bibliographic details or user summary.

Signed-off-by: AlexanderBlanchardAC <alexander.blanchard@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 11 Tomás Cohen Arazi 2023-07-11 11:52:10 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 12 Martin Renvoize 2023-07-18 10:08:28 UTC
Thanks for all the hard work!

Pushed to 23.05.x for the next release
Comment 13 Matt Blenkinsop 2023-07-18 14:15:06 UTC
Nice work everyone!

Pushed to oldstable for 22.11.x