Flex辅助功能-读取标签/文本 [英] Flex Accessiblity - Reading out a label/text

查看:115
本文介绍了Flex辅助功能-读取标签/文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要使屏幕阅读器可以访问一个小型应用程序。

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.

我似乎无法解决该问题。.我尝试了各种文本控件并将它们设置为focusEnabled,tabEnabled,我也已经设置了accessibility *属性,但它似乎永远无法正常工作,我无法跳至文本标签并听到内容。

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.

老实说,我对Flex的可访问性有点陌生,所以如果我缺少明显的东西,我深表歉意。

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

有人对此有何建议?

谢谢

使用Flex 4 +颚式

Using Flex 4 + Jaws

推荐答案

您需要创建可扩展相关文本组件并显式实现IFocusManagerComponent的类。幸运的是,所有实现IFocusManagerComponent的方法都可以在UIComponent中实现,因此仅声明子类中的实现就足以让FocusManager检测到它们。

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.

这篇关于Flex辅助功能-读取标签/文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