You can now enter an empty string for the name of the shortcut, this form element should be required.

#1 1271026-shortcut-empty-name-1.patch840
PASSED: [[SimpleTest]]: [MySQL] 32,934 pass(es).
[ View ]
shortcut-empty-name.patch467 bytesswentel
PASSED: [[SimpleTest]]: [MySQL] 32,936 pass(es).
[ View ]

Comments’s picture

Title:Name of shortcut should be required.» Name of shortcut should be required
new840 bytes
PASSED: [[SimpleTest]]: [MySQL] 32,934 pass(es).
[ View ]

swentel, I thought it would be great to set the title automatically when it is empty. The patch I have attached to this comment would do it.

Bojhan’s picture

I dont think that's so great, because its magic and will confuse users who explicitly put in nothing. It should either be required, or not - autofill is a pattern we dont use anywhere else in core.’s picture

Bojhan, I agree with you. Let's go with swentel's patch.

I see another misleading thing about shortcut, the enabled/disable rows in shortcut listing, see Wondering to know if anyone aware of what it could be.

Devin Carlson’s picture

Status:Needs review» Reviewed & tested by the community

The original patch by swentel looks good. The patch still applies cleanly with an offset.

This should be committed to both D8 and D7 as being able to create shortcuts is unexpected behaviour and it leads to confusion and accessibility concerns (shortcut links without names will still be output to the shortcut bar but they will be invisible except to people with screen readers who could be notified that there is a link but they will not know what it points to as it does not contain any text description).

Dries’s picture

Status:Reviewed & tested by the community» Fixed

Committed swentel's patch in #1 to 8.x and 7.x.

Status:Fixed» Closed (fixed)

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