gutenberg
gutenberg copied to clipboard
Video Block: Add accessibility name to core/video block using a caption
Description
The following issue was raised on trac: #63519 by @rlautan
The core/video block that uses a caption has no accesibility name. Adding one as a aria-label or a aria-labbeledby attribute will enhance the accessibility for the block.
Step-by-step reproduction instructions
- Create a new page/post
- Add a
core/videoblock - Add media and caption to it
- Navigate to the frontend, and using a screenreader try to focus on the video.
- Verify that the screenreader announces the video but not the caption
Screenshots, screen recording, code snippet
https://github.com/user-attachments/assets/90045664-b899-4b55-b8e0-cbdbb2a8791d
Environment info
No response
Please confirm that you have searched existing issues in the repo.
- [x] Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
- [x] Yes
Please confirm which theme type you used for testing.
- [ ] Block
- [ ] Classic
- [ ] Hybrid (e.g. classic with theme.json)
- [ ] Not sure