-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Visible label is part of accessible name (2ee8b8): extra spaces in name might be OK. #1615
Comments
For numbers this might be true, but for words there are definitely cases where adding / removing / moving spaces completely changes the meaning. For example: speed of art != speedo fart More examples here: Edit: a related issue is multiple spaces normalised to a single space preserves the meaning, but the current rule doesn't cover this. For example this fails the rule, but probably shouldn't:
|
And an example Fibonacci sequence where the spaces are important:
|
I have no idea what to do with this one... but we can discuss. Interesting scenario. |
Does anyone know how speech input works reacts when the same number is spoken in different ways? 2.5.3. Label in Name targets speech input, so speaking the visible label text should activate the control, but that might be difficult with sequences of digits. How digit sequences are spoken depends on context (in Japanese and English at least) and there's often no suitable semantic markup for this context. For example the digits "2021" would usually be spoken in English as:
In Japanese it's even more complicated - how numbers are spoken depends on the shape of the thing you're counting: |
Yes, I agree with mark that speech recognition might be the important factor here (given that it is a SC of Principle 2: Operable). Would "Call one hundred and twenty-three four hundreds and fifty-six" (the visible label) be connected to "Call one two three four five six" (the accessible name)? Does the fact that these are numbers written with digits changes how speech recognition work? (versus numbers written in plain text) (e.g. I have no clue what speech recognition software accepts 😕 |
If you have macOS 10.15 or later you can enable Voice Control in Preferences. Activating links and controls labelled with numbers in Voice Control looks problematic since VC also uses numbers to give quick access to menu items (e.g. "Click 1" instead of "Click Apple Menu. Click About this Mac"). VC also uses numbers to handle controls/links with duplicate names. That's going to be difficult if there are duplicate links only containing digits:
If you say "Click one" with VC activated, this displays a number next to the link that's supposed to let you pick an option using "Click one" or "Click two": |
I've done a test for
using Dragon with FireFox, Dragon with Chrome, Voice Control on Safari (iOS), Voice Access on Chrome (Android). See the live page for the test cases. DragonLooks like Dragon does not care what is an accessible name and what is the visible label. For Both commands have worked (you can see the browser alertdialog that tries to dial the number". The same happened with the other two examples, all of the following commands have worked for words and numbers: Voice ControlDifferent results, VC is only concerned with an accessible name. So, for example, saying "tap two thousand twenty one" does not work but a "tap twenty twenty one" does work for Voice AccessVA does not work well with words that express numbers but for the most part reacts to the accessible name and visible label. FallbacksAll of those have fallback mechanisms. For Dragon, commands such as "click links" or "show links" display numbers next to links so the following command "click one" can activate the link the user has intended to activate in the first place, effectively a two-step process instead of a single step. Alternatively, "mouse grid" would also work. For VC, "show names" and "show numbers" do the same as "click links" in Dragon. The same goes for "show numbers" in VA. A two-step process is not ideal but probably not a deal-breaker. For screen reader users, white spacing numbers could definitely help. Would be good to get the opinion of others but in my view, I don't think this is an issue. |
🤔 If most STT (speech-to-text) software react to both label and name, then I start to think either 2.5.3 is pointless, or there is more to it than just STT… On one hand, it does make sense for STT software to react to both label and name. The mismatch is likely a common mistake and since STT concerns both sighted and non-sighted users, catering to both is a good idea. Adding to the confusion with Specification for Spoken Presentation in HTML that was pointed by @ajanec01 during last call, and CSS Speech Module which I just found (none of them seems to have any support currently). So, if I get the idea correctly, …and let's not get started with |
We advise colleagues at the BBC not to adjust spelling or spacing in aria labels to improve pronunciation by screen readers, because it also has an impact on braille readers. Also screen reader users can adjust how numbers are read out in the settings, and if something is unclear can ask a screen reader to read individual numbers/characters. For something like the Fibonacci numbers the spaces do matter, but for something like a phone number or words unexpected or incorrect spaces have an impact. |
VoiceOver picks up the spaces included in the aria-label when you reach the link via VoiceOver navigation. If you interact with the link and read character by character, VoiceOver does seem to ignore the spaces. The same happens with the braille output.
|
It seems that some extra spaces are OK, but not all: w3c/wcag#1936 (comment) |
@ajanec01 we're finally getting to discuss this in CG meetings! Would you be able to rerun your tests with updated versions of the voice assistants you used originally? |
I think Wilco's closing argument was pretty good: <a aria-label="Call 1 2 3. 4 5 6. 7 8 9 0." href="tel:1234567890">123.456.7890</a> The reason is to give a "better" experience to screen readers users by reading numbers one by one. But:
So, ultimately, this is not really a good idea and might hamper the screen reader users more than helping them, defeating its own purpose. |
Related to #1458 but somewhat different…
We've encountered a case where a phone number was announced digit by digit:
This currently fails the rule because the visible text is not included in the accessible name (due to the internal spaces, only the leading/trailing ones are trimmed).
Yet, this is arguably OK and might even be a better experience for screen reader users (to have the digits announced one by one rather than as part of a larger number).
The text was updated successfully, but these errors were encountered: