conkeyref - DITA Accessibility Best Practice?

Questions about XML that are not covered by the other forums should go here.
zbinder
Posts: 2
Joined: Wed Jan 05, 2022 5:54 pm

conkeyref - DITA Accessibility Best Practice?

Post by zbinder »

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.
Sample DITA cmd element
Sample DITA cmd element
sample_cmd.png (4.47 KiB) Viewed 625 times
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.
hover text from application
hover text from application
hover_text.png (4.12 KiB) Viewed 625 times
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!
Zak BInder
Director of Knowledge Engineering
zak.binder@proliant.com
Radu
Posts: 9046
Joined: Fri Jul 09, 2004 5:18 pm

Re: conkeyref - DITA Accessibility Best Practice?

Post by Radu »

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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply