1515# Imported for type information
1616from ChromeLib import ChromeLib as _ChromeLib
1717from AssertsLib import AssertsLib as _AssertsLib
18+ import NvdaLib as _nvdaLib
1819
1920_builtIn : BuiltIn = BuiltIn ()
2021_chrome : _ChromeLib = _getLib ("ChromeLib" )
@@ -39,3 +40,49 @@ def checkbox_labelled_by_inner_element():
3940 # Instead this should be spoken as:
4041 "Simulate evil cat check box not checked"
4142 )
43+
44+
45+ def test_i7562 ():
46+ """ List should not be announced on every line of a ul in a contenteditable """
47+ spy = _nvdaLib .getSpyLib ()
48+ _chrome .prepareChrome (
49+ r"""
50+ <div contenteditable="true">
51+ <p>before</p>
52+ <ul>
53+ <li>frogs</li>
54+ <li>birds</li>
55+ </ul>
56+ <p>after</p>
57+ </div>
58+ """
59+ )
60+ actualSpeech = _chrome .getSpeechAfterKey ("NVDA+space" )
61+ _asserts .strings_match (
62+ actualSpeech ,
63+ "Focus mode"
64+ )
65+ # Tab into the contenteditable
66+ actualSpeech = _chrome .getSpeechAfterKey ("tab" )
67+ _asserts .strings_match (
68+ actualSpeech ,
69+ "section multi line editable before"
70+ )
71+ # DownArow into the list. 'list' should be announced when entering.
72+ actualSpeech = _chrome .getSpeechAfterKey ("downArrow" )
73+ _asserts .strings_match (
74+ actualSpeech ,
75+ "list bullet frogs"
76+ )
77+ # DownArrow to the second list item. 'list' should not be announced.
78+ actualSpeech = _chrome .getSpeechAfterKey ("downArrow" )
79+ _asserts .strings_match (
80+ actualSpeech ,
81+ "bullet birds"
82+ )
83+ # DownArrow out of the list. 'out of list' should be announced.
84+ actualSpeech = _chrome .getSpeechAfterKey ("downArrow" )
85+ _asserts .strings_match (
86+ actualSpeech ,
87+ "out of list after" ,
88+ )
0 commit comments