I'd like to remove the titles in the menu, and assumed that I could just set:

settings[unset_menu_titles] = 1

To remove the blank title="" attributes showing up in my sub-theme.

It doesn't seem to be working for me though.

Blank title fields are a bit of annoyance from what I understand for some screen readers, so looking to simply remove them from the menus so that they aren't displayed.

I had set that in my subtheme .info file themes/join_adaptivetheme/join_adaptivetheme.info

But then in grepping for that code also realized that it can be set in /admin/appearance/settings/join_adaptivetheme Extensions >> Markup Overrides

Remove menu link titles
Checking this setting will remove all menu link titles (tool tips). This only works for menu blocks.

I would think this would be greyed out since I set it in the .info file, but even with this set to true in both, I can't seem to eliminate the title.

I think this is better:

@@ -334,7 +334,7 @@ if (!function_exists('dhtml_menu_init')) {
       $element['#localized_options']['html'] = TRUE;
     }
 
-    if (at_get_setting('unset_menu_titles', $theme_name) == 1 && !empty($element['#localized_options']['attributes']['title'])) {
+    if (at_get_setting('unset_menu_titles', $theme_name) == 1) {
       unset($element['#localized_options']['attributes']['title']);
     }

As after all I want to unset the title whether or not it is empty. I don't want empty titles.

Comments

mgifford’s picture

Issue summary: View changes

updating

mgifford’s picture

Issue summary: View changes
Jeff Burnz’s picture

That should be faster also, I'll test it out, good call.

mgifford’s picture

This was from a review via IBM, so ultimately I'm just chasing down their recommendation. Glad you liked it though.

Jeff Burnz’s picture

OK, I have done this (commit some time soon), but I have this niggly memory of there being a reason for the not empty check (fatal error sort of memories), could be a bug that has since been fixed in core, can't recall, when I wrote this stuff I was pretty sick so memories are not so good :/

Jeff Burnz’s picture

Status: Active » Fixed
mgifford’s picture

Excellent! Thanks. Glad your better too!

Status: Fixed » Closed (fixed)

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