If you have JS on, then the token tree with its collapsible groups is quite nice.
Without JS, though, the table is quite overwhelming (for instance with '#global_types' => TRUE) and it is not immediately obvious that some rows are only headings for the following ones.
The attached patch adds a 'token-group-nojs' class to those rows, which makes them bold, and then removes that class via JS, so that it doesn't make the nice collapsible groups scream at you.
I tested this with #922022: The token tree UI is not accessible to keyboard only users applied also, and it doesn't seem to conflict, although this would need a reroll if that got in.

Comments

Status: Needs review » Needs work

The last submitted patch, token_bold_group_titles.patch, failed testing.

tstoeckler’s picture

Status: Needs work » Needs review

token_bold_group_titles.patch queued for re-testing.

tstoeckler’s picture

Assigned: Unassigned » tstoeckler

Also assigning to me.

tstoeckler’s picture

StatusFileSize
new1.53 KB

Re-uploading for the testbot.

dave reid’s picture

StatusFileSize
new672 bytes

Can't we do something like this?

jacine’s picture

Hey, saw this on twitter, and figured I'd chime in. You don't need to add a "js" class and using :not() isn't necessary in this case. You've already got the "js" class that Drupal adds on the <html> tag for free. You can just do something like:

.token-group {
  font-weight: bold;
}
.js .token-group {
  font-weight: normal;
}

:)

tstoeckler’s picture

StatusFileSize
new250 bytes

Thanks, Jacine, for the hint!
That's why I love Drupal ... :)
Rolled a patch and tried it out. It works beautifully.

dave reid’s picture

Status: Needs review » Fixed
jacine’s picture

Cool, glad I could help. ;)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.