]> git.evergreen-ils.org Git - working/Evergreen.git/commit
LP1948693 Migrate from NgbTabset to ngbNav
authorStephanie Leary <stephanie.leary@equinoxOLI.org>
Wed, 19 Oct 2022 20:49:41 +0000 (15:49 -0500)
committerBill Erickson <berickxx@gmail.com>
Mon, 26 Dec 2022 15:13:40 +0000 (10:13 -0500)
commit365e6c38f52029e9c4464c277f81d1747b9cf9c5
tree34bd0108636bab7658e3ec514cf65fd33e19c7b7
parent8326611f8dc232dda993dca412e429713189999a
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 <stephanie.leary@equinoxOLI.org>
Signed-off-by: Bill Erickson <berickxx@gmail.com>
66 files changed:
Open-ILS/src/eg2/src/app/staff/acq/lineitem/detail.component.html
Open-ILS/src/eg2/src/app/staff/acq/provider/acq-provider.component.html
Open-ILS/src/eg2/src/app/staff/acq/provider/acq-provider.component.ts
Open-ILS/src/eg2/src/app/staff/acq/search/acq-search.component.html
Open-ILS/src/eg2/src/app/staff/admin/acq/claiming-admin.component.html
Open-ILS/src/eg2/src/app/staff/admin/acq/funds/fund-details-dialog.component.html
Open-ILS/src/eg2/src/app/staff/admin/acq/funds/funding-source-transactions-dialog.component.html
Open-ILS/src/eg2/src/app/staff/admin/acq/funds/funds.component.html
Open-ILS/src/eg2/src/app/staff/admin/local/cash-reports/cash-reports.component.html
Open-ILS/src/eg2/src/app/staff/admin/local/circ_limit_set/circ_limit_set_edit.component.html
Open-ILS/src/eg2/src/app/staff/admin/local/copy-loc-order/copy-loc-order.component.ts
Open-ILS/src/eg2/src/app/staff/admin/local/course-reserves/course-associate-material.component.html
Open-ILS/src/eg2/src/app/staff/admin/local/course-reserves/course-list.component.html
Open-ILS/src/eg2/src/app/staff/admin/local/course-reserves/course-page.component.html
Open-ILS/src/eg2/src/app/staff/admin/local/negative-balances/list.component.ts
Open-ILS/src/eg2/src/app/staff/admin/local/survey/survey-edit.component.html
Open-ILS/src/eg2/src/app/staff/admin/local/survey/survey-edit.component.ts
Open-ILS/src/eg2/src/app/staff/admin/local/triggers/trigger-edit.component.html
Open-ILS/src/eg2/src/app/staff/admin/local/triggers/triggers.component.html
Open-ILS/src/eg2/src/app/staff/admin/server/org-addr.component.html
Open-ILS/src/eg2/src/app/staff/admin/server/org-addr.component.ts
Open-ILS/src/eg2/src/app/staff/admin/server/org-unit-type.component.html
Open-ILS/src/eg2/src/app/staff/admin/server/org-unit-type.component.ts
Open-ILS/src/eg2/src/app/staff/admin/server/org-unit.component.css [new file with mode: 0644]
Open-ILS/src/eg2/src/app/staff/admin/server/org-unit.component.html
Open-ILS/src/eg2/src/app/staff/admin/server/org-unit.component.ts
Open-ILS/src/eg2/src/app/staff/admin/server/perm-group-tree.component.html
Open-ILS/src/eg2/src/app/staff/admin/server/perm-group-tree.component.ts
Open-ILS/src/eg2/src/app/staff/admin/server/print-template.component.html
Open-ILS/src/eg2/src/app/staff/admin/server/print-template.component.ts
Open-ILS/src/eg2/src/app/staff/booking/create-reservation.component.html
Open-ILS/src/eg2/src/app/staff/booking/create-reservation.component.ts
Open-ILS/src/eg2/src/app/staff/booking/manage-reservations.component.html
Open-ILS/src/eg2/src/app/staff/booking/manage-reservations.component.ts
Open-ILS/src/eg2/src/app/staff/booking/return.component.html
Open-ILS/src/eg2/src/app/staff/booking/return.component.ts
Open-ILS/src/eg2/src/app/staff/cat/authority/manage.component.html
Open-ILS/src/eg2/src/app/staff/cat/authority/manage.component.ts
Open-ILS/src/eg2/src/app/staff/cat/vandelay/display-attrs.component.html
Open-ILS/src/eg2/src/app/staff/cat/vandelay/display-attrs.component.ts
Open-ILS/src/eg2/src/app/staff/cat/vandelay/match-set.component.html
Open-ILS/src/eg2/src/app/staff/cat/vandelay/match-set.component.ts
Open-ILS/src/eg2/src/app/staff/cat/vandelay/queued-record.component.html
Open-ILS/src/eg2/src/app/staff/cat/vandelay/queued-record.component.ts
Open-ILS/src/eg2/src/app/staff/cat/volcopy/volcopy.component.html
Open-ILS/src/eg2/src/app/staff/catalog/record/record.component.html
Open-ILS/src/eg2/src/app/staff/catalog/record/record.component.ts
Open-ILS/src/eg2/src/app/staff/catalog/search-form.component.css
Open-ILS/src/eg2/src/app/staff/catalog/search-form.component.html
Open-ILS/src/eg2/src/app/staff/catalog/search-form.component.ts
Open-ILS/src/eg2/src/app/staff/circ/holds/pull-list.component.ts
Open-ILS/src/eg2/src/app/staff/circ/item/event-log/event-log.component.html
Open-ILS/src/eg2/src/app/staff/circ/patron/bill-statement.component.html
Open-ILS/src/eg2/src/app/staff/circ/patron/billing-history.component.html
Open-ILS/src/eg2/src/app/staff/circ/patron/edit.component.html
Open-ILS/src/eg2/src/app/staff/circ/patron/event-log/event-log.component.html
Open-ILS/src/eg2/src/app/staff/circ/patron/holds.component.html
Open-ILS/src/eg2/src/app/staff/circ/patron/items.component.html
Open-ILS/src/eg2/src/app/staff/circ/patron/patron.component.html
Open-ILS/src/eg2/src/app/staff/circ/patron/perms.component.html
Open-ILS/src/eg2/src/app/staff/reporter/simple/simple-reporter.component.html
Open-ILS/src/eg2/src/app/staff/reporter/simple/sr-editor.component.html
Open-ILS/src/eg2/src/app/staff/share/buckets/bucket-dialog.component.html
Open-ILS/src/eg2/src/app/staff/share/holds/detail.component.html
Open-ILS/src/eg2/src/app/staff/share/marc-edit/editor.component.html
Open-ILS/src/eg2/src/styles.css