Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions source/NVDAObjects/IAccessible/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,11 @@ def normalizeIA2TextFormatField(formatField):
except KeyError:
invalid=None
if invalid:
invalid=invalid.lower()
if invalid=="spelling":
# aria-invalid can contain multiple values separated by a comma.
invalidList = [x.lower().strip() for x in invalid.split(',')]
if "spelling" in invalidList:
formatField["invalid-spelling"]=True
elif invalid=="grammar":
if "grammar" in invalidList:
formatField["invalid-grammar"]=True
color=formatField.get('color')
if color:
Expand Down
33 changes: 33 additions & 0 deletions tests/system/robot/chromeTests.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,39 @@ def test_ariaTreeGrid_browseMode():
)


def ARIAInvalid_spellingAndGrammar():
"""
Tests ARIA invalid values of "spelling", "grammar" and "spelling, grammar".
Please note that although IAccessible2 allows multiple values for invalid,
multiple values to aria-invalid is not yet standard.
And even if it were, they would be separated by space, not comma
thus the html for this test would need to change,
but the expected output shouldn't need to.
"""
_chrome.prepareChrome(
r"""
<p>Big <span aria-invalid="spelling">caat</span> meos</p>
<p>Small <span aria-invalid="grammar">a dog</span> woofs</p>
<p>Fat <span aria-invalid="grammar, spelling">a ffrog</span> crokes</p>
"""
)
actualSpeech = _chrome.getSpeechAfterKey("downArrow")
_asserts.strings_match(
actualSpeech,
"Big spelling error caat meos"
)
actualSpeech = _chrome.getSpeechAfterKey("downArrow")
_asserts.strings_match(
actualSpeech,
"Small grammar error a dog woofs"
)
actualSpeech = _chrome.getSpeechAfterKey("downArrow")
_asserts.strings_match(
actualSpeech,
"Fat spelling error grammar error a ffrog crokes"
)


def test_ariaCheckbox_browseMode():
"""
Navigate to an unchecked checkbox in reading mode.
Expand Down
3 changes: 3 additions & 0 deletions tests/system/robot/chromeTests.robot
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ ARIA treegrid
[Documentation] Ensure that ARIA treegrids are accessible as a standard table in browse mode.
# Excluded due to regular failures.
test_ariaTreeGrid_browseMode
ARIA invalid spelling and grammar
[Documentation] Tests ARIA invalid values of "spelling", "grammar" and "spelling, grammar".
ARIAInvalid_spellingAndGrammar
ARIA checkbox
[Documentation] Navigate to an unchecked checkbox in reading mode.
[Tags] aria-at
Expand Down
1 change: 1 addition & 0 deletions user_docs/en/changes.t2t
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ What's New in NVDA
- Strong and emphasis tags in Internet Explorer can again be suppressed from being reported by returning off Report Emphasis in NVDA's Document Formatting settings. (#11808)
- A freeze of several seconds experienced by a small amount of users when arrowing between cells in Excel should no longer occur. (#11818)
- In Microsoft Teams builds with version numbers like 1.3.00.28xxx, NVDA no longer fails reading messages in chats or Teams channels due to an incorrectly focused menu. (#11821)
- Text marked both as being a spelling and grammar error at the same time in Google Chrome will be appropriately announced as both a spelling and grammar error by NVDA. (#11787)


== Changes for Developers ==
Expand Down