diff --git a/module/finc/src/finc/RecordTab/HierarchyTree.php b/module/finc/src/finc/RecordTab/HierarchyTree.php index 315b773894fe50aa0da87b36fdf6c63318eb1ae9..56133533858816cab39174a1e310b1cf762716c5 100644 --- a/module/finc/src/finc/RecordTab/HierarchyTree.php +++ b/module/finc/src/finc/RecordTab/HierarchyTree.php @@ -67,4 +67,15 @@ class HierarchyTree extends \VuFind\RecordTab\HierarchyTree } return false; } + + /** + * Can this tab be loaded via AJAX? + * + * @return bool + */ + public function supportsAjax() + { + // No, special width adjustment needed. + return true; + } } diff --git a/themes/finc-accessibility/js/record.js b/themes/finc-accessibility/js/record.js index 9766867212c7524e3ed39a0a6eac7c250fc27d76..26da27f6f5f484bf429a4eab12162fc12bf15de8 100644 --- a/themes/finc-accessibility/js/record.js +++ b/themes/finc-accessibility/js/record.js @@ -274,6 +274,8 @@ function recordDocReady() { // accessibility: mark tab controls as selected $top.find('.record-tab.active').find('a').attr('aria-selected', 'false'); + // accessibility: set information about connection between tab control and tab content + $(this).attr('aria-controls', tabid); $('#' + tabid + '-tabselector').attr('aria-selected', 'true').attr('aria-controls', tabid); // accessibility: set aria-hidden for content panes diff --git a/themes/finc/templates/record/view.phtml b/themes/finc/templates/record/view.phtml index 3749c2121c6fc81e1f807f1b38c5e40014cb3a48..076ef6fb512970578a5aac9a2f531bdacdc6a6c8 100644 --- a/themes/finc/templates/record/view.phtml +++ b/themes/finc/templates/record/view.phtml @@ -71,7 +71,7 @@ <a href="<?= $this->recordLink()->getTabUrl($this->driver, $tab) ?>#tabnav" <?php if ($obj->supportsAjax() && in_array($tab, $this->backgroundTabs)): ?> data-background<?php endif ?> aria-selected="<?= $isActiveTab ? "true" : "false" ?>" - aria-controls="<?= $tabName ?>" + <?php if($isActiveTab): ?>aria-controls="<?= $tabName ?>"<?php endif; ?> id="<?= $tabName ?>-tabselector"> <?= $this->transEsc($desc) ?> <span class="sr-only load-tab-content"><?= $this->transEsc('load_tab_content_hint') ?></span></a>