Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into updateMasterFromBeta
Browse files Browse the repository at this point in the history
  • Loading branch information
feerrenrut committed Sep 29, 2020
2 parents 7490226 + afb8fce commit 55a365e
Show file tree
Hide file tree
Showing 54 changed files with 1,379 additions and 598 deletions.
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Direct links to the templates:
Please thoroughly read NVDA's wiki article on how to fill in this template, including how to provide the required files.
Issues may be closed if the required information is not present.
https://github.com/nvaccess/nvda/wiki/Github-issue-template-explanation-and-examples
Please also note that the NVDA project has a Citizen and Contributor Code of Conduct which can be found at https://github.com/nvaccess/nvda/blob/master/CODE_OF_CONDUCT.MD. NV Access expects that all contributors and other community members read and abide by the rules set out in this document while participating or contributing to this project. This includes creating or commenting on issues and pull requests.
-->

### Steps to reproduce:
Expand Down
3 changes: 2 additions & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ about: Create a report to help us improve

---

<!--
<!-- Please read the text in this edit field before filling it in.
Please thoroughly read NVDA's wiki article on how to fill in this template, including how to provide the required files.
Issues may be closed if the required information is not present.
https://github.com/nvaccess/nvda/wiki/Github-issue-template-explanation-and-examples
Please also note that the NVDA project has a Citizen and Contributor Code of Conduct which can be found at https://github.com/nvaccess/nvda/blob/master/CODE_OF_CONDUCT.MD. NV Access expects that all contributors and other community members read and abide by the rules set out in this document while participating or contributing to this project. This includes creating or commenting on issues and pull requests.
-->

### Steps to reproduce:
Expand Down
3 changes: 2 additions & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ about: Suggest an idea for this project

---

<!--
<!-- Please read the text in this edit field before filling it in.
Please thoroughly read NVDA's wiki article on how to fill in this template, including how to provide the required files.
Issues may be closed if the required information is not present.
https://github.com/nvaccess/nvda/wiki/Github-issue-template-explanation-and-examples
Please also note that the NVDA project has a Citizen and Contributor Code of Conduct which can be found at https://github.com/nvaccess/nvda/blob/master/CODE_OF_CONDUCT.MD. NV Access expects that all contributors and other community members read and abide by the rules set out in this document while participating or contributing to this project. This includes creating or commenting on issues and pull requests.
-->

### Is your feature request related to a problem? Please describe.
Expand Down
4 changes: 2 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!--
Please fill in the following template, for an explanation of the sections see:
<!-- Please read and fill in the following template, for an explanation of the sections see:
https://github.com/nvaccess/nvda/wiki/Github-pull-request-template-explanation-and-examples
Please also note that the NVDA project has a Citizen and Contributor Code of Conduct which can be found at https://github.com/nvaccess/nvda/blob/master/CODE_OF_CONDUCT.MD. NV Access expects that all contributors and other community members read and abide by the rules set out in this document while participating or contributing to this project. This includes creating or commenting on issues and pull requests.
-->

### Link to issue number:
Expand Down
64 changes: 64 additions & 0 deletions CODE_OF_CONDUCT.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Citizen and Contributor Code of Conduct

## 1. Purpose
A primary goal of NV Access and NVDA is to be inclusive to the largest number of contributors, with the most varied and diverse backgrounds possible. As such, we are committed to providing a friendly, safe and welcoming environment for all, regardless of gender, sexual orientation, ability, ethnicity, nationality, socioeconomic status, education, level of experience and religion (or lack thereof).
This code of conduct outlines our expectations for all those who participate in our community, as well as the consequences for unacceptable behaviour.
We invite all those who participate in the NVDA community to help us create safe and positive experiences for everyone. NVDA is a user driven initiative.

## 2. Open Source Citizenship
A supplemental goal of this Code of Conduct is to increase open source citizenship by encouraging participants to recognise and strengthen the relationships between our actions and their effects on our community.
Communities mirror the societies in which they exist and positive action is essential to counteract the many forms of inequality and abuses of power that exist in society.
If you see someone who is making an extra effort to ensure our community is welcoming, friendly, and encourages all participants to contribute to the fullest extent, we want to know.

