Why is Flare adding value attributes in outputs?

This forum is for all Flare issues related to the HTML5, WebHelp, WebHelp Plus, and Adobe Air Targets
Post Reply
chuck_agari
Sr. Propeller Head
Posts: 225
Joined: Wed May 30, 2018 2:40 pm

Why is Flare adding value attributes in outputs?

Post by chuck_agari »

Here is the original code:

Code: Select all

 <ol>
            <li>Go to <span class="UI_interaction">Admin > Users</span>.</li>
            <li>Click the name of a user.</li>
            <li>In the lower right, click the <span class="UI_interaction">Delete [username] entirely from...</span> link.</li>
            <li>Click <span class="UI_interaction">OK</span>.</li>
        </ol>
Simple, right?

Here is the output, and it is the same for both HTML5 and "Clean" XHTML:

Code: Select all

<ol>
            <li value="1">Go to <span class="UI_interaction">Admin > Users</span>.</li>
            <li value="2">Click the name of a user.</li>
            <li value="3">In the lower right, click the <span class="UI_interaction">Delete [username] entirely from...</span> link.</li>
            <li value="4">Click <span class="UI_interaction">OK</span>.</li>
        </ol>
The value attributes, of course, are entirely unnecessary and clutter up the code. Anyone know why MadCap is doing this?
doc_guy
Propellus Maximus
Posts: 1979
Joined: Tue Nov 28, 2006 11:18 am
Location: Crossroads of the West
Contact:

Re: Why is Flare adding value attributes in outputs?

Post by doc_guy »

They are unnecessary in your output because you built a clean list. However, not everybody builds clean lists. Sometimes they break the list and add an image and then restart the list and continue the numbering, or break the list and throw in a table and then continue the numbering. You'd be amazed at the way some people structure their content.

However, this presents an opportunity. It's not a native Flare feature, but I think you could use this to write some code that would let you refernence a specific step number in a list. (Like "repeat step 4 until all widgets have been added".) And it would dynamically get the step number from the value attribute. You'd just need to name the LI element... Anyway. I don't have a good answer to your question, just some ideas on why its there and how it could possibly be useful.
Paul Pehrson
My Blog

Image
chuck_agari
Sr. Propeller Head
Posts: 225
Joined: Wed May 30, 2018 2:40 pm

Re: Why is Flare adding value attributes in outputs?

Post by chuck_agari »

doc_guy wrote:They are unnecessary in your output because you built a clean list. However, not everybody builds clean lists. Sometimes they break the list and add an image and then restart the list and continue the numbering, or break the list and throw in a table and then continue the numbering. You'd be amazed at the way some people structure their content.

However, this presents an opportunity. It's not a native Flare feature, but I think you could use this to write some code that would let you reference a specific step number in a list. (Like "repeat step 4 until all widgets have been added".) And it would dynamically get the step number from the value attribute. You'd just need to name the LI element... Anyway. I don't have a good answer to your question, just some ideas on why its there and how it could possibly be useful.
You might think that it's true that I'd be amazed at the way people structure their content, but the truth is that I've spent so much time fixing such content from others over the years that I'm just resigned to the fact that it'll almost always be necessary when I'm given content authored by someone else. It's like they've never been trained in fundamental technical communication concepts. Oh, wait.....

When I want to add images or tables in lists, Flare often does not follow on automatically. I am often having to go into the code and "clean up" the intervening </ol><ol> tags that Flare "helpfully" adds. But this is not at all "helpful." Perhaps another example of no one being brave enough to say "No, that's a terrible idea to foist upon industry professionals" because in the modern workplace, no ideas are bad ideas?
ChoccieMuffin
Senior Propellus Maximus
Posts: 2630
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: Why is Flare adding value attributes in outputs?

Post by ChoccieMuffin »

