Problem/Motivation
Style, Heading, Language buttons have invalid announcement text when using a screen reader
example:

Steps to reproduce
- enable voice over (or other screen reader)
- tab to Style, Heading, Language buttons
- buttons are announce as "headingactive button heading"
- it's expected to be announced as "active button Heading"

Proposed resolution
- this issue exists because config screen displays faux-buttons for CKEditor and uses ::before CSS pseudo-element to display the name of the button with `content` property
- rendered CKEditor buttons don't have this issue
- Follow this recommendation from W3C to resolve the issue: https://www.w3.org/TR/css-content-3/#alt
Remaining tasks
- MR ready for review
User interface changes
- none
API changes
- none
Data model changes
- none
Release notes snippet
- Updated CSS property `content` for faux-buttons on CKEditor 5 toolbar config admin page to make sure screen reader text is valid
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | style.png | 195.23 KB | jannakha |
| #8 | heading.png | 197.84 KB | jannakha |
| #8 | language.png | 110.8 KB | jannakha |
| lang-button-pseudo.jpg | 195.46 KB | bnjmnm |
Issue fork drupal-3270139
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3270139-toolbar-config-buttons
changes, plain diff MR !7071
Comments
Comment #5
mgiffordSome links on this:
Comment #6
mgiffordSo this looks like it is a Drupal specific issue, not related to the upstream situation.
Also, looks like we just need to add a space so the text isn't blended together, right?
Comment #7
wim leersI … didn't realize it could be this simple? 😄
If you can reproduce what's in the photo and can fix it with a single space, I'll be happy to RTBC your one-line patch! 🤓
Comment #8
jannakha commentedto reproduce, navigate to /admin/config/content/formats/[your html format name]
- turn on voice over and tab through available/activated buttons
- same issue found on Headings/Styles/Language fake-dropdown buttons
- this issue exists because config screen displays fake-buttons for CKEditor (real CKEditor buttons don't have this issue)
- Follow this recommendation from W3C to resolve the issue: https://www.w3.org/TR/css-content-3/#alt
patch is WIP
Comment #10
jannakha commentedMR!7071 for review
Comment #11
smustgrave commentedCan the issue summary be updated to include what the proposed solution is.
Comment #12
jannakha commentedupdated issue description
Comment #13
smustgrave commentedThe extra spacing may be considered out of scope. But personally find the css easier to read. So since the main fix is included going to go ahead and mark.
Comment #14
nod_Solution is not supported by Firefox, we need to go old school and add a duplicate rule that's valid on FF before the new one.
Comment #15
jannakha commentedComment #16
jannakha commentedapplied #14 suggestion
FF announces "Heading available button Heading" - at least there's a space for the screen reader
Comment #17
nod_Can you add a comment as to why we need the duplicate rule. To make sure we don't break it later. after that it's good to go
Comment #18
smustgrave commentedAs mentioned in #17 probably fine to self RTBC after the comment.
Thanks @nod_ I didn't know that about Firefox
Comment #19
jannakha commentedadded comment as per #17
self-RTBC :-)
Comment #24
nod_Committed da64ff5 and pushed to 11.x. Thanks!