Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix reporting of landmarks, implement reporting of groupings and figures #10462

Merged
merged 35 commits into from
Nov 18, 2019
Merged
Show file tree
Hide file tree
Changes from 33 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
9780b8a
Add grouping reporting to config
LeonarddeR Aug 17, 2019
2073b4a
Report groupings in browse mode
LeonarddeR Aug 17, 2019
c47fe59
Merge remote-tracking branch 'origin/master' into grouping
LeonarddeR Oct 25, 2019
bb785ca
Add groupings script
LeonarddeR Oct 25, 2019
ccaa4de
Report descriptions of groupings in browse mode
LeonarddeR Oct 25, 2019
9e9d746
Linter fixes
LeonarddeR Oct 25, 2019
e6dc622
Report captions in browse mode
LeonarddeR Oct 26, 2019
2d18cfa
Proper support for figure in Firefox and Chrome
LeonarddeR Oct 26, 2019
3213e4f
Make figures really work
LeonarddeR Oct 26, 2019
2d0c0dd
Fix landmark presentation in braille
Oct 29, 2019
a590965
Merge remote-tracking branch 'origin/master' into grouping
Oct 30, 2019
8bcab0d
Don't report end of landmarks in braille, for now
Oct 30, 2019
bb4085f
In line with how Firefox implements is, the search role now gets ROL_…
LeonarddeR Oct 30, 2019
432081d
Merge remote-tracking branch 'leonard/grouping' into landmarksAndGrou…
LeonarddeR Nov 1, 2019
c1271d7
More work on merging landmark, region and grouping code
LeonarddeR Nov 1, 2019
cd89b69
Try to implement alwaysReportName
LeonarddeR Nov 2, 2019
3c9765f
Get the name in braille if alwaysReportName is True
LeonarddeR Nov 2, 2019
325ea9b
Edge classic: at least report the proper landmark for main, nav and form
LeonarddeR Nov 2, 2019
1c03ba3
Fix in braille.py, ROLE_ARTICLE was mapped to rgn
Nov 4, 2019
c3f4fb2
Update user guide
Nov 4, 2019
d223de9
Fix linting
Nov 4, 2019
03b04c7
Fix accidental whitespace in nameIsContent
Nov 5, 2019
916cd0f
Merge remote-tracking branch 'origin/master' into landmarksAndGroupings
Nov 5, 2019
db7af47
Braille: Only get landmark from the field when we really need it
Nov 5, 2019
22ba3c5
Also suppress ends of articles and groupings, as they are overly verbose
Nov 5, 2019
eec18a0
Implement grouping quicknav
Nov 5, 2019
8ad3fec
Fix typo in mshtml
Nov 5, 2019
17c9d86
MSTHML: add figcaption
Nov 5, 2019
b628e72
Add FIELDSET to list of nodes we have a custom role for on MSHTML object
LeonarddeR Nov 5, 2019
e895641
MSHTML vbuf: add alwaysReportName in cases name is not content and th…
LeonarddeR Nov 5, 2019
b6ae3d6
Last lint fix
LeonarddeR Nov 5, 2019
d44606e
Merge remote-tracking branch 'origin/master' into landmarksAndGroupings
LeonarddeR Nov 6, 2019
23b19fd
Fix error when firefox exposes IA2ROLE_LANDMARK with a wrong landmark…
Nov 13, 2019
99a7d77
No longer suppress 'end of' announcements for articles, regions and g…
Nov 18, 2019
1f807ac
Merge remote-tracking branch 'origin/master' into landmarksAndGroupings
Nov 18, 2019
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
10 changes: 6 additions & 4 deletions nvdaHelper/vbufBackends/mshtml/mshtml.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -890,7 +890,7 @@ VBufStorage_fieldNode_t* MshtmlVBufBackend_t::fillVBuf(VBufStorage_buffer_t* buf
} else if(oldNode&&oldNode->getParent()) {
formatState=((MshtmlVBufStorage_controlFieldNode_t*)(oldNode->getParent()))->formatState;
}
if(!(formatState&FORMATSTATE_INSERTED)&&nodeName.compare(L"INS")==0) {
if(!(formatState&FORMATSTATE_INSERTED)&&nodeName.compare(L"INS")==0) {
formatState|=FORMATSTATE_INSERTED;
}
if(!(formatState&FORMATSTATE_DELETED)&&nodeName.compare(L"DEL")==0) {
Expand Down Expand Up @@ -1053,8 +1053,8 @@ if(!(formatState&FORMATSTATE_INSERTED)&&nodeName.compare(L"INS")==0) {
contentString=L" ";
isBlock=true;
IARole=ROLE_SYSTEM_SEPARATOR;
} else if(IARole==ROLE_SYSTEM_SLIDER||IARole==ROLE_SYSTEM_PROGRESSBAR) {
contentString=IAValue;
} else if(IARole==ROLE_SYSTEM_SLIDER||IARole==ROLE_SYSTEM_PROGRESSBAR) {
contentString=IAValue;
} else if ((nodeName.compare(L"OBJECT")==0 || nodeName.compare(L"APPLET")==0)) {
isBlock=true;
contentString=L" ";
Expand Down Expand Up @@ -1152,8 +1152,10 @@ if(!(formatState&FORMATSTATE_INSERTED)&&nodeName.compare(L"INS")==0) {
if (!nameIsContent && !IAName.empty() && (nameFromAuthor || (
attribsMap.find(L"HTMLAttrib::aria-label") != attribsMap.end() || attribsMap.find(L"HTMLAttrib::aria-labelledby") != attribsMap.end()
|| attribsMap.find(L"HTMLAttrib::title") != attribsMap.end() || attribsMap.find(L"HTMLAttrib::alt") != attribsMap.end()
)))
))) {
attribsMap[L"name"]=IAName;
attribsMap[L"alwaysReportName"]=L"true";
}

//Add a textNode to the buffer containing any special content retreaved
if(!hidden&&!contentString.empty()) {
Expand Down
33 changes: 26 additions & 7 deletions source/NVDAObjects/IAccessible/MSHTML.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
from ..window import Window
from NVDAObjects.UIA import UIA, UIATextInfo
from locationHelper import RectLTRB
from typing import Dict

IID_IHTMLElement=comtypes.GUID('{3050F1FF-98B5-11CF-BB82-00AA00BDCE0B}')

Expand Down Expand Up @@ -100,7 +101,8 @@ def __contains__(self,item):
self.containsCache[item]=contains
return contains

nodeNamesToNVDARoles={

nodeNamesToNVDARoles: Dict[str, int] = {
"FRAME":controlTypes.ROLE_FRAME,
"IFRAME":controlTypes.ROLE_INTERNALFRAME,
"FRAMESET":controlTypes.ROLE_DOCUMENT,
Expand Down Expand Up @@ -133,15 +135,22 @@ def __contains__(self,item):
"OBJECT":controlTypes.ROLE_EMBEDDEDOBJECT,
"APPLET":controlTypes.ROLE_EMBEDDEDOBJECT,
"EMBED":controlTypes.ROLE_EMBEDDEDOBJECT,
"FIELDSET":controlTypes.ROLE_GROUPING,
"FIELDSET": controlTypes.ROLE_GROUPING,
"OPTION":controlTypes.ROLE_LISTITEM,
"BLOCKQUOTE":controlTypes.ROLE_BLOCKQUOTE,
"MATH":controlTypes.ROLE_MATH,
"NAV":controlTypes.ROLE_SECTION,
"SECTION":controlTypes.ROLE_SECTION,
"NAV": controlTypes.ROLE_LANDMARK,
"HEADER": controlTypes.ROLE_LANDMARK,
"MAIN": controlTypes.ROLE_LANDMARK,
"ASIDE": controlTypes.ROLE_LANDMARK,
"FOOTER": controlTypes.ROLE_LANDMARK,
"SECTION": controlTypes.ROLE_REGION,
"ARTICLE": controlTypes.ROLE_ARTICLE,
"FIGURE": controlTypes.ROLE_FIGURE,
"FIGCAPTION": controlTypes.ROLE_CAPTION,
}


def getZoomFactorsFromHTMLDocument(HTMLDocument):
try:
scr=HTMLDocument.parentWindow.screen
Expand Down Expand Up @@ -519,7 +528,7 @@ def findOverlayClasses(self,clsList):
# The IAccessibleObject is for this node (not an ancestor), so IAccessible overlay classes are relevant.
super(MSHTML,self).findOverlayClasses(clsList)
if self.IAccessibleRole == oleacc.ROLE_SYSTEM_DIALOG:
ariaRoles = self.HTMLAttributes["role"].split(" ")
ariaRoles = (self.HTMLAttributes["role"] or "").split(" ")
if "dialog" in ariaRoles:
# #2390: Don't try to calculate text for ARIA dialogs.
try:
Expand Down Expand Up @@ -732,7 +741,7 @@ def _get_basicText(self):

def _get_role(self):
if self.HTMLNode:
ariaRole=self.HTMLAttributes['role']
ariaRole = (self.HTMLAttributes["role"] or "").split(" ")[0]
if ariaRole:
role=aria.ariaRolesToNVDARoles.get(ariaRole)
if role:
Expand All @@ -741,7 +750,17 @@ def _get_role(self):
if nodeName:
if nodeName in ("OBJECT","EMBED","APPLET"):
return controlTypes.ROLE_EMBEDDEDOBJECT
if self.HTMLNodeHasAncestorIAccessible or nodeName in ("BODY","FRAMESET","FRAME","IFRAME","LABEL","NAV","SECTION","ARTICLE"):
if self.HTMLNodeHasAncestorIAccessible or nodeName in (
"BODY",
"FRAMESET",
"FRAME",
"IFRAME",
"LABEL",
"NAV",
"SECTION",
"ARTICLE",
"FIELDSET",
):
return nodeNamesToNVDARoles.get(nodeName,controlTypes.ROLE_SECTION)
if self.IAccessibleChildID>0:
states=super(MSHTML,self).states
Expand Down
24 changes: 17 additions & 7 deletions source/NVDAObjects/UIA/edge.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,15 @@ def _getControlFieldForObject(self,obj,isEmbedded=False,startOfNode=False,endOfN
controlTypes.ROLE_SECTION,
controlTypes.ROLE_PARAGRAPH,
controlTypes.ROLE_ARTICLE,
controlTypes.ROLE_LANDMARK,
controlTypes.ROLE_REGION,
):
field['isBlock']=True
ariaProperties = splitUIAElementAttribs(
obj._getUIACacheablePropertyValue(UIAHandler.UIA_AriaPropertiesPropertyId)
)
# ARIA roledescription and landmarks
field['roleText']=obj.roleText
field['roleText'] = ariaProperties.get('roledescription')
# provide landmarks
field['landmark']=obj.landmark
# Combo boxes with a text pattern are editable
Expand All @@ -156,9 +161,8 @@ def _getControlFieldForObject(self,obj,isEmbedded=False,startOfNode=False,endOfN
field['placeholder']=obj.placeholder
# For certain controls, if ARIA overrides the label, then force the field's content (value) to the label
# Later processing in Edge's getTextWithFields will remove descendant content from fields with a content attribute.
ariaProperties=obj._getUIACacheablePropertyValue(UIAHandler.UIA_AriaPropertiesPropertyId)
hasAriaLabel=('label=' in ariaProperties)
hasAriaLabelledby=('labelledby=' in ariaProperties)
hasAriaLabel = 'label' in ariaProperties
hasAriaLabelledby = 'labelledby' in ariaProperties
if field.get('nameIsContent'):
content=""
field.pop('name',None)
Expand All @@ -176,6 +180,8 @@ def _getControlFieldForObject(self,obj,isEmbedded=False,startOfNode=False,endOfN
field['role']=controlTypes.ROLE_EMBEDDEDOBJECT
if not obj.value:
field['content']=obj.name
elif hasAriaLabel or hasAriaLabelledby:
field['alwaysReportName'] = True
# Give lists an item count
if obj.role==controlTypes.ROLE_LIST:
child=UIAHandler.handler.clientObject.ControlViewWalker.GetFirstChildElement(obj.UIAElement)
Expand Down Expand Up @@ -516,14 +522,18 @@ def _get_landmark(self):
landmarkId=self._getUIACacheablePropertyValue(UIAHandler.UIA_LandmarkTypePropertyId)
if not landmarkId: # will be 0 for non-landmarks
return None
landmarkRole = UIAHandler.UIALandmarkTypeIdsToLandmarkNames.get(landmarkId)
if landmarkRole:
return landmarkRole
ariaRoles=self._getUIACacheablePropertyValue(UIAHandler.UIA_AriaRolePropertyId).lower()
# #7333: It is valid to provide multiple, space separated aria roles in HTML
# If multiple roles or even multiple landmark roles are provided, the first one is used
for ariaRole in ariaRoles.split():
if ariaRole in aria.landmarkRoles and (ariaRole!='region' or self.name):
return ariaRole
ariaRole = ariaRoles.split(" ")[0]
if ariaRole in aria.landmarkRoles and (ariaRole != 'region' or self.name):
return ariaRole
return None


class EdgeList(EdgeNode):

# non-focusable lists are readonly lists (ensures correct NVDA presentation category)
Expand Down
16 changes: 13 additions & 3 deletions source/NVDAObjects/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -744,8 +744,7 @@ def _get_presentationType(self):
role = self.role
landmark = self.landmark
if (
role == controlTypes.ROLE_LANDMARK
or landmark
role in (controlTypes.ROLE_LANDMARK, controlTypes.ROLE_REGION) or landmark
) and not config.conf["documentFormatting"]["reportLandmarks"]:
return self.presType_layout

Expand Down Expand Up @@ -778,7 +777,18 @@ def _get_presentationType(self):
name = self.name
description = self.description
if not name and not description:
if role in (controlTypes.ROLE_WINDOW,controlTypes.ROLE_PANEL, controlTypes.ROLE_PROPERTYPAGE, controlTypes.ROLE_TEXTFRAME, controlTypes.ROLE_GROUPING,controlTypes.ROLE_OPTIONPANE,controlTypes.ROLE_INTERNALFRAME,controlTypes.ROLE_FORM,controlTypes.ROLE_TABLEBODY):
if role in (
controlTypes.ROLE_WINDOW,
controlTypes.ROLE_PANEL,
controlTypes.ROLE_PROPERTYPAGE,
controlTypes.ROLE_TEXTFRAME,
controlTypes.ROLE_GROUPING,
controlTypes.ROLE_OPTIONPANE,
controlTypes.ROLE_INTERNALFRAME,
controlTypes.ROLE_FORM,
controlTypes.ROLE_TABLEBODY,
controlTypes.ROLE_REGION,
):
return self.presType_layout
if role == controlTypes.ROLE_TABLE and not config.conf["documentFormatting"]["reportTables"]:
return self.presType_layout
Expand Down
25 changes: 22 additions & 3 deletions source/UIABrowseMode.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,15 +419,34 @@ def _iterNodesByType(self,nodeType,direction="next",pos=None):
elif nodeType=="formField":
condition=createUIAMultiPropertyCondition({UIAHandler.UIA_ControlTypePropertyId:UIAHandler.UIA_EditControlTypeId,UIAHandler.UIA_ValueIsReadOnlyPropertyId:False},{UIAHandler.UIA_ControlTypePropertyId:UIAHandler.UIA_ListControlTypeId,UIAHandler.UIA_IsKeyboardFocusablePropertyId:True},{UIAHandler.UIA_ControlTypePropertyId:[UIAHandler.UIA_CheckBoxControlTypeId,UIAHandler.UIA_RadioButtonControlTypeId,UIAHandler.UIA_ComboBoxControlTypeId,UIAHandler.UIA_ButtonControlTypeId]})
return UIAControlQuicknavIterator(nodeType,self,pos,condition,direction)
elif nodeType=="landmark":
condition=UIAHandler.handler.clientObject.createNotCondition(UIAHandler.handler.clientObject.createPropertyCondition(UIAHandler.UIA_LandmarkTypePropertyId,0))
return UIAControlQuicknavIterator(nodeType,self,pos,condition,direction)
elif nodeType == "landmark":
condition = UIAHandler.handler.clientObject.createNotCondition(
UIAHandler.handler.clientObject.createPropertyCondition(
UIAHandler.uia.UIA_LandmarkTypePropertyId,
0
)
)
return UIAControlQuicknavIterator(nodeType, self, pos, condition, direction)
elif nodeType == "article":
condition = createUIAMultiPropertyCondition({
UIAHandler.UIA_ControlTypePropertyId: UIAHandler.UIA.UIA_GroupControlTypeId,
UIAHandler.UIA_AriaRolePropertyId: ["article"]
})
return UIAControlQuicknavIterator(nodeType, self, pos, condition, direction)
elif nodeType == "grouping":
condition = UIAHandler.handler.clientObject.CreateAndConditionFromArray([
UIAHandler.handler.clientObject.createPropertyCondition(
UIAHandler.UIA.UIA_ControlTypePropertyId,
UIAHandler.UIA.UIA_GroupControlTypeId
),
UIAHandler.handler.clientObject.createNotCondition(
UIAHandler.handler.clientObject.createPropertyCondition(
UIAHandler.UIA.UIA_NamePropertyId,
""
)
)
])
return UIAControlQuicknavIterator(nodeType, self, pos, condition, direction)
elif nodeType=="nonTextContainer":
condition=createUIAMultiPropertyCondition({UIAHandler.UIA_ControlTypePropertyId:UIAHandler.UIA_ListControlTypeId,UIAHandler.UIA_IsKeyboardFocusablePropertyId:True},{UIAHandler.UIA_ControlTypePropertyId:UIAHandler.UIA_ComboBoxControlTypeId})
return UIAControlQuicknavIterator(nodeType,self,pos,condition,direction)
Expand Down
7 changes: 7 additions & 0 deletions source/_UIAHandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,13 @@
UIA_ItemStatusPropertyId:"UIA_itemStatus",
}

UIALandmarkTypeIdsToLandmarkNames: Dict[int, str] = {
UIA.UIA_FormLandmarkTypeId: "form",
UIA.UIA_NavigationLandmarkTypeId: "nav",
UIA.UIA_MainLandmarkTypeId: "main",
UIA.UIA_SearchLandmarkTypeId: "search",
}

UIAEventIdsToNVDAEventNames={
UIA_LiveRegionChangedEventId:"liveRegionChange",
UIA_SelectionItem_ElementSelectedEventId:"UIA_elementSelected",
Expand Down
16 changes: 11 additions & 5 deletions source/aria.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
import controlTypes

ariaRolesToNVDARoles: Dict[str, int] = {
"description":controlTypes.ROLE_STATICTEXT,
"search":controlTypes.ROLE_SECTION,
"description": controlTypes.ROLE_STATICTEXT, # Not in ARIA 1.1 spec
"alert":controlTypes.ROLE_ALERT,
"alertdialog":controlTypes.ROLE_DIALOG,
"article": controlTypes.ROLE_ARTICLE,
Expand All @@ -21,6 +20,7 @@
"dialog":controlTypes.ROLE_DIALOG,
"directory":controlTypes.ROLE_LIST,
"document":controlTypes.ROLE_DOCUMENT,
"figure": controlTypes.ROLE_FIGURE,
"form":controlTypes.ROLE_FORM,
"grid":controlTypes.ROLE_TABLE,
"gridcell":controlTypes.ROLE_TABLECELL,
Expand All @@ -40,9 +40,11 @@
"progressbar":controlTypes.ROLE_PROGRESSBAR,
"radio":controlTypes.ROLE_RADIOBUTTON,
"radiogroup":controlTypes.ROLE_GROUPING,
"region": controlTypes.ROLE_REGION,
"row":controlTypes.ROLE_TABLEROW,
"rowgroup":controlTypes.ROLE_GROUPING,
"rowheader":controlTypes.ROLE_TABLEROWHEADER,
"search": controlTypes.ROLE_LANDMARK,
"separator":controlTypes.ROLE_SEPARATOR,
"scrollbar":controlTypes.ROLE_SCROLLBAR,
"slider":controlTypes.ROLE_SLIDER,
Expand Down Expand Up @@ -80,11 +82,14 @@
"search": pgettext("aria", "search"),
# Translators: Reported for the form landmark, normally found on web pages.
"form": pgettext("aria", "form"),
# Strictly speaking, region isn't a landmark, but it is very similar.
# Translators: Reported for a significant region, normally found on web pages.
"region": pgettext("aria", "region"),
}

ariaRolesToNVDARoles.update({
role: controlTypes.ROLE_LANDMARK
for role in landmarkRoles
if role not in ariaRolesToNVDARoles
})

htmlNodeNameToAriaRoles: Dict[str, str] = {
"header": "banner",
"nav": "navigation",
Expand All @@ -94,4 +99,5 @@
"section": "region",
"aside": "complementary",
"dialog": "dialog",
"figure": "figure",
}
38 changes: 30 additions & 8 deletions source/braille.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,9 @@
# grouping.
controlTypes.ROLE_GROUPING: _("grp"),
# Translators: Displayed in braille for an object which is a
# caption.
controlTypes.ROLE_CAPTION: _("cap"),
# Translators: Displayed in braille for an object which is a
# embedded object.
controlTypes.ROLE_EMBEDDEDOBJECT: _("embedded"),
# Translators: Displayed in braille for an object which is a
Expand Down Expand Up @@ -173,6 +176,10 @@
controlTypes.ROLE_LANDMARK: _("lmk"),
# Translators: Displayed in braille for an object which is an article.
controlTypes.ROLE_ARTICLE: _("art"),
# Translators: Displayed in braille for an object which is a region.
controlTypes.ROLE_REGION: _("rgn"),
# Translators: Displayed in braille for an object which is a figure.
controlTypes.ROLE_FIGURE: _("fig"),
}

positiveStateLabels = {
Expand Down Expand Up @@ -239,9 +246,6 @@
"search": pgettext("braille landmark abbreviation", "srch"),
# Translators: Displayed in braille for the form landmark, normally found on web pages.
"form": pgettext("braille landmark abbreviation", "form"),
# Strictly speaking, region isn't a landmark, but it is very similar.
# Translators: Displayed in braille for a significant region, normally found on web pages.
"region": pgettext("braille landmark abbreviation", "rgn"),
}

#: Cursor shapes
Expand Down Expand Up @@ -637,22 +641,35 @@ def getControlFieldBraille(info, field, ancestors, reportStart, formatConfig):
presCat = field.getPresentationCategory(ancestors, formatConfig)
# Cache this for later use.
field._presCat = presCat
role = field.get("role", controlTypes.ROLE_UNKNOWN)
if reportStart:
# If this is a container, only report it if this is the start of the node.
if presCat == field.PRESCAT_CONTAINER and not field.get("_startOfNode"):
return None
else:
# We only report ends for containers
# We only report ends for containers that are not landmarks/regions
# and only if this is the end of the node.
if presCat != field.PRESCAT_CONTAINER or not field.get("_endOfNode"):
if (
presCat != field.PRESCAT_CONTAINER
or not field.get("_endOfNode")
or role in (
controlTypes.ROLE_LANDMARK,
controlTypes.ROLE_REGION,
controlTypes.ROLE_ARTICLE,
controlTypes.ROLE_GROUPING,
)
):
return None

role = field.get("role", controlTypes.ROLE_UNKNOWN)
states = field.get("states", set())
value=field.get('value',None)
current=field.get('current', None)
placeholder=field.get('placeholder', None)
roleText = field.get('roleTextBraille', field.get('roleText'))
landmark = field.get("landmark")
if not roleText and role == controlTypes.ROLE_LANDMARK and landmark:
roleText = f"{roleLabels[controlTypes.ROLE_LANDMARK]} {landmarkLabels[landmark]}"

if presCat == field.PRESCAT_LAYOUT:
text = []
if current:
Expand Down Expand Up @@ -681,8 +698,13 @@ def getControlFieldBraille(info, field, ancestors, reportStart, formatConfig):
# Don't report the role for math here.
# However, we still need to pass it (hence "_role").
"_role" if role == controlTypes.ROLE_MATH else "role": role,
"states": states,"value":value, "current":current, "placeholder":placeholder,"roleText":roleText}
if formatConfig["reportLandmarks"] and field.get("landmark") and field.get("_startOfNode"):
"states": states,
"value": value,
"current": current,
"placeholder": placeholder,
"roleText": roleText
}
if field.get('alwaysReportName', False):
# Ensure that the name of the field gets presented even if normally it wouldn't.
name = field.get("name")
if name:
Expand Down
Loading