hyper
hyper copied to clipboard
Add abilty to remove placeholder text from Link Text field
What are you trying to do?
It would be great to be able to remove the default placeholder text entirely as most of the time placeholder text is either redundant or better served via the Instructions field.
The default text is especially problematic as we'd never want to suggest to the client to use "Read more" as it's not descriptive and therefore bad for user experience, accessibility and SEO.
If we were to provide instructions to the author this should be done via the "Instructions" field instead as placeholder text is problematic in general https://www.smashingmagazine.com/2018/06/placeholder-attribute/
What's your proposed solution?
Remove the default "e.g. Read more" placeholder text from the field options and leave it blank by default leaving it up to the developer to specify this if required.
Additional context
No response
There's nothing inherently wrong with using a placeholder value. Where people go wrong is using the placeholder for the label of a field input, which I agree shouldn't be done. In the case of Hyper and being used in the control panel that's not really an issue. I also agree on discouraging "Read more" as link text - just couldn't find a better default for everyone.
But it's true that you can't actually remove it, that's indeed a bug. I'll consider removing it as a default, but that's entirely opinion-based. I'm well aware developers can add instruction text, but whether the average developer will is another matter (based on experience and seeing what others do).
What we've found with a whole bunch of clients is just supplying "Link" and "Link Text" as the field label isn't obvious enough. At least with some context to show which field is the URL (the link you go to when clicked) and the actual text shown on the hyperlink (the thing you click) - makes it plain and clear to clients what it's for.
Of course, you can add this content in yourself as instruction text, but it's tedious for every Hyper field, and every link type we figure good defaults are quicker. We didn't want to add wordy default instructions because firstly it adds to visual clutter and secondly couldn't put it succinctly for everyone.
Thanks Josh, it'll be great to make it opt in so those who do wish to tailor things can.
@engram-design Just encountered this issue as well. I tried to remove the placeholder from the linkText
attribute in the field layout editor. But removing the default placeholder and leaving the placeholder field empty doesn't work – after saving, the default placeholder is still present. The only thing that works is overwriting the placeholder with a custom value.
Opinions on ideal usage for placeholders and instructions aside, can this bug be fixed? Right now, it's not possible to use an empty placeholder, and in some use-cases that would be preferred.
Fixed for the next release. To get this early, run:
-
composer require verbb/hyper:"dev-craft-4 as 1.1.30"
-
composer require verbb/hyper:"dev-craft-5 as 2.0.0"
@engram-design Thanks Josh!