@@ -48,6 +48,55 @@ def checkbox_labelled_by_inner_element():
4848 )
4949
5050
51+ def test_aria_details ():
52+ _chrome .prepareChrome (
53+ """
54+ <div>
55+ <p>The word <mark aria-details="cat-details">cat</mark> has a comment tied to it.</p>
56+ <div id="cat-details" role="comment">
57+ Cats go woof BTW<br>—Jonathon Commentor
58+ <div role="comment">
59+ No they don't<br>—Zara
60+ </div>
61+ <div role="form">
62+ <textarea cols="80" placeholder="Add reply..."></textarea>
63+ <input type="submit">
64+ </div>
65+ </div>
66+ </div>
67+ """
68+ )
69+ actualSpeech = _chrome .getSpeechAfterKey ('downArrow' )
70+ _asserts .strings_match (
71+ actualSpeech ,
72+ "The word marked content cat out of marked content has a comment tied to it."
73+ )
74+ # this word has no details attached
75+ actualSpeech = _chrome .getSpeechAfterKey ("control+rightArrow" )
76+ _asserts .strings_match (
77+ actualSpeech ,
78+ "word"
79+ )
80+ # check that there is no summary reported
81+ actualSpeech = _chrome .getSpeechAfterKey ("NVDA+\\ " )
82+ _asserts .strings_match (
83+ actualSpeech ,
84+ "No additional details"
85+ )
86+ # this word has details attached to it
87+ actualSpeech = _chrome .getSpeechAfterKey ("control+rightArrow" )
88+ _asserts .strings_match (
89+ actualSpeech ,
90+ "marked content cat out of marked content"
91+ )
92+ # read the details summary
93+ actualSpeech = _chrome .getSpeechAfterKey ("NVDA+\\ " )
94+ _asserts .strings_match (
95+ actualSpeech ,
96+ "Cats go woof BTW —Jonathon Commentor No they don't —Zara"
97+ )
98+
99+
51100def announce_list_item_when_moving_by_word_or_character ():
52101 _chrome .prepareChrome (
53102 r"""
0 commit comments