chuck_agari wrote:...
When I want to add images or tables in lists, Flare often does not follow on automatically. I am often having to go into the code and "clean up" the intervening </ol><ol> tags that Flare "helpfully" adds. But this is not at all "helpful." Perhaps another example of no one being brave enough to say "No, that's a terrible idea to foist upon industry professionals" because in the modern workplace, no ideas are bad ideas?
The way to deal with that situation (where there are images in between bullet points) is to do it properly :lol: :wink: and include the image in its own paragraph as part of the li item it relates to, so you still only have a single list.
Started as a newbie with Flare 6.1, now using Flare 2023.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
chuck_agari
Sr. Propeller Head
Posts: 225
Joined: Wed May 30, 2018 2:40 pm

Re: Why is Flare adding value attributes in outputs?

Post by chuck_agari »

ChoccieMuffin wrote:
chuck_agari wrote:...
When I want to add images or tables in lists, Flare often does not follow on automatically. I am often having to go into the code and "clean up" the intervening </ol><ol> tags that Flare "helpfully" adds. But this is not at all "helpful." Perhaps another example of no one being brave enough to say "No, that's a terrible idea to foist upon industry professionals" because in the modern workplace, no ideas are bad ideas?
The way to deal with that situation (where there are images in between bullet points) is to do it properly :lol: :wink: and include the image in its own paragraph as part of the li item it relates to, so you still only have a single list.
Yup. I even have a CSS selector for <p> elements that are children of <li> elements.

Unfortunately, Flare does not do this correctly when you try to do in in the XML Editor, so anytime I need any block elements as part of a <li> element (images, tables, note and information <div>s, etc), I have to fix the code manually. Good thing I know what I'm doing in there.
NorthEast
Master Propellus Maximus
Posts: 6359
Joined: Mon Mar 05, 2007 8:33 am

Re: Why is Flare adding value attributes in outputs?

Post by NorthEast »

chuck_agari wrote:Unfortunately, Flare does not do this correctly when you try to do in in the XML Editor, so anytime I need any block elements as part of a <li> element (images, tables, note and information <div>s, etc), I have to fix the code manually. Good thing I know what I'm doing in there.
When you're in a list item (li), to add a paragraph (p) tag just press Ctrl+; or right-click the li tag and select Make Paragraph item(s).

Once you've inserted the paragraph, you can also change it to any block element (div, etc.) by selecting from the style list, or you can insert things like tables, snippets, or dropdowns.

It should be fairly rare that you have to go into the Text editor view to manually edit code in a list.
chuck_agari
Sr. Propeller Head
Posts: 225
Joined: Wed May 30, 2018 2:40 pm

Re: Why is Flare adding value attributes in outputs?

Post by chuck_agari »

Dave Lee wrote:
chuck_agari wrote:Unfortunately, Flare does not do this correctly when you try to do in in the XML Editor, so anytime I need any block elements as part of a <li> element (images, tables, note and information <div>s, etc), I have to fix the code manually. Good thing I know what I'm doing in there.
When you're in a list item (li), to add a paragraph (p) tag just press Ctrl+; or right-click the li tag and select Make Paragraph item(s).

Once you've inserted the paragraph, you can also change it to any block element (div, etc.) by selecting from the style list, or you can insert things like tables, snippets, or dropdowns.

It should be fairly rare that you have to go into the Text editor view to manually edit code in a list.
Hm, interesting tip.

I've tried to make a habit of not doing Shift-Enter to add lines just because I want CSS to properly style every block. Ctrl-Enter is a twist that I'll try out.
ChoccieMuffin
Senior Propellus Maximus
Posts: 2630
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: Why is Flare adding value attributes in outputs?

Post by ChoccieMuffin »

chuck_agari wrote:
Dave Lee wrote:
chuck_agari wrote:Unfortunately, Flare does not do this correctly when you try to do in in the XML Editor, so anytime I need any block elements as part of a <li> element (images, tables, note and information <div>s, etc), I have to fix the code manually. Good thing I know what I'm doing in there.
When you're in a list item (li), to add a paragraph (p) tag just press Ctrl+; or right-click the li tag and select Make Paragraph item(s).

Once you've inserted the paragraph, you can also change it to any block element (div, etc.) by selecting from the style list, or you can insert things like tables, snippets, or dropdowns.

