2

电视操作系统辅助功能

我一直在尝试了解使用“两指轻弹”的意图和潜在用例,如 Apple TV 上的语音帮助部分所述。到目前为止我的理解是

  • 两指向右滑动允许画外音专注于原本无法聚焦的事物,而无需移动系统焦点。
  • 在附加屏幕截图的情况下,用户可以获得焦点菜单选项的提示并了解有关该选项的更多信息(在这种情况下,它将是 Apple TV 徽标下的“两指轻弹”。

我一直在尝试找到一个好的用例,其中有人可能已经使用过它,或者知道围绕它的实现的任何文档。

在此处输入图像描述

这就是我的代码到目前为止在可访问性属性方面的样子

func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
    guard let cell = tableView.dequeueReusableCell(withIdentifier: reuseIdentifier, for: indexPath) as? AccessibilityTableViewCell else {
        return UITableViewCell()
    }

    cell.titleLabel.text = "Main title for row \(indexPath.row)"
    cell.titleLabel.textColor = .black

    cell.isAccessibilityElement = true
    cell.accessibilityLabel = "Main title for row \(indexPath.row)"
    cell.accessibilityHint = "Hint for Main title at row for index \(indexPath.row)"
    cell.accessibilityTraits |= UIAccessibilityTraitStaticText

    return cell
}

需要额外设置哪些提示标签作为第 2 行的相关内容?

4

0 回答 0