fix(menu_item): use item title for id if there's no path
-
Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA. As a benefit of being a GitLab Community Contributor, you receive complimentary access to GitLab Duo.
Resolves #2006 (closed)
Some nav categories on the doc site don't have standalone pages (so, no path
value in nav.json
). As a result, the itemId
is item-undefined
for a number of nested menu id
s and their corresponding aria-controls
attributes.
This change will use the category's title to create a unique itemId
for the category's menu_item
if there isn't a value for path
coming from nav.json
for that given category.
I also updated the sidebar snapshot test to reflect this change.
Edited by 🤖 GitLab Bot 🤖