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.

Support from Acquia helps fund testing for Drupal Acquia logo

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

Re-uploading for the testbot.

Dave Reid’s picture

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

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.