ARIA attributes for reading alternative text (e.g. Roman Numerals) in HTML

In my HTML document, I use Roman numbers (ex: MMXV = 2015).

Is there a way to inform screen readers to interpret a particular text differently (for example: Roman numerals like “Two thousand and fifteen” instead of MMXV)?

I assumed there would be an ARIA attribute, but I cannot find it. For example:.

<time datetime="2015" aria-?="Two thousand and fifteen">MMXV</time> 
+7
html5 accessibility wai-aria
source share
2 answers

Use the aria-label tag to give elements a meaningful description.

Then hide the Roman numerals from the screen readers by wrapping them in a span element whose aria-hidden property is set to true to hide the element from screen readers.

 <time datetime="2015" aria-label="Two thousand and fifteen"> <span aria-hidden="true">MMXV</span> </time> 
+6
source share

Good with unobf's answer, but you should also bear in mind that if using aria-label improves accessibility for people using screen readers, it will not increase accessibility for everyone.

You should read paragraph 3.1.4 on WCAG abbreviations.

My feeling about this is that Roman numerals are a difficult thing to deal with if you really want to be accessible, and not just for the blind. For example, using the ABBR tag can help people without reading the firmware, but the ABBR tag is not an element with the ability to focus with the keyboard (see Section 2.1.1), therefore there is no unique solution to the problem.

0
source share

All Articles