简体   繁体   English

Web 辅助功能 - 屏幕阅读器在鼠标 hover 和标签上以不同方式读取 HTML 元素

[英]Web Accessibility - Screen Reader reads HTML element differently on mouse hover and on tabbing

Screen Reader reads HTML element like a button differently on mouse over and on tab.屏幕阅读器在鼠标悬停和选项卡上读取 HTML 元素就像按钮一样。 When mouse over, it reads "My super button".当鼠标悬停时,它会显示“我的超级按钮”。 While tabbing, it reads "Button my super button".在切换时,它显示“按钮我的超级按钮”。

<button aria-label="My super button">Super</button>

How can I make them same as "My super button"?如何使它们与“我的超级按钮”相同?

I am using NVDA as a Screen Reader from https://www.nvaccess.org/我使用 NVDA 作为https://www.nvaccess.org/的屏幕阅读器

This is expected behaviour.这是预期的行为。

For someone who is using a screen reader in conjunction with a mouse it is assumed they have some vision (ie they are using a screen magnifier in conjunction with screen reader software) so the additional 'button' at the beginning is not necessary as they already visually know it is a button.对于将屏幕阅读器与鼠标结合使用的人,假设他们有一定的视力(即他们将屏幕放大镜与屏幕阅读器软件结合使用),因此不需要在开头添加额外的“按钮”,因为他们已经视觉上知道它是一个按钮。

The idea of a screen reader is to be as succinct as possible (get the most information relayed in the shortest amount of time) so this behaviour is desirable.屏幕阅读器的想法是尽可能简洁(在最短的时间内获得最多的信息),因此这种行为是可取的。

For someone using a keyboard it is assumed that they are entirely reliant on the screen reader for information so indicating the fact you have a button selected is essential.对于使用键盘的人,假设他们完全依赖屏幕阅读器获取信息,因此表明您选择了按钮这一事实至关重要。

It does raise a good question on whether we should assume anything about how someone uses a screen reader but that is a whole other debate (ie what if someone has a cognitive disability and uses a screen reader to reassure them of what they are pressing).它确实提出了一个很好的问题,即我们是否应该假设某人如何使用屏幕阅读器,但这是另一回事(即,如果某人有认知障碍并使用屏幕阅读器向他们保证他们正在按下的内容怎么办)。

There possibly could be a random setting someone that I can't find (I have looked just now) that allows the behaviour to be identical but I can't find it.可能有一个我找不到的随机设置(我刚刚看过)允许行为相同但我找不到它。

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

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