-
-
Notifications
You must be signed in to change notification settings - Fork 736
Activating menu items on webpages in browse mode #6761
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
Conversation
Fix for #6735 Menu items (as well as menu item checkbox and menu item radio) can be now be activated while in browse mode.
source/browseMode.py
Outdated
| def _get_currentNVDAObject(self): | ||
| raise NotImplementedError | ||
|
|
||
| ALWAYS_SWITCH_TO_PASS_THROUGH_ROLES = ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please make this a set (or a frozenset if you want it to be immutable) rather than a tuple. That makes checking membership a hash lookup instead of O(n) and this is not just a few elements. I realise it was a tuple before it was a constant. :)
source/browseMode.py
Outdated
| controlTypes.ROLE_TABLEROW, | ||
| controlTypes.ROLE_TABLECELL, | ||
| controlTypes.ROLE_TABLEROWHEADER, | ||
| controlTypes.ROLE_TABLECOLUMNHEADER) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Convention for long collections is to treat the last item like every other item and put the closing parenthesis on its own line. So:
controlTypes.ROLE_TABLECOLUMNHEADER,
)
(The trailing comma is not a mistake.)
This means that adding a new entry at the bottom just adds a new line, rather than changing an unrelated line as well. For more on this, see this Python FAQ and this StackOverflow thread.
source/browseMode.py
Outdated
| controlTypes.ROLE_TABLEROWHEADER, | ||
| controlTypes.ROLE_TABLECOLUMNHEADER) | ||
|
|
||
| SWITCH_TO_PASS_THROUGH_ON_FOCUS_ROLES = ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As above.
For PR #6761 - Web page menu items (menu item checkbox's and radio buttons) can now be activated while in browse mode. Issue #6735 For PR #6866 - Excel sheet name reporting is now translated. Issue #6848 For PR #6884 - Pressing ESC while the configuration profile "Confirm Deletion" prompt is active now dismisses the dialog. Issue #6851 For PR #6895 - Cell border information can now be reported in Microsoft Excel by using `NVDA+f`. Issue #3044 For PR #6860 - Added support for aria-current attributes. Issue #6358
Fix for #6735
Menu items (as well as menu item checkbox and menu item radio) can be
now be activated while in browse mode.