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

enhanceSelectElement does not unset name as claimed in README #130

Closed
lennym opened this issue May 12, 2017 · 2 comments
Closed

enhanceSelectElement does not unset name as claimed in README #130

lennym opened this issue May 12, 2017 · 2 comments
Labels
🐛 bug Something isn't working the way it should (including incorrect wording in documentation)

Comments

@lennym
Copy link
Contributor

lennym commented May 12, 2017

The README section for enhanceSelectElement states the following:

Default the autocomplete name attribute to '' to prevent it being included in form submissions

However the code at https://github.com/alphagov/accessible-autocomplete/blob/master/src/wrapper.js#L36 sets it to the same name as the select element unless explicitly overwritten - and it cannot be explicitly set to '' since that is a falsy value (as per #128)

I'm not sure whether the docs or the code are correct in this instance (though my instinct is the code) so haven't PR'ed a fix.

@tvararu tvararu added the 🐛 bug Something isn't working the way it should (including incorrect wording in documentation) label May 12, 2017
@tvararu
Copy link
Contributor

tvararu commented May 12, 2017

Actually, the name should stay blank (for the reason stated). That's a bug with the code, introduced here (we didn't notice), the docs are correct.

Feel free to fix! (updating tests to reflect behaviour)

🤔 This is technically a breaking change?

@lennym
Copy link
Contributor Author

lennym commented May 12, 2017

It won't be today (I was meant to be heading home an hour ago!) but I'll see if I can find time next week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working the way it should (including incorrect wording in documentation)
Projects
None yet
Development

No branches or pull requests

2 participants