Skip to content

Commit

Permalink
Revert "Ensure that labels explicitly set on divs and spans are repor…
Browse files Browse the repository at this point in the history
…ted in braille and speech" (#8899)

* Revert "Revert "Don't announce 'selected' when the focus moves in Google sheets if the focused cell is the only cell selected (#8879)" (#8893)"

This reverts commit b4e9e83.

* Revert "Don't announce 'selected' when the focus moves in Google sheets if the focused cell is the only cell selected (#8879)"

This reverts commit 51f5b2f.

* Revert "Merge all vbufBackend dlls into nvdaHelperRemote.dll (#8866)"

This reverts commit 24f5123.

* Revert "Fix handling of table cells without a containing table in browse mode. (#8887)"

This reverts commit 5fe34c5.

* Revert "Ensure that  labels explicitly set on divs and spans are reported in braille and speech (#8886)"

This reverts commit fd24d81.
  • Loading branch information
michaelDCurran authored Oct 31, 2018
1 parent b4e9e83 commit 4cfeb44
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 21 deletions.
8 changes: 1 addition & 7 deletions source/braille.py
Original file line number Diff line number Diff line change
Expand Up @@ -660,16 +660,10 @@ def getControlFieldBraille(info, field, ancestors, reportStart, formatConfig):
current=field.get('current', None)
placeholder=field.get('placeholder', None)
roleText=field.get('roleText')
name=field.get('name')
alwaysReportName=field.get('alwaysReportName')

if presCat == field.PRESCAT_LAYOUT:
text = []
# Always braille the name of a field if it is forced.
# This is for the fallback case where a div or a span (which has no other presentation) has its name reported if explicitly set by the author using aria-label etc.
if alwaysReportName and name and field.get("_startOfNode"):
text.append(name)
# report clickable if present.
# The only item we report for these fields is clickable, if present.
if controlTypes.STATE_CLICKABLE in states:
text.append(getBrailleTextForProperties(states={controlTypes.STATE_CLICKABLE}))
if current:
Expand Down
4 changes: 0 additions & 4 deletions source/browseMode.py
Original file line number Diff line number Diff line change
Expand Up @@ -1067,8 +1067,6 @@ def getControlFieldSpeech(self, attrs, ancestorAttrs, fieldType, formatConfig=No
name=attrs.get('name')
if name and attrs.getPresentationCategory(ancestorAttrs,formatConfig,reason) is None:
textList.append(name)
# As the name is being explicitly reported along with the landmark, we must ensure that it is not reported again generically
attrs['alwaysReportName']=False
if landmark == "region":
# The word landmark is superfluous for regions.
textList.append(aria.landmarkRoles[landmark])
Expand All @@ -1084,8 +1082,6 @@ def getControlFieldBraille(self, field, ancestors, reportStart, formatConfig):
# Ensure that the name of the field gets presented even if normally it wouldn't.
name=field.get('name')
if name and field.getPresentationCategory(ancestors,formatConfig) is None:
# As the name is being explicitly reported along with the landmark, we must ensure that it is not reported again generically
field['alwaysReportName']=False
textList.append(name)
if landmark == "region":
# The word landmark is superfluous for regions.
Expand Down
12 changes: 3 additions & 9 deletions source/speech.py
Original file line number Diff line number Diff line change
Expand Up @@ -1109,10 +1109,7 @@ def getControlFieldSpeech(attrs,ancestorAttrs,fieldType,formatConfig=None,extraD

presCat=attrs.getPresentationCategory(ancestorAttrs,formatConfig, reason=reason)
childControlCount=int(attrs.get('_childcontrolcount',"0"))
alwaysReportName=attrs.get('alwaysReportName',False)
alwaysReportDescription=attrs.get('alwaysReportDescription',False)
isBlock=attrs.get('_isBlock',False)
if reason==controlTypes.REASON_FOCUS or alwaysReportName:
if reason==controlTypes.REASON_FOCUS or attrs.get('alwaysReportName',False):
name=attrs.get('name',"")
else:
name=""
Expand Down Expand Up @@ -1228,17 +1225,14 @@ def getControlFieldSpeech(attrs,ancestorAttrs,fieldType,formatConfig=None,extraD
# Special cases
elif not speakEntry and fieldType in ("start_addedToControlFieldStack","start_relative"):
out = []
# Always speak the name of a field if it is forced.
# This is for the fallback case where a div or a span (which has no other presentation) has its name announced if explicitly set by the author using aria-label etc.
if alwaysReportName and nameText:
out.append(nameText)
if not extraDetail and controlTypes.STATE_CLICKABLE in states:
# Clickable.
out.append(getSpeechTextForProperties(states=set([controlTypes.STATE_CLICKABLE])))
if ariaCurrent:
out.append(ariaCurrentText)
return CHUNK_SEPARATOR.join(out)
return ""
else:
return ""

def getFormatFieldSpeech(attrs,attrsCache=None,formatConfig=None,reason=None,unit=None,extraDetail=False , initialFormat=False, separator=CHUNK_SEPARATOR):
if not formatConfig:
Expand Down
1 change: 0 additions & 1 deletion user_docs/en/changes.t2t
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ What's New in NVDA
- In ARIA menus on the web, the Escape key will now be passed through to the menu and no longer turn off focus mode unconditionally. (#3215)
- NVDA no longer refuses to report the focus on web pages where the new focus replaces a control that no longer exists. (#6606, #8341)
- In the new Gmail, when using quick navigation inside messages while reading them, the entire body of the message is no longer reported after the element to which you just navigated. (#8887)
- In BrowseMode, NVDA will now always report labels on divs and spans explicitly set by the web author. (#8886)
- After updating NVDA, Browsers such as Firefox and google Chrome should no longer crash, and browse mode should continue to correctly reflect updates to any currently loaded documents. (#7641)


Expand Down

0 comments on commit 4cfeb44

Please sign in to comment.