feat: make flyouts and workspace labels properly accessible#9774
feat: make flyouts and workspace labels properly accessible#9774maribethb merged 3 commits intoRaspberryPiFoundation:v13from
Conversation
| /// the resulting screenreader output will be something like "Logic blocks list, with 5 items". | ||
| /// Do not include the word "list" in this message. | ||
| /// Parameters: %1 - the category of blocks in the flyout, e.g. "Logic" or "Math". This may be empty for an uncategorized flyout. | ||
| Blockly.Msg.WORKSPACE_LABEL_FLYOUT_WORKSPACE = '%1 blocks'; |
There was a problem hiding this comment.
Does this include non-block flyout items? If so it might be better to say "items" or the like than "blocks". And if not, it might be good to offer a count of all items?
There was a problem hiding this comment.
This is the label for the flyout generally, so like "Logic blocks"
yeah, it might contain things like buttons and labels but that's not really the main point of the flyout so I don't think we need to include other things. "Logic blocks" is a lot more clear than "Logic items" imo
We don't need to include the count here because it's a list, so the screenreader will already include the item count in the label (and it will include all focusable things, not just blocks, in that count)
| * Updates the label on the workspace to reflect the number of top-level stacks in the workspace. | ||
| */ | ||
| private updateAriaLabel() { | ||
| const numStacks = this.getTopBlocks(false).length; |
There was a problem hiding this comment.
Should we include workspace comments?
There was a problem hiding this comment.
No, microbit said just block stacks. You can press i on the workspace to hear more details including how many comments there are
The basics
The details
Resolves
Fixes #9495 and various other smaller things mentioned in the design doc but not filed as issues
Proposed Changes
presentationrather thangenericin many places related to the flyout and workspaces.Reason for Changes
genericeither. But I didn't fix all usages of this, only the ones relevant to flyout/workspaceTest Coverage
Manually tested in Voiceover:
Dragcategory is useful as it has several labels and blocks that have multiple blocks connected together (both shadow and non-shadow) so you can ensure the list count is correct (it should count the number of focusable things, i.e. stacks of blocks, not every block in the flyout)I think this should be unit tested, but before writing unit tests, we should validate this in other screenreaders. therefore I propose submitting this and testing as part of beta.2 before committing to writing unit tests, given how much contention there was previously about what the correct markup should be.
Documentation
Additional Information
Related work remaining: