辅助功能:选择标签标题

时间:2017-06-08 13:57:50

标签: android html5 drop-down-menu accessibility android-a11y

我正在尝试为Android屏幕阅读器读取的<select>标签定义标题,主要称为“对讲”。在我的测试设备(Galaxy S8 +)上,它被称为“语音助手”。

有趣的是,以下HTML适用于NVDA(PC)和VoiceOver(iOS),但我不知道为什么它在Android上不起作用。

以下是HTML页面的最小示例:

<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <title>Test</title>
    <style>
        form{
            background: red;
            margin: 5px 0;
        }
        label,
        select{
            display: block;
            margin: 10px 0;
        }
    </style>
</head>
<body>
<a href="/test">Test link</a>
<form action="/en" method="post" accept-charset="UTF-8">
    <label name="edit-destination-1-label" id="edit-destination-1-label" for="edit-destination-1">Choose language</label>
    <select id="edit-destination-1" name="edit-destination-1" aria-labelledby="edit-destination-1-label">
        <option value="/de">German</option>
        <option value="/fr">French</option>
        <option value="/en" selected="selected">English</option>
    </select>
</form>
<a href="/test">Test link</a>
</body>
</html>

正如您所看到的,它只是forid的引用以及aria-labelledby的引用。

有人知道解决方案吗?我只是希望Android屏幕阅读器说“选择语言”,当你激活它时,它应该跳转到选择菜单。

对于工作示例参考,请参考post.ch page,“计算价格”部分。当您使用Android导航到它时,它会在<select>之前读取“国家/地区”。

编辑我暂时解决问题的方法是使用链接而不是标签,因为这样做。

0 个答案:

没有答案
相关问题