Skip to content

Commit

Permalink
Ensure that role label for landmark is once again abbreviated in brai…
Browse files Browse the repository at this point in the history
…lle (PR #13160)

Fixes #13158

PR #12814 replaced usages of deprecated controlTypes.roleLabels with role.displayString. However braille has its own mapping of roles to labels which should be used for abbreviations of roles for braille. The role label used for speech has been mistakenly used for a role of landmark.
  • Loading branch information
lukaszgo1 committed Dec 13, 2021
1 parent 3ff29a1 commit ded5ef5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion source/braille.py
Expand Up @@ -719,7 +719,7 @@ def getControlFieldBraille( # noqa: C901
roleText = field.get('roleTextBraille', field.get('roleText'))
landmark = field.get("landmark")
if not roleText and role == controlTypes.Role.LANDMARK and landmark:
roleText = f"{controlTypes.Role.LANDMARK.displayString} {landmarkLabels[landmark]}"
roleText = f"{roleLabels[controlTypes.Role.LANDMARK]} {landmarkLabels[landmark]}"

content = field.get("content")

Expand Down
2 changes: 2 additions & 0 deletions user_docs/en/changes.t2t
Expand Up @@ -9,6 +9,8 @@ What's New in NVDA


== Bug Fixes ==
- Landmark is once again abbreviated in braille. #13158
-


= 2021.3 =
Expand Down

0 comments on commit ded5ef5

Please sign in to comment.