Copy link to clipboard
Copied
RH 2022.3.93
Frameless output
---
Just a heads-up for people who use bookmarks in dropdowns: do not start bookmark IDs with a number in a dropdown. If you make a link to a bookmark starting with a number and click on the link, you will be directed to the general topic but the dropdown will fail to expand.
e.g. in topic B you have a dropdown with two bookmarks:
<p><a class="dropspot" data-rhwidget="DropSpot" data-target="drop-down" href="#">dropdownz</a></p>
<div class="droptext" data-targetname="drop-down">
<p><a id="test1"></a>test1</p>
<p><a id="1test"></a>1test</p>
</div>
Create a topic A and add links to both bookmarks (hyperlinks or crossrefs both exhibit the same problem).
The first link will successfully auto-open the dropdown, the second will not.
Copy link to clipboard
Copied
Sounds a bit like a bug - shouldn't make any difference what it starts with (special characters excepted, I imagine). Maybe you should log it with the Tracker (https://tracker.adobe.com/)?
Copy link to clipboard
Copied
In HTML4 'name' and 'id' couldn't begin with a number.
"ID and NAME tokens must begin with a letter ([A-Za-z]) and may be followed by any number of letters, digits ([0-9]), hyphens ("-"), underscores ("_"), colons (":"), and periods (".")."
In HTML the only requirements are they must not contain white space, cannot be empty and must be unique to the page.
However, MDN still recommends not starting an id with a letter (and sticking with only letters, digits, _ and - ).
https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id
Copy link to clipboard
Copied
To clarify, I'm talking about the html specs here. The first paragraph is about the HTML4 spec and the second paragraph is about the HTML5 spec.