Add title to all clickable components #3296

Closed
wants to merge 1 commit into
from

Projects

None yet

2 participants

@nickygerritsen
Contributor
nickygerritsen commented May 4, 2016 edited

Description

As discussed on Slack yesterday, this will add a title to all clickable components.
I modified the play toggle test to also check for this, as this was the only test that seemed to test for this already.

Because controlText is already called in createEl I had to pass the element to set the title on to the function.

Specific Changes proposed

This sets the title HTML attribute on all clickable components when setting controlText_ initially or changing it using controlText(...).

Requirements Checklist

  • Feature implemented / Bug fixed
  • Unit Tests updated or fixed
  • Reviewed by Two Core Contributors
@nickygerritsen nickygerritsen Add title to all clickable components
f2e821a
@nickygerritsen nickygerritsen referenced this pull request May 4, 2016
Closed

Update Dutch language file #3297

1 of 2 tasks complete
@gkatsev gkatsev commented on the diff May 4, 2016
src/js/clickable-component.js
* @return {String}
* @method controlText
*/
- controlText(text) {
+ controlText(text, el=this.el()) {
@gkatsev
gkatsev May 4, 2016 Member

is it possible that this.el() will end up returning nothing?

@nickygerritsen
nickygerritsen May 4, 2016 Contributor

Only during the first call, because that is made from createEl, at which time this.el() does not eixst yet. Afterwards it should always exist, right?

@gkatsev
Member
gkatsev commented May 11, 2016

LGTM.

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