-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Add screen reader announcement to last block in list #24556
Comments
Sounds like a good idea. The Block Navigation / List View feature has a similar description when navigating through blocks: |
Played a bit with this and maybe something like Each "block-selection-button" should thus announce something like this:
Worth reminding there's also the case when multiple blocks are placed horizontally and the string announces the "Column" number. I'd tend to think the current term "Row" isn't ideal and announcing "n of n" would be better. I'd keep the column announcement for horizontal blocks. However, I think all these labels should be reviewed and changed. Currently, they use an While this helps screen reader users to understand the content of a block, it totally breaks the expected behavior for other assistive technology users e.g. speech recognition software users. For example:
To remediate to this, I think there's the need to change these aria-labels implementation and:
The order of this various pieces in the description should be considered with care to provide the needed info in the most understandable, efficient, way. /Cc @MarcoZehe |
Yes, and that was done on purpose. Blind users have no efficient way to get an overview of the content otherwise, without adding a cillion required key presses. Efficiency is the key point here, we simply don't have the benefit of an overview, or skimming over/glancing at, several points on the screen at once. Speech is a sequential medium, and so is braille. So combining the most important points into a concise label that gives us all the required information at once, when browsing the blocks, is a key efficiency requirement.
I realize that this isn't ideal for those using speech recognition. Apple have overcome this in native iOS apps by adding another property to accessibility objects that contains a more concise label, and which Voice Control in iOS 13 and above uses to find and activate items if told so via the Voice Control interface. VoiceOver users never see (or rather, hear) this more concise label, preserving compatibility. However, I believe Apple have not yet exposed this kind of thing via Safari, and thus there is no attempt at specifying such an alternative label for voice activation yet. I also think that the WCAG criteria doesn't take into account complex widgets such as Gutenberg at all, where having custom labels is a key factor for efficient use, see above. For example, if we were to go with the visual label which only says "Paragraph", there would be no way to know which paragraph this is. With 20 paragraphs or so, adding two or three extra keystrokes to get to the actual content to know which paragraph is being referenced, would add 60 keystrokes.
aria-describedby, or the acc description in general, for that matter, is additional, supplemental information, that is not guaranteed to be read by screen readers. There are often even settings to disable reading of the acc description because historically, the title attribute was read as this additional info, and still is, but many users wanted a way to turn this off because of the way web developers have abused this title attribute for decades. And even if it is read, it is always the last element spoken. So the information that is important comes after the label, type, and state of an element have been read. On MacOS, such information is always read with a delay, because there, it is mapped to help text. So VoiceOver users will either have to shorten that delay to 0, or for each block, wait for the default of 2 seconds before that additional info is read which they may not be interested in for other elements. That is 40 seconds wasted when navigating 20 blocks.
That I agree on. But I am very very concerned that users may actually totally miss this information if it is moved to the supplemental, secondary, description. |
@MarcoZehe thanks for your feedback. Yep, I do know this was made on purpose, that's why I pinged you in my previous comment 🙂 Regarding this point:
To clarify: the problem is that there is already a visual label which only says "Paragraph". When the block editor is in "navigation mode" the buttons screen reader users get when navigating through the blocks only display the block type. So for example, the buttons will show the following text:
SInce there's a mismatch between the visible text and the actual accessible name, activating these buttons with a speech recognition software will likely fail. Testing with macOS Voice Control I can't activate a heading button voicing "Click Heading". To make it work, I have to voice the following command: "Click Heading block row 2" where "row 2" is the block position that is included in the aria-label. This string is not exposed visually therefore sighted speech recognition software users can't activate these buttons with a direct voice command. I can't test with Dragon naturally speaking on Windows but I guess it's the same issue there as well. It's interesting that iOS added another property to accessibility objects for use with Voice Control but I'm afraid that doesn't help us. We need a solution based on standards that works across any assistive technology. I'm still not convinced that the current implementation is correct. The aria-label isn't really meant to contain dozens, potentially hundreds of words. In our case, it also needs to match what is presented visually. Or, at least, the text exposed visually needs to match the first part of the aria-label. Worth also mentioning that, when a block has a very long content, the aria-live message that announces the switch to navigation mode is spoken only after the entire block content contained in the aria-label has been announced. The content could be so long that many users might just stop the screen reader and miss the aria-live message. Overall, I think we should explore a better solution. I'd greatly appreciate to take advantage from your expertise to find together a more standard way to communicate all the necessary info to all users, whether they're screen reader users or users of other assistive technologies. Any thoughts more than welcome! |
In a way, #25126 has a similar issue as in: there's the need to make additional information available to assistive technology users. Trying to recap the current situation:
Still, we need a reliable way to provide users with additional information concerning the block, for example:
GIven there's no standard solution to this, what if Gutenberg implements its own solution? From a conversation with @mariohamann, one option could be a keyboard shortcut that works only when the block button is focused. For example:
Maybe this mechanism could work well and I like the fact that the potentially huge amount of additional information is communicated only on user request. A downside is that it would require a keyboard shortcut... bringing in all the problems related to potential conflicts, see #3218. I'll propose the accessibility team to discuss this issue in the next weekly meetings. |
@afercia These are my thoughts.
I disagree. I think aria-describedby would be a fine application for this. My reasoning is if users are advanced enough to change verbosity settings, they should be advanced enough to understand what verbosity in this context could do. In Mac Voiceover, there is a way to actually customize verbosity and other Voiceover settings based on a specific URL so they could keep normal verbosity in the editor while they could have their desired verbosity every where else. In my opinion making things accessible should be making it work for the largest amount of users possible. I use aria-describedby in a lot of projects I have contributed to and I have never received any complaints from users/other screen reader testers that they could not get the contextual information due to a verbosity setting. I am really against keyboard shortcuts because there are just too many of them and if you are not in the right mode, Browse vs. Forms/Edit mode, it could have some adverse effects. In my opinion, it would be easier to use aria-describedby and not have to put so much time in to educating users about keyboard shortcuts. I do support the idea of custom shortcuts. Besides everyone has their own way of making info accessible to them, I especially see shortcuts being useful for enabling Bold, Italics, etc. I just don't know if I completely support the idea of a shortcut to read out the block text or any additional information that may be included. There is also this principal of less key strokes with programs such as JAWS. JAWS also operates better for one handed users due to the wrap to top feature. I kind of agree on the same philosophy. The less key strokes to find contextual information, the better. Anyway, some of these points are a bit out there, but do you have any follow-up thoughts? Thanks. |
@alexstine thanks for your thoughts. To be clear, I was initially in favor of using aria-describedby because, as you pointed out, it's simpler. More importantly: it's standard. Only after @MarcoZehe's remarks I tried to consider an alternative solution. At this point it seems there's some disagreement between screen reader users too 🙂 In my limited experience with screen readers as tester, I never faced problems with aria-describedby. I can understand the verbosity argument but as you pointed out this can be tweaked by users. I'd just like to reach some consensus to that we ca move on with this issue 🙂 I'd just like to note again that the current implementation makes the aria-label contain too many words, potentially hundreds of words and this is something I see as non-compliant and harmful for other assistive technology users. |
@MarcoZehe How would you like to move this forward? Thinking about this now, block position is not the most important thing to announce to users if for some reason they have a low verbosity setting. My opinion is we can't cover every edge case, all we can do is make it work for 90% of users and we've done our job. If those other 10% of screen reader users have a super low verbosity setting, they could always add an exception, in the case of Mac Voiceover, and then it will only read aria-describedby on their WordPress website URL. Attempting to move this forward... Thanks. |
Go with aria-describedby. An extra keyboard shortcut is less discoverable. |
Hmm, I need to get back to this one. I went off on a tangent trying to fix a much bigger issue and never landed the change. I'll circle back here after I get some free time, hopefully soon. |
Is your feature request related to a problem? Please describe.
When in navigation mode, you do not know how many blocks are in the list and can sometimes get in to other meta boxes with one tab too many.
Steps:
Describe the solution you'd like
I would like each tab press to announce which block you are on. E.g. "3 out of 5".
Describe alternatives you've considered
I thought about just having the last block have a special "last block in list" announcement, but it would be more practical to list the range "current block through max."
Thoughts?
The text was updated successfully, but these errors were encountered: