Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add deform.Button constructor argument to allow to set the html title attribute #178

Open
dwt opened this issue Aug 19, 2013 · 3 comments
Open

Comments

@dwt
Copy link
Contributor

dwt commented Aug 19, 2013

It already has a title attribute, but that is actually the displayed title. What I'd like to also be able is to set the html title attribute to show up as an explanatory tooltip (it does in most browsers).

@stevepiercy
Copy link
Member

FWIW, W3.org allows that implementation, but it does have usability issues.

title is a misleadingly named argument and is actually rendered in HTML as <label> for inputs and in a <span> for buttons. Renaming it would break existing solutions. The alternative would be to create an argument with another misleading name. How about title_attr which becomes title="mytitle" in HTML?

Whatever its name, I think it would be useful, but I don't know whether it would be better to implement this in retail form rendering.

@dwt
Copy link
Contributor Author

dwt commented Aug 20, 2013

I obviously would prefer this not to be in retail form rendering. :-)

title_attr is fine by me - anything thats not that easy to misplace. In the long run I would opt to add another attribute that can be used instead of title (maybe name?), then deprecate title and later do the same dance with title_attr.

@stevepiercy
Copy link
Member

name would probably be the worst choice possible to replace title because it is already used and gets rendered as the name="mywidgetname" attribute in HTML.

title would be better named label as would make it more consistent with the rendered HTML and its true purpose. Nonetheless any renaming would mean not insignificant refactoring and backward incompatibility (and potentially angry developers). I would defer to the sage and wise project managers for advice on this point.

You can submit a pull request with your desired change to add your feature request. PRs get more love than a mere feature request. 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants