Skip to content

Commit c2ab38a

Browse files
authored
tests(a11y): use regex for target size explanation (#15231)
1 parent 7c5f223 commit c2ab38a

File tree

1 file changed

+2
-1
lines changed
  • cli/test/smokehouse/test-definitions

1 file changed

+2
-1
lines changed

cli/test/smokehouse/test-definitions/a11y.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -859,7 +859,8 @@ const expectations = {
859859
'type': 'node',
860860
'selector': 'body > section > span#target-size-2',
861861
'snippet': '<span role="button" tabindex="0" id="target-size-2">',
862-
'explanation': 'Fix any of the following:\n Target has insufficient size (8px by 17px, should be at least 24px by 24px)\n Target has insufficient offset from its closest neighbor (12px should be at least 24px)',
862+
// Exact target size can vary depending on the device.
863+
'explanation': /^Fix any of the following:\n {2}Target has insufficient size \([0-9]+px by [0-9]+px, should be at least 24px by 24px\)\n {2}Target has insufficient offset from its closest neighbor \([0-9]+px should be at least 24px\)$/,
863864
'nodeLabel': 'o',
864865
},
865866
},

0 commit comments

Comments
 (0)