UPDATE: See next post (viewtopic.php?f=12&t=5968&p=145639#p145639)
Nita and all,
I took another look at that whole reference step numbers and accessibility thing.
As far as I saw, at least any li tags with MadCap Autonumbering directly attached to them are converted to tables in the output in my Flare 2022r2 installation, resulting in ols and uls with tables instead of li tags.
(UPDATE: After further investigation, whether or not a table is created for the autonumbering and the following content seems to depend on the mc-auto-number-position. Still, the following solution works with
mc-auto-number-position: outside-head; . Probably it could be adapted to inside-head but it would not make much difference, afai see right now.)
So, since I anyway want paragraphs in the li tags, I build on your styles, Nita, and adapted them in the following way to make them hopefully nicely usable for MC cross references and at the same time hopefully accessible as normal html lists:
Preview from Flare's XML Editor:
In the XML Editor.png
Preview from the Output:
In the Output.png
CSS Code:
Code: Select all
ol.StepNum
{
}
ol.StepNum > li > p:first-child
{
mc-auto-number-format: 'X:Step {n+}. ';
mc-auto-number-position: outside-head;
mc-auto-number-offset: 0px;
mc-auto-number-class: StepNum;
}
ol.StepNum > li > table
{
margin-left: -150vw !important;
margin-top: 1.5rem;
float: left;
}
ol.StepNum > li > table > tbody > tr > td:nth-child(2)
{
display: none;
}
ol.StepNum > li:first-child > p:first-child
{
mc-auto-number-format: 'X:Step {n=1}. ';
}
span.StepNum
{
color: red;
font-weight: bold;
}
MadCap|xref.Step
{
mc-format: '{paranumonly}';
}
The html code in Flare's Text Editor should look something like this:
Code: Select all
<ol class="StepNum">
<li>
<p MadCap:autonum="Step 1. "> </p>
<p>Get a cat.</p>
</li>
<li>
<p MadCap:autonum="Step 2. "><a name="win_lottery"> </a>
</p>
<p>Win the lottery.</p>
</li>
<li>
<p MadCap:autonum="Step 3. "> </p>
<p>Get a dog.</p>
</li>
<li>
<p MadCap:autonum="Step 4. "> </p>
<p>Repeat, especially <MadCap:xref href="#win_lottery" class="Step">Step 2</MadCap:xref>.</p>
</li>
</ol>
The trick is that the first p item in each li should only contain the MadCap:autonum attributes and a potential bookmark, if the list item should be referenced / linked to.
"Normal" list numbering and MC autonumbering are incremented separately but parallel to each other. In the Flare XML Editor the first p tag can be used to check if both numbers are incremented in the same way.
The actual content of each list item starts with its 2nd p tag!
When adding new p tags, the XML Editor needs some F5-refresh-love quite often to update the visual representation of the MC autonumbering. Don't let yourself get confused at first. It does work fine.
In the output, each first p tag is transferred into a table but the li tags stay li tags. The styles move these tables out of the screen but leave any bookmarks intact since they are needed for linking to that spot.
Hope, it makes some sense. Maybe I overlooked something. Anyone who finds errors or has ideas for improvement, please contribute. Thank you!
Regards, a.
You do not have the required permissions to view the files attached to this post.