@@ -105,7 +105,7 @@ describe('MdTooltip Component', function() {
105
105
) ;
106
106
107
107
expect ( element . attr ( 'aria-label' ) ) . toEqual ( 'Tooltip' ) ;
108
- expect ( element . attr ( 'aria-labelledby ' ) ) . toBeDefined ( ) ;
108
+ expect ( element . attr ( 'md-labeled-by-tooltip ' ) ) . toBeDefined ( ) ;
109
109
} ) ;
110
110
111
111
it ( 'should not label the parent if it already has a label' , function ( ) {
@@ -118,7 +118,7 @@ describe('MdTooltip Component', function() {
118
118
) ;
119
119
120
120
expect ( element . attr ( 'aria-label' ) ) . toEqual ( 'Button Label' ) ;
121
- expect ( element . attr ( 'aria-labelledby ' ) ) . toBeUndefined ( ) ;
121
+ expect ( element . attr ( 'md-labeled-by-tooltip ' ) ) . toBeUndefined ( ) ;
122
122
} ) ;
123
123
124
124
it ( 'should not label the parent if it has already been labelled by ' +
@@ -143,12 +143,12 @@ describe('MdTooltip Component', function() {
143
143
) ;
144
144
145
145
expect ( element . attr ( 'aria-label' ) ) . toBe ( 'HELLO' ) ;
146
- expect ( element . attr ( 'aria-labelledby ' ) ) . toBeDefined ( ) ;
146
+ expect ( element . attr ( 'md-labeled-by-tooltip ' ) ) . toBeDefined ( ) ;
147
147
} ) ;
148
148
149
149
it ( 'should update the aria-label when the interpolated value changes' , function ( ) {
150
- var ariaLabelledby ;
151
- var ariaLabelledby2 ;
150
+ var labeledByTooltip ;
151
+ var labeledByTooltip2 ;
152
152
153
153
buildTooltip (
154
154
'<md-button>' +
@@ -161,16 +161,16 @@ describe('MdTooltip Component', function() {
161
161
} ) ;
162
162
163
163
expect ( element . attr ( 'aria-label' ) ) . toBe ( 'test 1' ) ;
164
- ariaLabelledby = element . attr ( 'aria-labelledby ' ) ;
165
- expect ( ariaLabelledby ) . toBeDefined ( ) ;
164
+ labeledByTooltip = element . attr ( 'md-labeled-by-tooltip ' ) ;
165
+ expect ( labeledByTooltip ) . toBeDefined ( ) ;
166
166
167
167
parentScope . $apply ( function ( ) {
168
168
parentScope . testModel . ariaText = 'test 2' ;
169
169
} ) ;
170
170
171
171
expect ( element . attr ( 'aria-label' ) ) . toBe ( 'test 2' ) ;
172
- ariaLabelledby2 = element . attr ( 'aria-labelledby ' ) ;
173
- expect ( ariaLabelledby2 ) . toEqual ( ariaLabelledby ) ;
172
+ labeledByTooltip2 = element . attr ( 'md-labeled-by-tooltip ' ) ;
173
+ expect ( labeledByTooltip2 ) . toEqual ( labeledByTooltip ) ;
174
174
} ) ;
175
175
176
176
it ( 'should not update the parent aria-label when the interpolated' +
@@ -187,19 +187,19 @@ describe('MdTooltip Component', function() {
187
187
} ) ;
188
188
189
189
expect ( element . attr ( 'aria-label' ) ) . toBe ( 'Button Label' ) ;
190
- expect ( element . attr ( 'aria-labelledby ' ) ) . toBeUndefined ( ) ;
190
+ expect ( element . attr ( 'md-labeled-by-tooltip ' ) ) . toBeUndefined ( ) ;
191
191
192
192
parentScope . $apply ( function ( ) {
193
193
parentScope . testModel . ariaText = 'test 2' ;
194
194
} ) ;
195
195
196
196
expect ( element . attr ( 'aria-label' ) ) . toBe ( 'Button Label' ) ;
197
- expect ( element . attr ( 'aria-labelledby ' ) ) . toBeUndefined ( ) ;
197
+ expect ( element . attr ( 'md-labeled-by-tooltip ' ) ) . toBeUndefined ( ) ;
198
198
} ) ;
199
199
200
200
it ( 'should not interpolate interpolated values' , function ( ) {
201
- var ariaLabelledby ;
202
- var ariaLabelledby2 ;
201
+ var labeledByTooltip ;
202
+ var labeledByTooltip2 ;
203
203
204
204
buildTooltip (
205
205
'<md-button>' +
@@ -212,16 +212,16 @@ describe('MdTooltip Component', function() {
212
212
} ) ;
213
213
214
214
expect ( element . attr ( 'aria-label' ) ) . toBe ( 'test {{1+1}}' ) ;
215
- ariaLabelledby = element . attr ( 'aria-labelledby ' ) ;
216
- expect ( ariaLabelledby ) . toBeDefined ( ) ;
215
+ labeledByTooltip = element . attr ( 'md-labeled-by-tooltip ' ) ;
216
+ expect ( labeledByTooltip ) . toBeDefined ( ) ;
217
217
218
218
parentScope . $apply ( function ( ) {
219
219
parentScope . testModel . ariaTest = 'test {{1+1336}}' ;
220
220
} ) ;
221
221
222
222
expect ( element . attr ( 'aria-label' ) ) . toBe ( 'test {{1+1336}}' ) ;
223
- ariaLabelledby2 = element . attr ( 'aria-labelledby ' ) ;
224
- expect ( ariaLabelledby2 ) . toEqual ( ariaLabelledby ) ;
223
+ labeledByTooltip2 = element . attr ( 'md-labeled-by-tooltip ' ) ;
224
+ expect ( labeledByTooltip2 ) . toEqual ( labeledByTooltip ) ;
225
225
} ) ;
226
226
227
227
it ( 'should not set parent to items with no pointer events' ,
0 commit comments