diff --git a/extensions/odoo_theme/static/js/page_toc.js b/extensions/odoo_theme/static/js/page_toc.js index 14678d703..7f972d6d4 100644 --- a/extensions/odoo_theme/static/js/page_toc.js +++ b/extensions/odoo_theme/static/js/page_toc.js @@ -16,8 +16,7 @@ // Allow to automatically collapse and expand TOC entries _prepareAccordion(pageToc); - // Allow to respectively highlight and expand the TOC entries and their related TOC - // entry list whose section is focused. + // Highlight TOC entries whose section is focused and expand their TOC entry list. _flagActiveTocEntriesAndLists(pageToc, headingRefs); // Allow to hide the TOC entry referring the title (

heading) @@ -98,6 +97,12 @@ // Highlight all
  • in the active hierarchy tocEntry.classList.add('o_active_toc_entry'); + // Update the attributes on the . + const tocEntryWrapper = tocEntry.querySelector('.o_toc_entry_wrapper'); + if (tocEntryWrapper) { + tocEntryWrapper.querySelector('i').setAttribute('aria-expanded', true); + } + // Expand all related
      const relatedTocEntryList = tocEntry.querySelector('ul'); if (relatedTocEntryList) {