@@ -290,6 +290,39 @@ def test_ariaTreeGrid_browseMode():
290290 )
291291
292292
293+ def ARIAInvalid_spellingAndGrammar ():
294+ """
295+ Tests ARIA invalid values of "spelling", "grammar" and "spelling, grammar".
296+ Please note that although IAccessible2 allows multiple values for invalid,
297+ multiple values to aria-invalid is not yet standard.
298+ And even if it were, they would be separated by space, not comma
299+ thus the html for this test would need to change,
300+ but the expected output shouldn't need to.
301+ """
302+ _chrome .prepareChrome (
303+ r"""
304+ r"<p>Big <span aria-invalid="spelling">caat</span> meos</p>"
305+ <p>Small <span aria-invalid="grammar">a dog</span> woofs</p>
306+ <p>Fat <span aria-invalid="grammar, spelling">a ffrog</span> crokes</p>
307+ """
308+ )
309+ actualSpeech = _chrome .getSpeechAfterKey ("downArrow" )
310+ _asserts .strings_match (
311+ actualSpeech ,
312+ "Big spelling error caat meos"
313+ )
314+ actualSpeech = _chrome .getSpeechAfterKey ("downArrow" )
315+ _asserts .strings_match (
316+ actualSpeech ,
317+ "Small grammar error a dog woofs"
318+ )
319+ actualSpeech = _chrome .getSpeechAfterKey ("downArrow" )
320+ _asserts .strings_match (
321+ actualSpeech ,
322+ "Fat spelling error grammar error a ffrog crokes"
323+ )
324+
325+
293326def test_ariaCheckbox_browseMode ():
294327 """
295328 Navigate to an unchecked checkbox in reading mode.
0 commit comments