## 3. Expected Behaviour
The following behaviours are expected and requested of all community members:
* To participate in an authentic and active way. In doing so, you contribute to the health and longevity of this community.
* To exercise consideration and respect in your speech and actions.
* To attempt collaboration before conflict.
* To provide helpful contributions to an issue in order to encourage its progression
* To be respectful of differing viewpoints and experiences
* To gracefully accept constructive criticism
* To respect the need to prioritise issues based on NV Access, user, and community priority
* To be aware that GitHub is a public forum and refrain from publishing personal or sensitive information (your own or others). For example, carefully consider the contents of debug logs when publishing.
* To refrain from demeaning, discriminatory, or harassing behaviour and speech.
* To be mindful of your surroundings and of your fellow participants. Alert NV Access staff if you notice a dangerous situation, someone in distress, or violations of this Code of Conduct, even if they seem inconsequential.

## 4. Unacceptable Behaviour
The following behaviours are considered harassment and are unacceptable within our community:
* Violence, threats of violence or violent language directed against another person.
* Sexist, racist, homophobic, transphobic, ableist or otherwise discriminatory jokes and language.
* Posting or displaying sexually explicit or violent material.
* Posting or threatening to post other people's personally identifying information ("doxing").
* Trolling, insulting/derogatory comments, and personal or political attacks
* Personal insults, particularly those related to gender, sexual orientation, race, religion, or disability.
* Inappropriate photography or recording.
* Unwelcome sexual attention. This includes sexualized comments or jokes, inappropriate touching, groping, and unwelcomed sexual advances.
* Deliberate intimidation, stalking or following (online or in person).
* Advocating for, or encouraging, any of the above behaviour.
* Sustained disruption of community events, including talks and presentations.

## 5. Consequences of Unacceptable Behaviour
Unacceptable behaviour from any community member, including sponsors and those with decision-making authority, will not be tolerated.
Anyone asked to stop unacceptable behaviour is expected to comply immediately.
If a community member engages in unacceptable behaviour, NV Access Staff may take any action they deem appropriate, up to and including a temporary ban or permanent expulsion from the community without warning (and without refund in the case of a paid event).
NV Access Staff have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviours that they deem inappropriate, threatening, offensive, or harmful.

## 6. Reporting Guidelines
If you are subject to or witness unacceptable behaviour, or have any other concerns, please notify NV Access staff as soon as possible via [email protected]. The information required for notifications includes PR/Issue Number, nature of breach, community member responsible, date and time of breach. Please note that the details of the reporter will not be disclosed, unless required to by law.

## 7. Addressing Grievances
If you feel you have been falsely or unfairly accused of violating this Code of Conduct, you should notify NV Access at [email protected] with a concise description of your grievance.

## 8. Scope
We expect all community participants (contributors, paid or otherwise; sponsors; and other guests) to abide by this Code of Conduct in all community venues--online and in-person--as well as in all one-on-one communications pertaining to community business.
This code of conduct and its related procedures also applies to unacceptable behaviour occurring outside the scope of community activities when such behaviour has the potential to adversely affect the safety and well-being of community members.
For others setting up or running an NVDA group of any kind, it is strongly recommended that a complementary Citizen and Contributor Code of Conduct is adopted.

## 9. Contact info
[email protected]

## 10. License and attribution
The Citizen and Contributor Code of Conduct is distributed by NV Access Limited.
Portions of text were derived from the GitHub sample Citizen and Contributor Code of Conduct, which is distributed under a Creative Commons Attribution-ShareAlike license.

Revision1.0 adopted by NV Access Limited on 2020-09-23
13 changes: 13 additions & 0 deletions devDocs/developerGuide.t2t
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ Subsequent lines contain a textual identifier used to identify the symbol, a tab
For example:
```
. sentence ending (?<=[^\s.])\.(?=[\"')\s]|$)
dates with . \b(\d\d)\.(\d\d)\.(\d{2}|\d{4})\b
```

