Skip to content

Include read only edit fields when navigating with quicknav commands #4164#6158

Merged
jcsteh merged 8 commits into
nvaccess:masterfrom
BabbageCom:i4164
Oct 18, 2016
Merged

Include read only edit fields when navigating with quicknav commands #4164#6158
jcsteh merged 8 commits into
nvaccess:masterfrom
BabbageCom:i4164

Conversation

@LeonarddeR

@LeonarddeR LeonarddeR commented Jul 8, 2016

Copy link
Copy Markdown
Collaborator

This pull requests allows one to navigate to read only edit fields with both e and f quick navigation keys in browse mode for Mozilla Gecko and MSHTML controls.
Fixes #4164.

Leonard de Ruijter added 5 commits September 8, 2016 16:15
…e to read-only edit fields with quick navigation commands e and f (re #4164)
…read-only edit fields with quick navigation commands e and f (re #4164)
…navigation to take the read only state into account again (#4164)
…ead-only edit fields with quick navigation commands e and f (re #4164)
@LeonarddeR

Copy link
Copy Markdown
Collaborator Author

Would it be possible to include this in 2016.4?

@PratikP1

PratikP1 commented Sep 8, 2016

Copy link
Copy Markdown

I’ll support this request. It’s highly disconcerting not to find read only edit fields when using quick navigation commands.

@jcsteh

jcsteh commented Sep 8, 2016 via email

Copy link
Copy Markdown
Contributor

@jcsteh jcsteh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your work!

)
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})

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This Edge change is going to cause a merge conflict with #6271 (which is not yet in master but will be once it's done incubating). Also, including read-only edits in Edge will cause problems with file upload controls because they expose a read-only edit, but they aren't included in the text pattern. For now, please revert the Edge change and file a follow up for Edge.

attrs=[
{"IAccessible::role":[oleacc.ROLE_SYSTEM_PUSHBUTTON,oleacc.ROLE_SYSTEM_RADIOBUTTON,oleacc.ROLE_SYSTEM_CHECKBUTTON,oleacc.ROLE_SYSTEM_COMBOBOX,oleacc.ROLE_SYSTEM_OUTLINE,oleacc.ROLE_SYSTEM_TEXT],"IAccessible::state_%s"%oleacc.STATE_SYSTEM_READONLY:[None]},
{"IAccessible::role":[oleacc.ROLE_SYSTEM_PUSHBUTTON,oleacc.ROLE_SYSTEM_RADIOBUTTON,oleacc.ROLE_SYSTEM_CHECKBUTTON,oleacc.ROLE_SYSTEM_OUTLINE],"IAccessible::state_%s"%oleacc.STATE_SYSTEM_READONLY:[None]},
{"IAccessible::role":[oleacc.ROLE_SYSTEM_COMBOBOX,oleacc.ROLE_SYSTEM_TEXT]},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to clarify, are you not requiring read-only on combo boxes because you are accounting for read-only, editable ARIA combo boxes?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, though the main reason was that in the combobox code around line 263, there's no check for read only on combo boxes either.

Comment thread source/virtualBuffers/MSHTML.py Outdated
attrs={"IAccessible::role":[oleacc.ROLE_SYSTEM_PUSHBUTTON]}
elif nodeType=="edit":
attrs={"IAccessible::role":[oleacc.ROLE_SYSTEM_TEXT,oleacc.ROLE_SYSTEM_COMBOBOX],"IAccessible::state_%s"%oleacc.STATE_SYSTEM_READONLY:[None],"IAccessible::state_%s"%oleacc.STATE_SYSTEM_FOCUSABLE:[1],"IHTMLElement::%s"%"isContentEditable":[1]}
attrs={"IAccessible::role":[oleacc.ROLE_SYSTEM_TEXT,oleacc.ROLE_SYSTEM_COMBOBOX],"IAccessible::state_%s"%oleacc.STATE_SYSTEM_FOCUSABLE:[1]}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You've removed the isContentEditable check here. That's important because otherwise, this will match non-editable combo boxes. That said, you can just do "IHTMLElement::isContentEditable" rather than that weird superfluous percent interpolation we had there for some unknown reason. :)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good one, fixed that.

Comment thread source/virtualBuffers/gecko_ia2.py Outdated
attrs={"IAccessible::role":[oleacc.ROLE_SYSTEM_PUSHBUTTON,oleacc.ROLE_SYSTEM_BUTTONMENU,oleacc.ROLE_SYSTEM_RADIOBUTTON,oleacc.ROLE_SYSTEM_CHECKBUTTON,oleacc.ROLE_SYSTEM_COMBOBOX,oleacc.ROLE_SYSTEM_LIST,oleacc.ROLE_SYSTEM_OUTLINE,oleacc.ROLE_SYSTEM_TEXT,IAccessibleHandler.IA2_ROLE_TOGGLE_BUTTON],"IAccessible::state_%s"%oleacc.STATE_SYSTEM_READONLY:[None]}
attrs=[
{"IAccessible::role":[oleacc.ROLE_SYSTEM_PUSHBUTTON,oleacc.ROLE_SYSTEM_BUTTONMENU,oleacc.ROLE_SYSTEM_RADIOBUTTON,oleacc.ROLE_SYSTEM_CHECKBUTTON,oleacc.ROLE_SYSTEM_LIST,oleacc.ROLE_SYSTEM_OUTLINE,IAccessibleHandler.IA2_ROLE_TOGGLE_BUTTON],"IAccessible::state_%s"%oleacc.STATE_SYSTEM_READONLY:[None]},
{"IAccessible::role":[oleacc.ROLE_SYSTEM_COMBOBOX,oleacc.ROLE_SYSTEM_TEXT]},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In Mozilla, for historical reasons, read-only "text" objects can be text leaf nodes (not editable text). Normally, these aren't rendered into the buffer, but they are in specific cases; see #1373. I'm concerned that in these cases, this code will match those. I think you need to check for the editable state here. That also means you'll need to put combo box in the rule above, since otherwise, we won't match non-editable combo boxes.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, let me know whether I fixed it correctly.

Leonard de Ruijter added 2 commits September 27, 2016 10:46
…ate to read-only edit fields with quick navigation commands e and f (re #4164)"

This reverts commit d41a73f.
@jcsteh

jcsteh commented Sep 28, 2016

Copy link
Copy Markdown
Contributor

Actually, I need you to revert your copyright change to edge.py. Aside from no longer being valid, it's also causing a merge conflict when I try to incubate. :) Thanks.

@LeonarddeR

Copy link
Copy Markdown
Collaborator Author
Sorry, missed that one. Fixed.

jcsteh added a commit that referenced this pull request Sep 28, 2016
@jcsteh jcsteh merged commit 04723bd into nvaccess:master Oct 18, 2016
@nvaccessAuto nvaccessAuto added this to the 2016.4 milestone Oct 18, 2016
@LeonarddeR LeonarddeR added the BabbageWork Pull requests filed on behalf of Babbage B.V. label Oct 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BabbageWork Pull requests filed on behalf of Babbage B.V.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

No shortcut for read-only fields in web pages

4 participants