An interesting parallel discussion in WEB AIM where somebody wanted to make 
sure “N” followed by “E” would be pronounced as separate characters. 

Who things to notice here:
1. the quoted word in Voice Over (El Capitan ) is spelled out.
2. The technique of inserting pseudo elements with ARIA into the middle of a 
stream of characters.
—


Hi,
As others have already pointed out, I don't recommend this except in some very 
rare circumstances.

ARIA was mentioned as a fix for this, but the recommended ways of doing this 
may be problematic across various platforms where support levels differ, so 
here is one that works more reliably.

The trick here is to use aria-owns to change the accessibility tree without 
impacting the DOM, like so. This changes "BEG" to "B E G", however it has no 
impact on the DOM or the styling of the visible text.

<b aria-owns="space1">B</b><b aria-owns="space2">E</b><b>G</b>

Then the following can be appended to the end of the body element so nobody 
will notice it.

<i><b id="space1">&nbsp;</b><b id="space2">&nbsp;</b></i>

This appends a space character at the end of the B and E letters in the 
accessibility tree, and this is what causes the separation to occur between 
them.

A few notes about this: Unlike other ARIA attributes like aria-labelledby or 
aria-describedby which can reference hidden elements, aria-owns doesn't work 
like this and won't render hidden elements. Also this technique should never be 
used on elements that don't support children like IMG elements or input 
elements, because this forces the accessibility tree to change and any content 
that is referenced like this will disappear and become impossible to navigate 
and interact with normally. Also using this method should never be used to move 
focusable interactive elements around because this does not change the tab 
order. The use of aria-owns cannot reference the same ID from different 
attributes, so each referenced node has to be different as shown above.

All the best,
Bryan


Bryan Garaventa
Accessibility Fellow
Level Access, Inc.

-- 
The following information is important for all members of the Mac Visionaries 
list.

If you have any questions or concerns about the running of this list, or if you 
feel that a member's post is inappropriate, please contact the owners or 
moderators directly rather than posting on the list itself.

Your Mac Visionaries list moderator is Mark Taylor.  You can reach mark at:  
mk...@ucla.edu and your owner is Cara Quinn - you can reach Cara at 
caraqu...@caraquinn.com

The archives for this list can be searched at:
http://www.mail-archive.com/macvisionaries@googlegroups.com/
--- 
You received this message because you are subscribed to the Google Groups 
"MacVisionaries" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to macvisionaries+unsubscr...@googlegroups.com.
To post to this group, send email to macvisionaries@googlegroups.com.
Visit this group at https://groups.google.com/group/macvisionaries.
For more options, visit https://groups.google.com/d/optout.

Reply via email to