@@ -142,8 +142,6 @@ import {
142142 SettingsBgThemePicker ,
143143 SettingsToggle ,
144144 TagStatic ,
145- TagButton ,
146- TagLink ,
147145 TagRadioButton ,
148146 TerminalExecute ,
149147 TerminalInstall ,
@@ -292,104 +290,92 @@ describe('component accessibility audits', () => {
292290 } )
293291 } )
294292
295- describe ( 'TagButton ' , ( ) => {
293+ describe ( 'ButtonBase ' , ( ) => {
296294 it ( 'should have no accessibility violations' , async ( ) => {
297- const component = await mountSuspended ( TagButton , {
298- slots : { default : 'Tag content' } ,
299- } )
300- const results = await runAxe ( component )
301- expect ( results . violations ) . toEqual ( [ ] )
302- } )
303-
304- it ( 'should have no accessibility violations when pressed' , async ( ) => {
305- const component = await mountSuspended ( TagButton , {
306- props : { pressed : true } ,
307- slots : { default : 'Tag content' } ,
295+ const component = await mountSuspended ( ButtonBase , {
296+ slots : { default : 'Button content' } ,
308297 } )
309298 const results = await runAxe ( component )
310299 expect ( results . violations ) . toEqual ( [ ] )
311300 } )
312301
313302 it ( 'should have no accessibility violations for disabled state' , async ( ) => {
314- const component = await mountSuspended ( TagButton , {
303+ const component = await mountSuspended ( ButtonBase , {
315304 props : { disabled : true } ,
316- slots : { default : 'Tag content' } ,
305+ slots : { default : 'Button content' } ,
317306 } )
318307 const results = await runAxe ( component )
319308 expect ( results . violations ) . toEqual ( [ ] )
320309 } )
321- } )
322310
323- describe ( 'ButtonBase' , ( ) => {
324- it ( 'should have no accessibility violations' , async ( ) => {
311+ it ( 'should have no accessibility violations as primary button' , async ( ) => {
325312 const component = await mountSuspended ( ButtonBase , {
313+ props : { disabled : true , variant : 'primary' } ,
326314 slots : { default : 'Button content' } ,
327315 } )
328316 const results = await runAxe ( component )
329317 expect ( results . violations ) . toEqual ( [ ] )
330318 } )
331319
332- it ( 'should have no accessibility violations for disabled state ' , async ( ) => {
320+ it ( 'should have no accessibility violations as tag ' , async ( ) => {
333321 const component = await mountSuspended ( ButtonBase , {
334- props : { disabled : true } ,
322+ props : { disabled : true , variant : 'tag' } ,
335323 slots : { default : 'Button content' } ,
336324 } )
337325 const results = await runAxe ( component )
338326 expect ( results . violations ) . toEqual ( [ ] )
339327 } )
340328 } )
341329
342- describe ( 'TagLink ' , ( ) => {
330+ describe ( 'LinkBase ' , ( ) => {
343331 it ( 'should have no accessibility violations' , async ( ) => {
344- const component = await mountSuspended ( TagLink , {
332+ const component = await mountSuspended ( LinkBase , {
345333 props : { href : 'http://example.com' } ,
346- slots : { default : 'Tag content' } ,
334+ slots : { default : 'Button link content' } ,
347335 } )
348336 const results = await runAxe ( component )
349337 expect ( results . violations ) . toEqual ( [ ] )
350338 } )
351339
352340 it ( "should have no accessibility violations when it's the current link" , async ( ) => {
353- const component = await mountSuspended ( TagLink , {
341+ const component = await mountSuspended ( LinkBase , {
354342 props : { href : 'http://example.com' , current : true } ,
355- slots : { default : 'Tag content' } ,
343+ slots : { default : 'Button link content' } ,
356344 } )
357345 const results = await runAxe ( component )
358346 expect ( results . violations ) . toEqual ( [ ] )
359347 } )
360348
361349 it ( 'should have no accessibility violations when disabled (plain text)' , async ( ) => {
362- const component = await mountSuspended ( TagLink , {
350+ const component = await mountSuspended ( LinkBase , {
363351 props : { href : 'http://example.com' , disabled : true } ,
364- slots : { default : 'Tag content' } ,
352+ slots : { default : 'Button link content' } ,
365353 } )
366354 const results = await runAxe ( component )
367355 expect ( results . violations ) . toEqual ( [ ] )
368356 } )
369- } )
370357
371- describe ( 'LinkBase' , ( ) => {
372- it ( 'should have no accessibility violations' , async ( ) => {
358+ it ( 'should have no accessibility violations as secondary button' , async ( ) => {
373359 const component = await mountSuspended ( LinkBase , {
374- props : { href : 'http://example.com' } ,
360+ props : { href : 'http://example.com' , disabled : true , variant : 'button-secondary' } ,
375361 slots : { default : 'Button link content' } ,
376362 } )
377363 const results = await runAxe ( component )
378364 expect ( results . violations ) . toEqual ( [ ] )
379365 } )
380366
381- it ( " should have no accessibility violations when it's the current link" , async ( ) => {
367+ it ( ' should have no accessibility violations as primary button' , async ( ) => {
382368 const component = await mountSuspended ( LinkBase , {
383- props : { href : 'http://example.com' , current : true } ,
369+ props : { href : 'http://example.com' , disabled : true , variant : 'button-primary' } ,
384370 slots : { default : 'Button link content' } ,
385371 } )
386372 const results = await runAxe ( component )
387373 expect ( results . violations ) . toEqual ( [ ] )
388374 } )
389375
390- it ( 'should have no accessibility violations when disabled (plain text) ' , async ( ) => {
376+ it ( 'should have no accessibility violations as tag ' , async ( ) => {
391377 const component = await mountSuspended ( LinkBase , {
392- props : { href : 'http://example.com' , disabled : true } ,
378+ props : { href : 'http://example.com' , disabled : true , variant : 'tag' } ,
393379 slots : { default : 'Button link content' } ,
394380 } )
395381 const results = await runAxe ( component )
0 commit comments