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 authored and feerrenrut committed Dec 14, 2021
1 parent 474e529 commit 7f2d8b4
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 7f2d8b4

Please sign in to comment.