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

Fails to render Postbox if require-email = true #524

Closed
rocka opened this issue Jan 20, 2019 · 3 comments
Closed

Fails to render Postbox if require-email = true #524

rocka opened this issue Jan 20, 2019 · 3 comments

Comments

@rocka
Copy link
Contributor

rocka commented Jan 20, 2019

I upgraded my isso instance to git master branch nowadays, only to find that the Postbox won't be rendered; there is an error in the console:

Uncaught TypeError: Cannot read property 'replace' of null

After some research, I found that bacause of #356, Postbox <input>s does not have placeholder attributes now. But following code:

https://github.com/posativ/isso/blob/4fe24296a2235de8d063cc3df7a93a54cc9d077f/isso/js/app/isso.js#L55-L64

requires the input to have a placeholder to work. We should either change this, or revert #356

@jelmer
Copy link
Member

jelmer commented Jan 20, 2019

@mpchadwick thoughts?

@Laul0
Copy link

Laul0 commented Jan 21, 2019

same issue ?

TypeError: null is not an object (evaluating 'e("[name='email']",m).getAttribute("placeholder").replace')

@jelmer
Copy link
Member

jelmer commented Jan 21, 2019

Rather than trying to fix this and get it wrong again, I've just reverted it. Open to new merge proposals re-swapping placeholders for labels after 0.12.2.

@jelmer jelmer closed this as completed Jan 21, 2019
ix5 pushed a commit to ix5/isso that referenced this issue May 5, 2022
Placeholders are is meant to be a hint (an example input)
for the user about what to enter into the field, but
shouldn't be used in lieu of a <label>.

See following links for further justification:
- https://www.tpgi.com/html5-accessibility-chops-the-placeholder-attribute/
- https://www.nngroup.com/articles/form-design-placeholders/
- https://www.maxability.co.in/2016/01/03/placeholder-attribute-and-why-it-is-not-accessible/

This commit is a reland of
isso-comments#356 with a fix for the
placeholder-replacement code in `isso.js` as reported in
isso-comments#524
ix5 pushed a commit to ix5/isso that referenced this issue May 7, 2022
Placeholders are is meant to be a hint (an example input)
for the user about what to enter into the field, but
shouldn't be used in lieu of a <label>.

See following links for further justification:
- https://www.tpgi.com/html5-accessibility-chops-the-placeholder-attribute/
- https://www.nngroup.com/articles/form-design-placeholders/
- https://www.maxability.co.in/2016/01/03/placeholder-attribute-and-why-it-is-not-accessible/

This commit is a reland of
isso-comments#356 with a fix for the
placeholder-replacement code in `isso.js` as reported in
isso-comments#524
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants