conkeyref - DITA Accessibility Best Practice?
Questions about XML that are not covered by the other forums should go here.
conkeyref - DITA Accessibility Best Practice?
I have a DITA best practice question. I'm using Font Icons defined in a key file to conkeyref the same icon used by the application I'm documenting, thus eliminating the need for icon screen captures.
My key file contains the following:
<uicontrol id="icon-user" outputclass="icon_icon-user"/>
My oXygen custom CSS has the following:
@font-face {
font-family: proliantIcons;
src: url(fonts/Proliant_v3.ttf);
}
[outputclass^="icon_"], [outputclass*= "icon_"] {
font-family: proliantIcons;
font-weight: normal;
font-style: normal;
text-decoration: inherit;
}
[outputclass*= "_icon-user"]:before {
content: "\e9a1";
font-family: proliantIcons;
}
And a command in my task topic pulls the font icon into my topic as follows:
<cmd>Select <uicontrol conkeyref="icons/icon-user"/> to enter payroll information for a single employee.</cmd>
Everything works great for getting the icon into a topic and getting that icon to publish to all necessary output types.
However, this solution does not produce accessible content because a screen reader does not have any text to fall back on when the font icon is encountred in the output. If I were using an image of the icon, I would simply include the hover text from the application as alt text.
I considered using a conkeyref to a ph element that includes the textual description of the icon, but that's not a great solution because this icon is used in multiple places in the application and the hover text is not the same in all uses.
Can anyone think of a best practice that I'm missing? I might be able to use otherprops in some way and customize a transform to write the string used in the attribute into my output as an attribute that a screen reader can recognize, but that does not feel like a sustainable approach.
Thank you so much for your help!
My key file contains the following:
<uicontrol id="icon-user" outputclass="icon_icon-user"/>
My oXygen custom CSS has the following:
@font-face {
font-family: proliantIcons;
src: url(fonts/Proliant_v3.ttf);
}
[outputclass^="icon_"], [outputclass*= "icon_"] {
font-family: proliantIcons;
font-weight: normal;
font-style: normal;
text-decoration: inherit;
}
[outputclass*= "_icon-user"]:before {
content: "\e9a1";
font-family: proliantIcons;
}
And a command in my task topic pulls the font icon into my topic as follows:
<cmd>Select <uicontrol conkeyref="icons/icon-user"/> to enter payroll information for a single employee.</cmd>
Everything works great for getting the icon into a topic and getting that icon to publish to all necessary output types.
- Sample DITA cmd element
- sample_cmd.png (4.47 KiB) Viewed 885 times
- hover text from application
- hover_text.png (4.12 KiB) Viewed 885 times
Can anyone think of a best practice that I'm missing? I might be able to use otherprops in some way and customize a transform to write the string used in the attribute into my output as an attribute that a screen reader can recognize, but that does not feel like a sustainable approach.
Thank you so much for your help!
Zak BInder
Director of Knowledge Engineering
zak.binder@proliant.com
Director of Knowledge Engineering
zak.binder@proliant.com
Re: conkeyref - DITA Accessibility Best Practice?
Hi Zak,
I do not have a good idea about how best to handle this.
From the accessibility point of view maybe you should consider moving to plain images and alternate text set on them instead of using characters which are rendered by a specific font in a specific way. I mean, even with the custom font you need to maintain it, add new glyphs to it. I just do not see why it would be better to use custom fonts than to use plain image references.
Maybe you can also write on the DITA Users List about this:
https://dita-users.groups.io/g/main
The Oxygen forum is a more static place, most people registered on the forum prefer to receive notifications only on the threads they started.
Regards,
Radu
I do not have a good idea about how best to handle this.
From the accessibility point of view maybe you should consider moving to plain images and alternate text set on them instead of using characters which are rendered by a specific font in a specific way. I mean, even with the custom font you need to maintain it, add new glyphs to it. I just do not see why it would be better to use custom fonts than to use plain image references.
Maybe you can also write on the DITA Users List about this:
https://dita-users.groups.io/g/main
The Oxygen forum is a more static place, most people registered on the forum prefer to receive notifications only on the threads they started.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Return to “General XML Questions”
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