

Tell HN: Thank you for interface change - tokenadult

I&#x27;ve noticed that in the old days here on Hacker News that if I submitted an article with its original title (which is always the preference here) and the title was long, the error message would just tell me that the title had to be no longer than 80 characters. Now when an article is submitted with a longer title, the error message helpfully announces how many characters are in the title as submitted, helping all of us know how many characters to trim out of a title to make it fit the forum software limit. That&#x27;s a helpful change. Thanks. Maybe in discussion here, if you please, we can list any other recent interface changes we have noticed.
======
thaumaturgy

        <script type="text/javascript">document.getElementById('title').onkeyup = function(){document.getElementById('warning').innerHTML = this.value.length > 80 ? this.value.length + ' / 80 maximum characters' : '';return true;};</script>
    

Requires setting an "id" attribute on the title input field and then adding
another element underneath of it with a "warning" id (<br><span
id="warning"></span> works nicely).

------
numbnuts
Search. Not sure how recent it is but it's great.

~~~
4ndr3vv
Agreed, but think the positioning of it isn't useful - why not up top?

~~~
macu
I hadn't even noticed it was there until now! It looks nice down there, just
unexpected.

~~~
LukeFitzpatrick
Hi Macu,

I'm replying to a comment before about Helperifix. As far as i know, the
project is on hold. I know the guys, this is my email if you want to find out
more info: lukejamesfitzpatrick@gmail.com

------
cgallello
Hm. Why don't they just limit the # of characters that can be typed in the
title text box?

~~~
andyjohnson0
Not everything that posts submissions to HN is a browser that will honour the
maxlength attribute. For example, there are various mobile apps that scrape HN
and allow you to submit urls.

Server side validation is entirely appropriate.

~~~
repsilat
Server-side validation is always appropriate, but client-side validation is
often (and certainly in this case) worth having as well.

I think limiting the number of characters is a good solution when Javascript
isn't available, but warning the user that their input is too long is a more
friendly solution where possible.

------
Khao
<input type="text" maxlength=80 /> would provide a better user experience

~~~
onion2k
No it wouldn't. Users who paste the title wouldn't be able to edit out the
least relevant section of text without pasting it somewhere else first,
editing it, and pasting the resulting modified text in. It's far better from a
UX perspective to let the user do whatever they want _without_ stopping them
but inform them that there's a problem at the first opportunity. Ideally, in
this case, there should be some JS to input events on the entry box that
highlights the text that's over the limit. With all the server side validation
as well, obviously.

For an example, Twitter's entry box on their web app gives a character count
in the bottom right but still lets you go over, but anything over 140
characters is given a background color of red. It's _very_ clear to a user
what the problem is.

~~~
3rd3
Everything you say has been said already.

