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

Added HTML support for Button labels #1162

Closed
wants to merge 9 commits into from
Closed

Conversation

derek
Copy link
Contributor

@derek derek commented Sep 4, 2013

Currently Y.Button widgets do not support HTML labels. This is an issue because is isn't uncommon to use nested HTML structures inside of a <button> element. For example...

<button>
    <p>I Am A</p>
    <p>Button</p>
</button>

<button>
    <div>Image Button</div>
    <img src="path/to/image.jpg">
</button>

To fix this issue, this pull request introduces a labelHTML ATTR, and relegates the label ATTR as secure sugar around labelHTML.

A separate attribute is required for the following reasons:

  1. To not introduce security vulnerabilities to existing implementations who use the label ATTR
  2. To convey the insecurity of this attribute by including "HTML" in the name

Additional notes

  • Using @config instead of @attribute in ButtonCore documentation because @attribute will include the Change events to the API documentation, which ButtonCore (derived from AttributeCore) does not fire.
  • Fixed unrelated breakage in Selleck tests

Test Results

✓ Agent completed: Internet Explorer (9.0) / Windows 7
✓ Agent completed: Chrome (29.0.1547.65) / Mac OS
✓ Agent completed: Safari (6.0.5) / Mac OS
✓ Agent completed: Internet Explorer (10.0) / Windows 8
✓ Agent completed: Internet Explorer (8.0) / Windows XP
✓ Agent completed: Internet Explorer (6.0) / Windows XP
✓ Agent completed: Internet Explorer (7.0) / Windows XP
✓ Agent completed: Firefox (23.0) / Mac OS
✓ Agent completed: Safari (4.0) / Linux  (Android 2.3.4)
✓ Agent completed: Safari (4.0) / Linux  (Android 3.0.1)

✓ 352 tests passed! (1 minutes, 2 seconds)

@derek derek mentioned this pull request Sep 4, 2013
5 tasks
@derek
Copy link
Contributor Author

derek commented Sep 4, 2013

Closing this PR and reassigning to dev-3.x.

Submitted: #1163

@derek derek closed this Sep 4, 2013
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

Successfully merging this pull request may close these issues.

1 participant