Again, the English symbols are inherited by all other locales, so you need not include any complex symbols already defined for English.
Expand All @@ -98,6 +99,8 @@ Certain characters cannot be typed into the file, so the following special seque
- \f: form feed
- \#: # character (needed because # at the start of a line denotes a comment)
- replacement: The text which should be spoken for the symbol.
If the symbol is a complex symbol, \1, \2, etc. can be used to refer to the groups matches, which will be inlined in the replacement, allowing for simpler rules.
This also means that to get a \ character in the replacement, one has to type \\.
- level: The symbol level at which the symbol should be spoken.
The symbol level is configured by the user and specifies the amount of symbols that should be spoken.
This field should contain one of the levels "none", "some", "most", "all" or "char", or "-" to use the default.
Expand Down Expand Up @@ -133,6 +136,13 @@ It means that the ". sentence ending" complex symbol should be spoken as "point"
Level and preserve are not specified, so they will be taken from English.
A display name is provided so that French users will know what the symbol represents.

```
dates with . \1 point \2 point \3 all norep # date avec points
```
This line appears in the French symbols.dic file.
It means that the first, second, and third groups of the match will be included, separated by the word 'point'.
The effect is thus to replace the dots from the date with the word 'point'.

Please see the file locale\en\symbols.dic for the English definitions which are inherited for all locales.
This is also a good full example.

Expand Down Expand Up @@ -468,6 +478,9 @@ The following keyword arguments can be used when applying the script decorator:
This option defaults to False.
- bypassInputHelp: A boolean indicating whether this script should run when input help is active.
This option defaults to False.
- resumeSayAllMode: The say all mode that should be resumed when active before executing this script.
The constants for say all mode are prefixed with CURSOR_ and specified in the sayAllHandler modules.
If resumeSayAllMode is not specified, say all does not resume after this script.
-

