Webhelp Common - menucascade produces <abbr>
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 167
- Joined: Tue Mar 06, 2018 1:34 am
Webhelp Common - menucascade produces <abbr>
Using Oxygen 19.1 with the WebHelp Classic transformation.
Using MENUCASCADE with a series of UICONTROLs, such as:
<step>
<cmd>Select
<menucascade>
<uicontrol>Menu1</uicontrol>
<uicontrol>Menu2</uicontrol>
</menucascade>.</cmd>
</step>
produces HTML with an ABBR element:
<span class="ph cmd">
Select
<span class="ph menucascade">
<span class="ph uicontrol">Menu1</span>
<abbr title="and then"> > </abbr>
<span class="ph uicontrol">Menu2</span>
</span>
The fact that the ABBR has a title attribute puts a silly-looking dashed underline beneath the greater-than symbol in both Chrome and Firefox.
I have searched the entire plugin looking for what is responsible for setting this attribute, but I can't find it. Can anyone tell me where I can go to change it?
Using MENUCASCADE with a series of UICONTROLs, such as:
<step>
<cmd>Select
<menucascade>
<uicontrol>Menu1</uicontrol>
<uicontrol>Menu2</uicontrol>
</menucascade>.</cmd>
</step>
produces HTML with an ABBR element:
<span class="ph cmd">
Select
<span class="ph menucascade">
<span class="ph uicontrol">Menu1</span>
<abbr title="and then"> > </abbr>
<span class="ph uicontrol">Menu2</span>
</span>
The fact that the ABBR has a title attribute puts a silly-looking dashed underline beneath the greater-than symbol in both Chrome and Firefox.
I have searched the entire plugin looking for what is responsible for setting this attribute, but I can't find it. Can anyone tell me where I can go to change it?
-
- Posts: 222
- Joined: Tue Jul 01, 2014 11:48 am
Re: Webhelp Common - menucascade produces <abbr>
Post by bogdan_cercelaru »
Hello,
By default, browsers are rendering the <abbr /> elements with a dotted underline. The underline tells readers that the word in question has extra information associated with it. More information can be found here: https://developer.mozilla.org/en-US/doc ... d_Acronyms
To remove the dotted underline, you should use the following CSS:
Regards,
Bogdan
By default, browsers are rendering the <abbr /> elements with a dotted underline. The underline tells readers that the word in question has extra information associated with it. More information can be found here: https://developer.mozilla.org/en-US/doc ... d_Acronyms
To remove the dotted underline, you should use the following CSS:
Code: Select all
abbr, abbr[title] {
text-decoration: none;
border-bottom: none;
}
Bogdan
Bogdan Cercelaru
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
-
- Posts: 167
- Joined: Tue Mar 06, 2018 1:34 am
Re: Webhelp Common - menucascade produces <abbr>
OK, that works. Thanks.
Still, for my own knowledge, can you tell me where in the DITA Plugin this code is generated:
What if I wanted to change the TITLE attribute of the ABBR element?
Still, for my own knowledge, can you tell me where in the DITA Plugin this code is generated:
Code: Select all
<abbr title="and then"> > </abbr>
-
- Posts: 222
- Joined: Tue Jul 01, 2014 11:48 am
Re: Webhelp Common - menucascade produces <abbr>
Post by bogdan_cercelaru »
Hello,
The ">" character and the "and then" title are generated by the following template: found in the "DITA_OT_DIR/plugins/org.dita.xhtml/xsl/xslhtml/ui-d.xsl" file and are collected from the localization files ("DITA_OT_DIR\xsl\common\strings-en-us.xml" file for english).
If you only want to change the character inserted as a separator and / or the value of the "title" attribute, you could just change these in the corresponding localization files.
Regards,
Bogdan
The ">" character and the "and then" title are generated by the following template:
Code: Select all
<xsl:template match="*[contains(@class,' ui-d/uicontrol ')]" name="topic.ui-d.uicontrol">
<!-- insert an arrow with leading/trailing spaces before all but the first uicontrol in a menucascade -->
<xsl:if test="ancestor::*[contains(@class,' ui-d/menucascade ')]">
<xsl:variable name="uicontrolcount"><xsl:number count="*[contains(@class,' ui-d/uicontrol ')]"/></xsl:variable>
<xsl:if test="$uicontrolcount>'1'">
<xsl:variable name="a11y.text" as="text()?">
<xsl:call-template name="getVariable">
<xsl:with-param name="id" select="'a11y.and-then'"/>
</xsl:call-template>
</xsl:variable>
<abbr>
<xsl:if test="exists($a11y.text)">
<xsl:attribute name="title" select="$a11y.text"/>
</xsl:if>
<xsl:call-template name="getVariable">
<xsl:with-param name="id" select="'#menucascade-separator'"/>
</xsl:call-template>
</abbr>
</xsl:if>
</xsl:if>
<span class="uicontrol">
<xsl:call-template name="commonattributes"/>
<xsl:call-template name="setidaname"/>
<xsl:apply-templates/>
</span>
</xsl:template>
If you only want to change the character inserted as a separator and / or the value of the "title" attribute, you could just change these in the corresponding localization files.
Regards,
Bogdan
Bogdan Cercelaru
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
Return to “DITA (Editing and Publishing DITA Content)”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service