JAWS 读取模态对话框内容两次

问题描述 投票:0回答:1

我的模态对话框有交互式和非交互式内容(屏幕截图 1)。我希望屏幕阅读器能够阅读第一个可聚焦项目和此聚焦项目之前的所有内容。但 JAWS 不会读取所有内容两次,然后读取焦点项目(屏幕截图 2)。

有什么方法可以强制屏幕阅读器阅读第一个可聚焦项目和此聚焦项目之前的所有内容吗?


此处演示(最后一个示例)。

accessibility jaws-screen-reader wcag
1个回答
0
投票

我有一个类似的问题,因为我不能直接问我把我的问题放在这里,我正在编写这段js代码,添加如图所示的标签

function renderSubject(el, props) {
let ariaLabelText = [
    props.isReminderPriority ? "High Priority Reminder" : null,
    "Subject: " + props.display,
    props.hasAttachment ? "has Attachments" : null
].filter(Boolean).join(". ");

return el("div", {
    class: "mpageui-u-text-align " + (props.overDueClass || ""),
    tabindex: "0",
    role: "group",
    "aria-label": ariaLabelText // Set aria-label for the container
},
[
    props.isReminderPriority ? new HighPriority(
        {
            classNames: theme.typography.content.attention,
            "aria-hidden": "true" // Hide aria-label on this element
        }
    ).render() : null,
    el("span", {
        class: `mpageui-u-text-align-text ${props.overDueClass}`,
        "aria-hidden": "true" // Hide aria-label on this element
    }, props.display),
    props.hasAttachment ? new Attachment(
        {
            classNames: "mpageui-u-text-color-secondary",
            "aria-hidden": "true" // Hide aria-label on this element
        }
    ).render() : null
]);

}

这就是 DOM 的生成方式:

<div tabindex="0" role="group" aria-label="High Priority Reminder. Subject: Reminder Message. has Attachments" class="mpageui-u-text-align mpageui-u-text-color-attention mpageui-u-text-bold"><svg class="D9PJU4OMM4FofOVyof8-6w== MS7wZR3s+OQ8YdA6I9Km8Q== hY6iGjRIBoRdGFq3qcDMgQ== orion-fusion-theme mpageui-SvgIcon mpageui-SvgIcon-HighPriority mpageui-u-text-color-attention" viewBox="0 0 8 48" xmlns="http://www.w3.org/2000/svg" role="presentation" height="1em" width="1em" focusable="false"><path d="M0 40h8v8H0v-8zM0 0h8v32H0V0z"></path></svg><span aria-hidden="true" class="mpageui-u-text-align-text mpageui-u-text-color-attention mpageui-u-text-bold">Reminder Message</span><svg class="D9PJU4OMM4FofOVyof8-6w== MS7wZR3s+OQ8YdA6I9Km8Q== mpageui-SvgIcon mpageui-SvgIcon-Attachment mpageui-u-text-color-secondary" viewBox="0 0 48 48" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" role="presentation" height="1em" width="1em" focusable="false"><path d="M32 8v29a8 8 0 0 1-16 0V8a5 5 0 0 1 10 0v29a2 2 0 0 1-4 0V15h-3v22a5 5 0 0 0 10 0V8a8 8 0 0 0-16 0v29a11 11 0 0 0 22 0V8z"></path></svg></div>
。目前 div 中的 aria 标签被读取两次,不确定为什么会发生这种情况,我是否缺少任何解决此问题的建议? #jaws #accessibility

© www.soinside.com 2019 - 2024. All rights reserved.