Though the script decorator makes the script definition process a lot easier, there are more ways of binding gestures and setting script properties.
Expand Down
2 changes: 1 addition & 1 deletion include/liblouis
Submodule liblouis updated 49 files
+32 −5 .dockerignore
+3 −0 .gitignore
+1 −1 .travis/before_install/gcc.sh
+51 −63 ANNOUNCEMENT
+0 −33 Dockerfile.dev
+82 −0 Dockerfile.win32
+69 −0 Dockerfile.win64
+9 −25 HACKING
+21 −45 Makefile.am
+71 −1 NEWS
+3 −2 configure.ac
+185 −0 contrib/ascii-braille.el
+1 −0 contrib/braille-input.el
+2 −2 doc/liblouis.texi
+1 −0 extra/generate-display-names/display-names
+2 −3 liblouis/compileTranslationTable.c
+3 −1 liblouis/internal.h
+1 −0 tables/Makefile.am
+7 −2 tables/afr-za-g2.ctb
+2 −0 tables/ar-ar-comp8.utb
+224 −0 tables/cop-eg-comp8.utb
+5 −0 tables/en-chardefs.cti
+17 −10 tables/he-IL.utb
+230 −33 tables/malayalam.cti
+257 −26 tables/ms-my-g2.ctb
+3 −0 tables/no-no-8dot-fallback-6dot-g0.utb
+3 −0 tables/no-no-8dot.utb
+3 −0 tables/no-no-g0.utb
+3 −0 tables/no-no-g1.ctb
+3 −0 tables/no-no-g2.ctb
+2 −0 tables/no-no-g3.ctb
+2 −0 tables/no.tbl
+9 −7 tables/pt-pt-g1.utb
+5 −0 tests/Makefile.am
+32 −0 tests/attributeNames.c
+3 −1 tests/braille-specs/Makefile.am
+75 −59 tests/braille-specs/afr-za-g2.yaml
+26 −0 tests/braille-specs/cop-eg.yaml
+4 −0 tests/braille-specs/en-us-g2.yaml
+6 −0 tests/braille-specs/he-IL.yaml
+0 −2 tests/braille-specs/litdigits6Dots_backward.yaml
+3,798 −0 tests/braille-specs/ml.yaml
+28 −51 tests/braille-specs/ms-my-g2.yaml
+215 −3 tests/braille-specs/pt-g1.yaml
+1 −1 tests/tables/Makefile.am
+5 −0 tests/tables/attribute/Makefile.am
+11 −0 tests/tables/attribute/attributeName_invalid.utb
+9 −0 tests/tables/attribute/attributeName_valid.utb
+1 −1 windows/include/config.h
4 changes: 3 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ NVDA (NonVisual Desktop Access) is a free, open source screen reader for Microso
It is developed by NV Access in collaboration with a global community of contributors.
To learn more about NVDA or download a copy, visit the main [NV Access](http://www.nvaccess.org/) website.

Please note: the NVDA project has a [Citizen and Contributor Code of Conduct](CODE_OF_CONDUCT.MD). NV Access expects that all contributors and other community members read and abide by the rules set out in this document while participating or contributing to this project.

## Get support
Either if you are a beginner, an advanced user, a new or a long time developer, or if you are an organization willing to know more or to contribute to NVDA, you can get support through the documentation in place as well as several communication channels dedicated for the NVDA screen reader. Here is an overview of the most important support sources.

Expand Down Expand Up @@ -87,7 +89,7 @@ For reference, the following run time dependencies are included in Git submodule
* [IAccessible2](https://wiki.linuxfoundation.org/accessibility/iaccessible2/start), commit cbc1f29631780
* [ConfigObj](https://github.com/DiffSK/configobj), commit f9a265c
* [Six](https://pypi.python.org/pypi/six), version 1.12.0, required by wxPython and ConfigObj
* [liblouis](http://www.liblouis.org/), version 3.14.0
* [liblouis](http://www.liblouis.org/), version 3.15.0
* [Unicode Common Locale Data Repository (CLDR)](http://cldr.unicode.org/) Emoji Annotations, version 37.0
* NVDA images and sounds
* [Adobe Acrobat accessibility interface, version XI](https://download.macromedia.com/pub/developer/acrobat/AcrobatAccess.zip)
Expand Down
18 changes: 18 additions & 0 deletions source/NVDAObjects/IAccessible/chromium.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,22 @@ def _get_states(self):
return states


class PresentationalList(ia2Web.Ia2Web):
"""
Ensures that lists like UL, DL and OL always have the readonly state.
A work-around for issue #7562
allowing us to differentiate presentational lists from interactive lists
(such as of size greater 1 and ARIA list boxes).
In firefox, this is possible by the presence of a read-only state,
even in a content editable.
"""

def _get_states(self):
states = super().states
states.add(controlTypes.STATE_READONLY)
return states


def findExtraOverlayClasses(obj, clsList):
"""Determine the most appropriate class(es) for Chromium objects.
This works similarly to L{NVDAObjects.NVDAObject.findOverlayClasses} except that it never calls any other findOverlayClasses method.
Expand All @@ -82,5 +98,7 @@ def findExtraOverlayClasses(obj, clsList):
clsList.append(ComboboxListItem)
elif obj.role == controlTypes.ROLE_TOGGLEBUTTON:
clsList.append(ToggleButton)
elif obj.role == controlTypes.ROLE_LIST and obj.IA2Attributes.get('tag') in ('ul', 'dl', 'ol'):
clsList.append(PresentationalList)
ia2Web.findExtraOverlayClasses(obj, clsList,
documentClass=Document)
23 changes: 21 additions & 2 deletions source/NVDAObjects/IAccessible/ia2TextMozilla.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,19 @@ def _getEmbedded(obj, offset):

class MozillaCompoundTextInfo(CompoundTextInfo):

def _getControlFieldForObject(self, obj, ignoreEditableText=True):
controlField = super()._getControlFieldForObject(obj, ignoreEditableText=ignoreEditableText)
if controlField is None:
return None
# Set the uniqueID of the controlField if we can get one
# which ensures that two controlFields with the same role and states etc are still treated differently
# if they are actually for different objects.
# E.g. two list items in a list.
uniqueID = obj.IA2UniqueID
if uniqueID is not None:
controlField["uniqueID"] = uniqueID
return controlField

def __init__(self, obj, position):
super(MozillaCompoundTextInfo, self).__init__(obj, position)
if isinstance(position, NVDAObject):
Expand Down Expand Up @@ -99,7 +112,7 @@ def __init__(self, obj, position):
# The caret is at the end of an inline object.
# This will report "blank", but we want to report the character just after the caret.
try:
caretTi, caretObj = self._findNextContent(caretTi)
caretTi, caretObj = self._findNextContent(caretTi, limitToInline=True)
except LookupError:
pass
self._start = self._end = caretTi
Expand Down Expand Up @@ -513,7 +526,7 @@ def expand(self, unit):
self._end = end
self._endObj = endObj

def _findNextContent(self, origin, moveBack=False):
def _findNextContent(self, origin, moveBack=False, limitToInline=False):
if isinstance(origin, textInfos.TextInfo):
ti = origin
obj = ti.obj
Expand All @@ -529,6 +542,12 @@ def _findNextContent(self, origin, moveBack=False):
if obj == self.obj:
# We're at the root. Don't go any further.
raise LookupError
if limitToInline:
if obj.IA2Attributes.get('display') != 'inline':
# The caller requested to limit to inline objects.
# As this container is not inline,
# We cannot go above this container.
raise LookupError
ti = self._getEmbedding(obj)
if not ti:
raise LookupError
Expand Down
66 changes: 66 additions & 0 deletions source/NVDAObjects/UIA/VisualStudio.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# This file is covered by the GNU General Public License.
# See the file COPYING for more details.
# Copyright (C) 2020 NV Access Limited, Leonard de Ruijter

"""
Object overlay classes for Visual Studio components
available in Visual Studio and SQL Server Management Studio.
"""

from . import UIA
import speech
import braille
import api


class IntelliSenseItem(UIA):

def _get_name(self):
return self.UIAElement.cachedAutomationID

def event_UIA_elementSelected(self):
# Cancel speech to have speech announce the selection as soon as possible.
# This is needed because L{reportFocus} does not cancel speech.
# Therefore, if speech wouldn't be cancelled,
# selection announcements would queue up when changing selection rapidly.
speech.cancelSpeech()
api.setNavigatorObject(self, isFocus=True)
self.reportFocus()
# Display results as flash messages.
braille.handler.message(braille.getPropertiesBraille(
name=self.name, role=self.role, positionInfo=self.positionInfo, description=self.description
))


class IntelliSenseList(UIA):
...


class IntelliSenseLiveRegion(UIA):
"""
Visual Studio uses both Intellisense menu item objects and a live region
to communicate Intellisense selections.
NVDA uses the menu item approach and therefore the live region provides doubled information
and is disabled.
"""

_shouldAllowUIALiveRegionChangeEvent = False


_INTELLISENSE_LIST_AUTOMATION_IDS = {
"listBoxCompletions",
"CompletionList"
}


def findExtraOverlayClasses(obj, clsList):
if obj.UIAAutomationId in _INTELLISENSE_LIST_AUTOMATION_IDS:
clsList.insert(0, IntelliSenseList)
elif isinstance(obj.parent, IntelliSenseList) and obj.UIAElement.cachedClassName == "IntellisenseMenuItem":
clsList.insert(0, IntelliSenseItem)
elif (
obj.UIAElement.cachedClassName == "LiveTextBlock"
and obj.previous
and isinstance(obj.previous.previous, IntelliSenseList)
):
clsList.insert(0, IntelliSenseLiveRegion)
4 changes: 4 additions & 0 deletions source/NVDAObjects/UIA/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -957,6 +957,10 @@ def findOverlayClasses(self,clsList):
except ValueError:
pass

if self.UIAElement.cachedFrameworkID == "WPF" and self.appModule.appName in ("devenv", "ssms"):
from . import VisualStudio
VisualStudio.findExtraOverlayClasses(self, clsList)

# Support Windows Console's UIA interface
if (
self.windowClassName == "ConsoleWindowClass"
Expand Down
5 changes: 3 additions & 2 deletions source/NVDAObjects/window/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import displayModel
import eventHandler
from NVDAObjects import NVDAObject
from NVDAObjects.behaviors import EditableText, LiveText
from NVDAObjects.behaviors import EditableText, EditableTextWithoutAutoSelectDetection, LiveText
import watchdog
from locationHelper import RectLTWH

Expand Down Expand Up @@ -390,7 +390,8 @@ class Desktop(Window):
def _get_name(self):
return _("Desktop")

class DisplayModelEditableText(EditableText, Window):

class DisplayModelEditableText(EditableTextWithoutAutoSelectDetection, Window):

role=controlTypes.ROLE_EDITABLETEXT
TextInfo = displayModel.EditableTextDisplayModelTextInfo
Expand Down
Loading

0 comments on commit 55a365e

Please sign in to comment.