Description
The breadcrumbs block stylesheet uses CSS generated content to render the separator character between items:
content: var(--separator, "/");
This causes screen readers to announce the separator character (e.g. "slash") between each breadcrumb item, adding unnecessary noise for assistive technology users.
The CSS content property supports an alt text syntax where an empty string after a forward slash instructs screen readers to treat the generated content as presentational:
content: var(--separator, "/") / "";
Expected: Screen readers skip the separator character and announce only the breadcrumb link text.
Current: Screen readers announce the separator character between each breadcrumb item.
Step-by-step reproduction instructions
- Add the Breadcrumbs block to a template part (e.g. header)
- View a page with a breadcrumb trail on the front end
- Navigate with a screen reader (e.g. VoiceOver or NVDA)
- Observe that the separator character is announced between items
Screenshots, screen recording, code snippet
Environment info
Gutenberg 23.x (WordPress 7.0)
File: packages/block-library/src/breadcrumbs/style.scss
Please confirm that you have searched existing issues in the repo.
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Please confirm which theme type you used for testing.
Description
The breadcrumbs block stylesheet uses CSS generated content to render the separator character between items:
This causes screen readers to announce the separator character (e.g. "slash") between each breadcrumb item, adding unnecessary noise for assistive technology users.
The CSS
contentproperty supports an alt text syntax where an empty string after a forward slash instructs screen readers to treat the generated content as presentational:Expected: Screen readers skip the separator character and announce only the breadcrumb link text.
Current: Screen readers announce the separator character between each breadcrumb item.
Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
Environment info
Gutenberg 23.x (WordPress 7.0)
File: packages/block-library/src/breadcrumbs/style.scss
Please confirm that you have searched existing issues in the repo.
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Please confirm which theme type you used for testing.