Skip to content

Commit b874b78

Browse files
authored
Merge 4e39f70 into 86fe20f
2 parents 86fe20f + 4e39f70 commit b874b78

2 files changed

Lines changed: 53 additions & 0 deletions

File tree

tests/system/robot/chromeTests.py

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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>&mdash;Jonathon Commentor
58+
<div role="comment">
59+
No they don't<br>&mdash;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+
51100
def announce_list_item_when_moving_by_word_or_character():
52101
_chrome.prepareChrome(
53102
r"""

tests/system/robot/chromeTests.robot

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ ARIA checkbox
5151
[Documentation] Navigate to an unchecked checkbox in reading mode.
5252
[Tags] aria-at
5353
test_ariaCheckbox_browseMode
54+
ARIA details
55+
[Documentation] Ensure a summary of aria-details is read on command.
56+
[Tags] annotations
57+
test aria details
5458
i12147
5559
[Documentation] New focus target should be announced if the triggering element is removed when activated
5660
test_i12147

0 commit comments

Comments
 (0)