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

button: wrong definition of real button #1566

Closed
sipayRT opened this issue Jun 30, 2015 · 2 comments
Closed

button: wrong definition of real button #1566

sipayRT opened this issue Jun 30, 2015 · 2 comments
Assignees
Labels

Comments

@sipayRT
Copy link
Contributor

sipayRT commented Jun 30, 2015

Now in templates we check just type modifier:

var modType = ctx.mod('type'),
      isRealButton = !modType || modType === 'submit';

But if we will change in BEMJSON tag, for example, to <div>, variable isRealButton still will be true. It's wrong because we can't add some attributes such as disabled to <div>.

In the attach block it's very important because we use <span> tag instead of <button>. As a result — disabled button in attach block will be disabled only visually for a11y's programs.

@sipayRT
Copy link
Contributor Author

sipayRT commented Jun 30, 2015

@veged @dfilatov @narqo @tadatuta @aristov
Are we really need to keep in mind the possibility of changing the tag? Or we shouldn't support it?

@tadatuta
Copy link
Member

as we already use different tag in attach I suggest to add the check for tag to isRealButton condition as well

@sipayRT sipayRT self-assigned this Jul 1, 2015
sipayRT added a commit that referenced this issue Jul 7, 2015
button: fix wrong definition of real button
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants