Tell us about your environment
What did you do? Please include the actual source code causing the issue.
Is the current behaviour of header indexing in panels intended?
When there is no header specified, and there is a slot="header" specified with some level of markdown heading inside, there are two cases:
expanded is specified : the heading is indexed, as expected, but there are now two identical ids in the dom (one for the cardContainer, the other from the slot. ( not that its really an issue ) ( point 1 )
expanded is not specified: the slot heading is not indexed ( This leads to point 2 below ), and there are still two identical ids.
On the other hand, if a header is specified for the panel, then the code to search for another header in the headerWrapper will not execute ( second branch in mounted() ).
mounted() in PanelBase.js
...
} else if (this.$refs.headerWrapper.innerHTML) {
const header = jQuery(this.$refs.headerWrapper.innerHTML).wrap('<div</div>').parent().find(':header');
if (header.length > 0) {
this.$refs.cardContainer.setAttribute('id', header[0].id);
}
}
- If said
header is not a md header ( ### ... ), then the code will not execute ( with no implications, as far as I can see ) ( point 1 )
- The behaviour for the
slot header is similar to above, barring the duplicate id ( since the second branch in mounted() is no longer executed ).
- if
unexpanded, the heading will not be indexed
- if
expanded is specified, and the header="..." is a valid md header, then the slot header, along with the overwritten header are indexed. ( point 3 )
What did you expect to happen?
- It seems that the second branch is unnecessary, and it would only result in a duplicate id currently. ( I might be missing something )
Sample code producing the issue ( no header attribute, so the second branch is executed ):
<panel type="info">
<div slot="header">
# some header
</div>
.........
</panel>
Result (duplicate ids) (removing the second branch in mounted() only removes the id from the cardContainer, which dosen't break the anchor since there is still one in the heading.

- The slot heading is not indexed when
expanded is not specified.
Result from the same code for point 1: ( adding expanded resolves it )

- The overwritten
header is indexed along with the slot header. Should the hidden header="..." be indexed in this case?
Sample code producing the issue: ( only the slot header is displayed since it takes priority, but both are indexed as seen in the second screenshot )
<panel type="info" header="# another header" expanded>
<div slot="header">
# some header
</div>
.........
</panel>

Tell us about your environment
What did you do? Please include the actual source code causing the issue.
Is the current behaviour of header indexing in panels intended?
When there is no
headerspecified, and there is aslot="header"specified with some level of markdown heading inside, there are two cases:expandedis specified : the heading is indexed, as expected, but there are now two identicalidsin the dom (one for thecardContainer, the other from theslot. ( not that its really an issue ) ( point 1 )expandedis not specified: the slot heading is not indexed ( This leads to point2below ), and there are still two identicalids.On the other hand, if a
headeris specified for thepanel, then the code to search for another header in theheaderWrapperwill not execute ( second branch inmounted()).mounted()in PanelBase.jsheaderis not a md header (### ...), then the code will not execute ( with no implications, as far as I can see ) ( point 1 )slot headeris similar to above, barring the duplicateid( since the second branch inmounted()is no longer executed ).unexpanded, the heading will not be indexedexpandedis specified, and theheader="..."is a valid md header, then the slot header, along with the overwrittenheaderare indexed. ( point 3 )What did you expect to happen?
Sample code producing the issue ( no
headerattribute, so the second branch is executed ):Result (duplicate ids) (removing the second branch in
mounted()only removes the id from the cardContainer, which dosen't break the anchor since there is still one in the heading.expandedis not specified.Result from the same code for point 1: ( adding

expandedresolves it )headeris indexed along with theslot header. Should the hiddenheader="..."be indexed in this case?Sample code producing the issue: ( only the slot header is displayed since it takes priority, but both are indexed as seen in the second screenshot )