From 365e6c38f52029e9c4464c277f81d1747b9cf9c5 Mon Sep 17 00:00:00 2001 From: Stephanie Leary Date: Wed, 19 Oct 2022 15:49:41 -0500 Subject: [PATCH] LP1948693 Migrate from NgbTabset to ngbNav Updates the deprecated NgbTabset components to ngbNav and adds directive for keyboard navigation. See https://gist.github.com/stephanieleary/800b9f2b1d9c08cc66d694daaa1788b9 for a quick guide to the markup changes involved. Screens to test: 1. /staff/acq/provider, right click an existing provider to show details tabs 2. /staff/admin/local/negative-balances 3. /staff/admin/local/action/survey, edit an existing survey, test Edit Survey and Q&A tabs 4. /staff/admin/server/actor/org_unit, note that Addresses tab has a second set of tabs underneath 5. /staff/admin/server/actor/org_unit_type, note that eg-tree has also changed here 6. /staff/admin/server/permission/grp_tree, choose a group to see tabs 7. /staff/admin/server/config/print_template 8. /staff/booking/create_reservation 9. /staff/booking/manage_reservations, filter reservations section 10. /staff/booking/return 11. /staff/cat/authority/browse 12. /staff/cat/vandelay/import and all import/export tabs 13. /staff/cat/bucket/record/view 14. /staff/catalog/search 15. /staff/circ/holds/pull-list, right click a hold, choose Show Hold Details, the tabs are at the bottom of the screen Test plan: Note that you cannot navigate tabbed interfaces using the tab key on your keyboard. Apply the patch, then visit the screens listed above. You should be able to use the tab key to move sequentially through all the tabs. Pressing Enter on an inactive tab should make it active, just as clicking it would. You should not be able to click or press Enter to activate a disabled tab. You should be able to move from the last tab in the list into the first focusable element in the active tab's content panel. If you spot a tab content panel that doesn't contain a focusable element (i.e. links or inputs), let me know; we have to set its tabindex attribute manually. If a tab panel contains a second set of tabs, these should work as well. Note on ARIA and roles: Note that neither Bootstrap 5 nor ng-bootstrap are currently following the ARIA Authoring Practices Guide for tabs with manual activation (the recommended pattern for tab panels with complicated content, like form inputs or data tables), which does not recommend sequential movement: https://www.w3.org/WAI/ARIA/apg/example-index/tabs/tabs-manual.html. Therefore, we aren't following this pattern either. We can revisit this and/or take it up with Bootstrap. For now, running axe DevTools on any screen with navs will show ARIA role errors on role="tab" attributes. We are using ng-bootstrap's default ARIA roles for tabs, but they are incorrect. I am trying to get traction on a pull request to change the problem in ng-bootstrap, but in the meantime, we are not using the automatic [roles] directive. Role attributes have been set explicitly on all tabs and their containing elements. Note on eg-tree CSS: In the Org Unit Type screens, there was previously some inline CSS related to eg-tree that was causing compiler errors. I have moved this to a separate CSS file, and will revisit eg-tree styles more generally in another upcoming project. Signed-off-by: Stephanie Leary Signed-off-by: Bill Erickson --- .../app/staff/acq/lineitem/detail.component.html | 14 ++--- .../staff/acq/provider/acq-provider.component.html | 62 +++++++++++-------- .../staff/acq/provider/acq-provider.component.ts | 6 +- .../app/staff/acq/search/acq-search.component.html | 18 +++--- .../staff/admin/acq/claiming-admin.component.html | 18 +++--- .../acq/funds/fund-details-dialog.component.html | 22 +++---- ...nding-source-transactions-dialog.component.html | 10 +-- .../app/staff/admin/acq/funds/funds.component.html | 14 ++--- .../local/cash-reports/cash-reports.component.html | 10 +-- .../circ_limit_set_edit.component.html | 10 +-- .../copy-loc-order/copy-loc-order.component.ts | 2 +- .../course-associate-material.component.html | 14 ++--- .../course-reserves/course-list.component.html | 14 ++--- .../course-reserves/course-page.component.html | 18 +++--- .../local/negative-balances/list.component.ts | 2 +- .../admin/local/survey/survey-edit.component.html | 20 +++--- .../admin/local/survey/survey-edit.component.ts | 4 +- .../local/triggers/trigger-edit.component.html | 22 +++---- .../admin/local/triggers/triggers.component.html | 18 +++--- .../app/staff/admin/server/org-addr.component.html | 47 +++++++------- .../app/staff/admin/server/org-addr.component.ts | 11 ++-- .../admin/server/org-unit-type.component.html | 6 +- .../staff/admin/server/org-unit-type.component.ts | 3 +- .../app/staff/admin/server/org-unit.component.css | 14 +++++ .../app/staff/admin/server/org-unit.component.html | 41 +++++++------ .../app/staff/admin/server/org-unit.component.ts | 12 ++-- .../admin/server/perm-group-tree.component.html | 21 ++++--- .../admin/server/perm-group-tree.component.ts | 6 ++ .../admin/server/print-template.component.html | 21 ++++--- .../staff/admin/server/print-template.component.ts | 6 +- .../booking/create-reservation.component.html | 46 +++++++------- .../staff/booking/create-reservation.component.ts | 5 +- .../booking/manage-reservations.component.html | 36 +++++------ .../staff/booking/manage-reservations.component.ts | 4 +- .../src/app/staff/booking/return.component.html | 21 ++++--- .../eg2/src/app/staff/booking/return.component.ts | 13 ++-- .../app/staff/cat/authority/manage.component.html | 22 ++++--- .../app/staff/cat/authority/manage.component.ts | 4 +- .../cat/vandelay/display-attrs.component.html | 20 +++--- .../staff/cat/vandelay/display-attrs.component.ts | 4 +- .../staff/cat/vandelay/match-set.component.html | 21 ++++--- .../app/staff/cat/vandelay/match-set.component.ts | 4 +- .../cat/vandelay/queued-record.component.html | 35 ++++++----- .../staff/cat/vandelay/queued-record.component.ts | 4 +- .../app/staff/cat/volcopy/volcopy.component.html | 14 ++--- .../app/staff/catalog/record/record.component.html | 71 +++++++++++++--------- .../app/staff/catalog/record/record.component.ts | 6 +- .../app/staff/catalog/search-form.component.css | 2 - .../app/staff/catalog/search-form.component.html | 42 +++++++------ .../src/app/staff/catalog/search-form.component.ts | 4 +- .../app/staff/circ/holds/pull-list.component.ts | 2 +- .../circ/item/event-log/event-log.component.html | 10 +-- .../circ/patron/bill-statement.component.html | 10 +-- .../circ/patron/billing-history.component.html | 10 +-- .../src/app/staff/circ/patron/edit.component.html | 10 +-- .../circ/patron/event-log/event-log.component.html | 10 +-- .../src/app/staff/circ/patron/holds.component.html | 10 +-- .../src/app/staff/circ/patron/items.component.html | 14 ++--- .../app/staff/circ/patron/patron.component.html | 30 ++++----- .../src/app/staff/circ/patron/perms.component.html | 10 +-- .../reporter/simple/simple-reporter.component.html | 10 +-- .../staff/reporter/simple/sr-editor.component.html | 18 +++--- .../share/buckets/bucket-dialog.component.html | 14 ++--- .../app/staff/share/holds/detail.component.html | 10 +-- .../staff/share/marc-edit/editor.component.html | 10 +-- Open-ILS/src/eg2/src/styles.css | 2 +- 66 files changed, 570 insertions(+), 474 deletions(-) create mode 100644 Open-ILS/src/eg2/src/app/staff/admin/server/org-unit.component.css diff --git a/Open-ILS/src/eg2/src/app/staff/acq/lineitem/detail.component.html b/Open-ILS/src/eg2/src/app/staff/acq/lineitem/detail.component.html index 386dfc160a..ed3ad66a6a 100644 --- a/Open-ILS/src/eg2/src/app/staff/acq/lineitem/detail.component.html +++ b/Open-ILS/src/eg2/src/app/staff/acq/lineitem/detail.component.html @@ -1,8 +1,8 @@
-