Replace aria-labelledby in ToC with aria-label

Bug: T318178
Change-Id: I7abcc977276b979c5a515fbbcccf42d7c993a130
This commit is contained in:
bwang 2022-11-14 11:36:57 -06:00 committed by Bernard Wang
parent 43887fe6f9
commit f73d255810
2 changed files with 5 additions and 5 deletions

View file

@ -1,4 +1,4 @@
<nav id="mw-panel-toc" class="sidebar-toc" role="navigation" aria-labelledby="sidebar-toc-label" data-event-name="ui.sidebar-toc">
<nav id="mw-panel-toc" class="sidebar-toc" role="navigation" aria-label="{{ msg-vector-toc-heading }}" data-event-name="ui.sidebar-toc">
<div id="sidebar-toc-label" class="sidebar-toc-header">
<p class="sidebar-toc-title">
{{ msg-vector-toc-heading }}

View file

@ -1,12 +1,12 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`Table of contents re-rendering re-renders toc when wikipage.tableOfContents hook is fired with empty sections 1`] = `
"<nav id=\\"mw-panel-toc\\" class=\\"sidebar-toc\\" role=\\"navigation\\" aria-labelledby=\\"sidebar-toc-label\\" data-event-name=\\"ui.sidebar-toc\\"></nav>
"<nav id=\\"mw-panel-toc\\" class=\\"sidebar-toc\\" role=\\"navigation\\" aria-label=\\"Contents\\" data-event-name=\\"ui.sidebar-toc\\"></nav>
"
`;
exports[`Table of contents re-rendering re-renders toc when wikipage.tableOfContents hook is fired with sections 1`] = `
"<nav id=\\"mw-panel-toc\\" class=\\"sidebar-toc\\" role=\\"navigation\\" aria-labelledby=\\"sidebar-toc-label\\" data-event-name=\\"ui.sidebar-toc\\"><nav id=\\"mw-panel-toc\\" class=\\"sidebar-toc\\" role=\\"navigation\\" aria-labelledby=\\"sidebar-toc-label\\" data-event-name=\\"ui.sidebar-toc\\">
"<nav id=\\"mw-panel-toc\\" class=\\"sidebar-toc\\" role=\\"navigation\\" aria-label=\\"Contents\\" data-event-name=\\"ui.sidebar-toc\\"><nav id=\\"mw-panel-toc\\" class=\\"sidebar-toc\\" role=\\"navigation\\" aria-label=\\"Contents\\" data-event-name=\\"ui.sidebar-toc\\">
<div id=\\"sidebar-toc-label\\" class=\\"sidebar-toc-header\\">
<p class=\\"sidebar-toc-title\\">
Contents
@ -78,7 +78,7 @@ exports[`Table of contents re-rendering re-renders toc when wikipage.tableOfCont
`;
exports[`Table of contents renders when \`vector-is-collapse-sections-enabled\` is false 1`] = `
"<nav id=\\"mw-panel-toc\\" class=\\"sidebar-toc\\" role=\\"navigation\\" aria-labelledby=\\"sidebar-toc-label\\" data-event-name=\\"ui.sidebar-toc\\">
"<nav id=\\"mw-panel-toc\\" class=\\"sidebar-toc\\" role=\\"navigation\\" aria-label=\\"Contents\\" data-event-name=\\"ui.sidebar-toc\\">
<div id=\\"sidebar-toc-label\\" class=\\"sidebar-toc-header\\">
<p class=\\"sidebar-toc-title\\">
Contents
@ -141,7 +141,7 @@ exports[`Table of contents renders when \`vector-is-collapse-sections-enabled\`
`;
exports[`Table of contents renders when \`vector-is-collapse-sections-enabled\` is true 1`] = `
"<nav id=\\"mw-panel-toc\\" class=\\"sidebar-toc\\" role=\\"navigation\\" aria-labelledby=\\"sidebar-toc-label\\" data-event-name=\\"ui.sidebar-toc\\">
"<nav id=\\"mw-panel-toc\\" class=\\"sidebar-toc\\" role=\\"navigation\\" aria-label=\\"Contents\\" data-event-name=\\"ui.sidebar-toc\\">
<div id=\\"sidebar-toc-label\\" class=\\"sidebar-toc-header\\">
<p class=\\"sidebar-toc-title\\">
Contents