It should be fairly rare that you have to go into the Text editor view to manually edit code in a list.
Hm, interesting tip.

I've tried to make a habit of not doing Shift-Enter to add lines just because I want CSS to properly style every block. Ctrl-Enter is a twist that I'll try out.
Chuck, it's Ctrl + semi-colon, not Ctrl+Enter. What that does is change the structure from ol > li to ol > li > p. When you then press Enter, you have two p's inside your li, so you can indeed use styles properly. Give it a go, or try the clicky stuff Dave described: "right-click the li tag [in the structure bar at the left of the screen] and select Make Paragraph item(s)."

Let us know how you get on.
Started as a newbie with Flare 6.1, now using Flare 2023.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
mafra1
Jr. Propeller Head
Posts: 9
Joined: Tue Jun 04, 2013 4:00 am

Re: Why is Flare adding value attributes in outputs?

Post by mafra1 »

Hi, jumping in on this thread and hope it is still alive :)

The value attribute is also added to li items in unordered (ul) lists, and this is not applicable and violates the syntax according to https://validator.w3.org.
Is this a known issue to MadCap, and if so will you correct it?

/magnus
NorthEast
Master Propellus Maximus
Posts: 6359
Joined: Mon Mar 05, 2007 8:33 am

Re: Why is Flare adding value attributes in outputs?

Post by NorthEast »

mafra1 wrote:Hi, jumping in on this thread and hope it is still alive :)

The value attribute is also added to li items in unordered (ul) lists, and this is not applicable and violates the syntax according to https://validator.w3.org.
Is this a known issue to MadCap, and if so will you correct it?

/magnus
I'd suggest you report a bug to MadCap.

This is a peer-to-peer forum, so don't expect a response from MadCap here.
ChoccieMuffin
Senior Propellus Maximus
Posts: 2630
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: Why is Flare adding value attributes in outputs?

Post by ChoccieMuffin »

mafra1 wrote:Hi, jumping in on this thread and hope it is still alive :)

The value attribute is also added to li items in unordered (ul) lists, and this is not applicable and violates the syntax according to https://validator.w3.org.
Is this a known issue to MadCap, and if so will you correct it?

/magnus
Are you importing from Word, by any chance? These value attributes are added in lists if you do a Word import. This is standard behaviour, because Word is rubbish in dealing with lists, so you then need to go through and tidy up. I have a series of search-and-replace scripts that do this for me when I run one of my automatic scripts to import from Word docs, so if you do it often, you might want to look into preparing something similar. If you only occasionally import from Word then just tidying up manually in Flare might be easier.
Started as a newbie with Flare 6.1, now using Flare 2023.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
NorthEast
Master Propellus Maximus
Posts: 6359
Joined: Mon Mar 05, 2007 8:33 am

Re: Why is Flare adding value attributes in outputs?

Post by NorthEast »

This is talking about value attributes in the output, not the source in Flare.
Value attributes are added to list items (li tags) in the output for all HTML5 targets.
ChoccieMuffin
Senior Propellus Maximus
Posts: 2630
Joined: Wed Apr 14, 2010 8:01 am
Location: Surrey, UK

Re: Why is Flare adding value attributes in outputs?

Post by ChoccieMuffin »

Dave Lee wrote:This is talking about value attributes in the output, not the source in Flare.
Value attributes are added to list items (li tags) in the output for all HTML5 targets.
D'oh! :oops:

Cheers, Dave!
Started as a newbie with Flare 6.1, now using Flare 2023.
Report bugs at http://www.madcapsoftware.com/bugs/submit.aspx.
Request features at https://www.madcapsoftware.com/feedback ... quest.aspx
mafra1
Jr. Propeller Head
Posts: 9
Joined: Tue Jun 04, 2013 4:00 am

Re: Why is Flare adding value attributes in outputs?

Post by mafra1 »

Ok thanks, then I think Flare has a bug as it is not applicable to add that to li tags belonging to an ul, unordered list.
When you validate with https://validator.w3.org you get errors for this.

source, for instance: https://www.geeksforgeeks.org/html-li-value-attribute/
Post Reply