Skip to content

Commit b08c8e2

Browse files
committed
Update HBS tests to use messageId instead of hardcoded messages
1 parent d47a0c9 commit b08c8e2

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

tests/lib/rules/template-no-invalid-aria-attributes.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -171,52 +171,52 @@ hbsRuleTester.run('template-no-invalid-aria-attributes', rule, {
171171
{
172172
code: '<span role="checkbox" aria-checked="bad-value" tabindex="0" aria-label="Forget me"></span>',
173173
output: null,
174-
errors: [{ message: 'Invalid value for ARIA attribute aria-checked.' }],
174+
errors: [{ messageId: 'invalidAriaAttributeValue' }],
175175
},
176176
{
177177
code: '<button type="submit" disabled="true" aria-disabled="123">Submit</button>',
178178
output: null,
179-
errors: [{ message: 'Invalid value for ARIA attribute aria-disabled.' }],
179+
errors: [{ messageId: 'invalidAriaAttributeValue' }],
180180
},
181181
{
182182
code: '<input type="text" disabled="true" aria-errormessage="false" />',
183183
output: null,
184-
errors: [{ message: 'Invalid value for ARIA attribute aria-errormessage.' }],
184+
errors: [{ messageId: 'invalidAriaAttributeValue' }],
185185
},
186186
{
187187
code: '<button type="submit" aria-describedby="blah false">Continue at your own risk</button>',
188188
output: null,
189-
errors: [{ message: 'Invalid value for ARIA attribute aria-describedby.' }],
189+
errors: [{ messageId: 'invalidAriaAttributeValue' }],
190190
},
191191
{
192192
code: '<div role="heading" aria-level="bogus">Inaccessible heading</div>',
193193
output: null,
194-
errors: [{ message: 'Invalid value for ARIA attribute aria-level.' }],
194+
errors: [{ messageId: 'invalidAriaAttributeValue' }],
195195
},
196196
{
197197
code: '<div role="heading" aria-level="true">Another inaccessible heading</div>',
198198
output: null,
199-
errors: [{ message: 'Invalid value for ARIA attribute aria-level.' }],
199+
errors: [{ messageId: 'invalidAriaAttributeValue' }],
200200
},
201201
{
202202
code: '<div role="slider" aria-valuenow=(2*2) aria-valuemax="100" aria-valuemin="30">Broken slider</div>',
203203
output: null,
204-
errors: [{ message: 'Invalid value for ARIA attribute aria-valuenow.' }],
204+
errors: [{ messageId: 'invalidAriaAttributeValue' }],
205205
},
206206
{
207207
code: '<div role="region" aria-live="no-such-value">Inaccessible live region</div>',
208208
output: null,
209-
errors: [{ message: 'Invalid value for ARIA attribute aria-live.' }],
209+
errors: [{ messageId: 'invalidAriaAttributeValue' }],
210210
},
211211
{
212212
code: '<div role="region" aria-live="polite" aria-relevant="additions errors">Inaccessible live region</div>',
213213
output: null,
214-
errors: [{ message: 'Invalid value for ARIA attribute aria-relevant.' }],
214+
errors: [{ messageId: 'invalidAriaAttributeValue' }],
215215
},
216216
{
217217
code: '<input type="text" aria-required="undefined" />',
218218
output: null,
219-
errors: [{ message: 'Invalid value for ARIA attribute aria-required.' }],
219+
errors: [{ messageId: 'invalidAriaAttributeValue' }],
220220
},
221221
],
222222
});

0 commit comments

Comments
 (0)