Forum How do I...?

How to apply alternate text in any tag element?

phillipleung
Will anyone know how to apply alternate text in any tag element? For example:

<p>say something <span aria-label="number of cells">no. of cells</span></p>
mikeday
We may need to add a CSS property for this, we will investigate.
phillipleung
Thanks. Mike.
mikeday
The latest build supports a new property:

prince-alt-text: auto | none | <string>

You could use this with attr(aria-label) to apply the alternate text.
phillipleung
Excellent. Thanks Mike.
dauwhe
Why wouldn't this example be

<p>say something <abbr title="number">no.</abbr> of cells</span></p>
phillipleung
I may use not the best example.

Here is the example:

<th>No. of cells</th>

in JAWS, we can use aria-label, like:
<th aria-label="Number of cells">No. of cells</th>

in PDF, the only way to accommodate is adding the "alternate text" as "Number of cells"

There are lots of place in the document that we want to apply "alternate text". And PrinceXML doesn't have a way to apply contents to "alternate text". By using "prince-alt-text", we can apply "alternate text" any place that is needed. Mike's solution will be the best fit for all situation, like assigned from aria-label or title.
mikeday
The latest build also supports a new prince-expansion-text property, for abbr and acronym! :D