简体   繁体   English

TYPO3菜单无障碍

[英]TYPO3 menu barrier-free

I'm working on an new TYPO3 website and try to make this as barrier-free as possible.我正在开发一个新的 TYPO3 网站,并尽量做到无障碍。 Checking the site with a testing tool (wave) i get told that there is redudant text in the menu items.使用测试工具 (wave) 检查站点时,我被告知菜单项中有冗余文本。 It says: "Title attribute text is the same as text or alternative text".它说:“标题属性文本与文本或替代文本相同”。 The generated code (boostrap_package) looks like this for example: <a href="/fach" id="nav-item-18" class="nav-link dropdown-toggle" title="Fach" aria-haspopup="true" aria-expanded="false"><span class="nav-link-text">Fach</span></a>生成的代码 (boostrap_package) 如下所示: <a href="/fach" id="nav-item-18" class="nav-link dropdown-toggle" title="Fach" aria-haspopup="true" aria-expanded="false"><span class="nav-link-text">Fach</span></a>

I dont know how to change this.我不知道如何改变这个。 Can someone help me?有人能帮我吗?

The WAVE tool reports "errors" (red squares with a white X, WAVE 工具报告“错误”(带有白色 X 的红色方块, 在此处输入图像描述 ) and "alerts" (yellow triangles with a white exclamation point, ) 和“警报”(带有白色感叹号的黄色三角形, 在此处输入图像描述 ), among other things. ), 除其他事项外。

All results from WAVE should be inspected for accuracy but in general, "errors" typically need to be fixed (most of the time they're WCAG failures) but "alerts" might be a "best practice" and not necessarily a WCAG failure.应检查 WAVE 的所有结果的准确性,但一般来说,“错误”通常需要修复(大多数情况下它们是WCAG失败),但“警报”可能是“最佳实践”,不一定是 WCAG 失败。

In this case, having a link with text that matches the title attribute will most likely cause a screen reader to say the text twice so it's flagged as an "alert" (在这种情况下,具有与title属性匹配的文本的链接很可能会导致屏幕阅读器读出该文本两次,因此它被标记为“警报”( 在此处输入图像描述 ). ). It's not great to hear the text twice but it's not a failure either.两次听到文本并不好,但也不是失败。

<a href="#" title="foo">foo</a>

Assistive technology, such as a screen reader, will announce the " accessible name " and optionally the " accessible description ".屏幕阅读器等辅助技术将宣布“可访问名称”和可选的“ 可访问描述”。 The description is normally announced with default screen reader settings but the user can turn it off.描述通常使用默认屏幕阅读器设置公布,但用户可以将其关闭。

The "accessible name" will come from the text inside the link, "foo" in my example or "Fach" in your example. “可访问名称”将来自链接内的文本,在我的示例中为“foo”,在您的示例中为“Fach”。 The "accessible description" will come from the title attribute. “可访问的描述”将来自title属性。

You can see a list of various attributes that are used to computer the accessible name and description at Accessible Name and Description Computation 1.1 .您可以在可访问名称和描述计算 1.1中看到用于计算可访问名称和描述的各种属性的列表。

In this case, the "accessible name" comes from step 2F, " Name from Content " and the "accessible description" comes from step 2I (eye), " Tooltip attribute ".在这种情况下,“可访问名称”来自步骤 2F,“名称来自内容”,“可访问描述”来自步骤 2I(眼睛),“工具提示属性”。

A screen reader normally announces the "accessible name" of an element, the type or role of the element, "link" in this case, and then the "accessible description".屏幕阅读器通常会宣布元素的“可访问名称”、元素的类型或角色,在本例中为“链接”,然后是“可访问描述”。 So you'd hear "foo, link, foo" or "Fach, link, Fach" .所以你会听到"foo, link, foo""Fach, link, Fach"

WAVE is just letting you know that hearing the text twice might sound a little wordy and redundant. WAVE 只是让您知道,将文本听两次可能听起来有点冗长和多余。 You don't have to fix it but it's worth considering.您不必修复它,但值得考虑。 A sighted user will see the text of the link and if they hover their mouse over the link, they'll see the same text in the tooltip.有视力的用户将看到链接的文本,如果他们将鼠标 hover 悬停在链接上,他们将在工具提示中看到相同的文本。 It doesn't really give the user any more information than they already have so the tooltip is kind of useless.它并没有真正为用户提供比他们已经拥有的更多信息,因此工具提示有点无用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM