Question

I need to make a small app accessible to screen reader.

I'm managing to make buttons accessible, but I would also like to have a section of text accessible by screen readers so that users can hear what the text says.

I can't seem to work out how to do this.. I've tried various text controls and set them as focusEnabled, tabEnabled, i've set the accessibility* attributes too but it never seems to work, I cannot tab to a text label and hear the content.

I'm honestly a little new to accessiblity in Flex so apologies if i'm missing something obvious.

Anyone has any suggestion on this?

Thanks

Using Flex 4 + Jaws

Was it helpful?

Solution

You need to make classes that extend your relevant text-components and explicitly implement IFocusManagerComponent. Luckily, all of the methods to implement IFocusManagerComponent are fulfilled in UIComponent, so merely declaring the implementation in the subclasses should be sufficient for the FocusManager to detect them.

package scrap
{
    import mx.managers.IFocusManagerComponent;

    import spark.components.RichText;

    public class FocusableRichText extends RichText implements IFocusManagerComponent
    {
        public function FocusableRichText()
        {
            super();
        }
    }
}

The exact same trick works for Label. Just use these nigh-trivial subclasses where-ever you would otherwise place your accessibility-oriented textual components.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top