Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Try better block labels #18132
Introduces a new
The blocks package now also has two new convenience functions for retrieving these labels:
Those functions will also strip any html (i.e. from formatting) from the labels.
How has this been tested?
Additional unit testing.
Other blocks worth testing for the aria-label - Paragraph, Heading, More, Image.
Types of changes
New feature (non-breaking change which adds functionality)
MarcoZehe left a comment
This looks great from an accessibility standpoint, and also from how I so far understand the code base. But this should definitely be reviewed by actual code owners, too. Nice to see some clean-up happening with those native files. :-) Thank you for working on this!
… add to blocks package. Rename to getBlockLabel. Make experimental. Prepend block title to label. Add tests Use block label as aria-label for block edit wrapper. Allow custom separator Use block label for movers Split functionality into two separate functions, one for visual label and one for accessible label Fix typo Co-Authored-By: Marco Zehe <MarcoZehe@users.noreply.github.com> Consolidate block accessibility label to use the same functionality on mobile and web Add context argument to getLabel and tidy up some naming Shorten title of Unrecognized Block to just Unrecognized Code cleanliness Rename `getLabel` to `label` for consistency withe other block functions Avoid using RichText api in favour of a simpler way to strip html tags Move mobile accessibility labels to be cross-platform Add row to web aria labels Fix tests Use position identifiers in localized text Use spaces not tabs Revert changes to block mover, instead use block title for a shorter screen reader description Add support for columns Debounce update of block label in block list block