我正在尝试动态插入标签中的值,这些值我将对有视力的用户隐藏,但将由屏幕阅读器为显示在列中的视障用户读取。如何使用 dojo 完成此任务?
<html>
<head>
<title>Dojo Labels</title>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/dojo/1.3.2/dojo/dojo.xd.js"></script>
<style type="text/css">
.style1
{
width: 154px;
}
</style>
</head>
<body>
<table style="width: 51%; height: 204px;">
<tr>
<td class="style1">
<input id="Checkbox1" type="checkbox" />
<label for="Checkbox1"></label>
</td>
<td>
John
</td>
<td>
Doe
</td>
</tr>
<tr>
<td class="style1">
<input id="Checkbox2" type="checkbox" />
<label for="Checkbox2"></label>
</td>
<td>
Jane
</td>
<td>
Doe
</td>
</tr>
<tr>
<td class="style1">
<input id="Checkbox3" type="checkbox" />
<label for="Checkbox3"></label>
</td>
<td>
John
</td>
<td>
Smith
</td>
</tr>
</table>
</body>
</html>