Skip to content

Allow users to change the order in which object properties are reported in speech and braille #7232

@LeonarddeR

Description

@LeonarddeR

There have been opened some issues in the past regarding the order of speech and braille output. For example, we have issue #4629 which covers Reading Column & Row Titles before the content instead of after. Furthermore, we have #4195 and #6901 regarding displaying column and row headers in braille. To add more, I've received several questions regarding this subject from people who wanted to change the order of object speech, e.g. "to report "Not checked I agree check box" instead of "I agree checkbox not checked", etc. Personally, I would stick with the current speech order but would change the default braille order significantly, e.g. by moving cell coordinates up a hole lot. Last but not least, we have ticket #214 that covers braille verbosity

So I'd like to open this ticket as an umbrella ticket and come up with a use case which covers everything here and to use it as a discussion ticket for implementation. The idea I'd like to implement is the ability to change the order object properties are reported in speech and braille, initially using NVDA's configuration file, but preferably using the UI.

Under de hood part

For this part, here are the steps I propose:

  1. Add new items to the presentation config spec for speech and braille, e.g.

    speechPropertiesOrder = string_list(max={objectPropertiesCount},default=name, role, value, description, keyboardShortcut, cellCoordsText, rowHeaderText, rowNumber, columnHeaderText, columnNumber, rowCount, columnCount, current, positionInfo)

    I have discussed other possibilities for this with @derekriemer, this one seems to be the most easy to implement and maintain, at least better than a dictionary kind of approach where the position is either key or value. It also allows someone to just keep some strings out of the order, which will automatically stop reporting them. This means that the underlying behaviour of reportKeyboardShortcuts, reportObjectDescriptions and reportObjectPositionInformation can be changed, just remove those from the string list

  2. In speech.getSpeechTextForProperties, add all the speech parts to a dictionary, e.g. called textDict. The key is one of the strings from the config spec example above

  3. Than, loop through the items in config.conf['presentation']['speechPropertiesOrder'] and add text chunks to the textList using that order. Make sure that level will always be first for tree view level changes, regardless of custom speech order

  4. Thanks to @derekriemer who came up with this: Provide, or at least document, the fact that every new property (e.g. aria-current has been added recently) needs a config spec update. New properties can be included in every desired position in the properties order. For custom property orders, try to find newProperty-1 in the custom order and insert the new property after that item. If newProperty-1 does not exist in the custom order, try newProperty-2, newPoperty-3, etc.

UX

  1. Create a new class in guiHelper called sortableListHelper. This class will add a list control to the gui, along with move up and move down buttons which change order
  2. Add a sortableListHelper control to object presentation to reorder speech properties

Things that need discussion

  1. There is a difference in property order between object presentation and document presentation. What to do with these?

  2. Ideally, I'd like list items to be checkable (i.e. like the list control in Windows Disk cleanup). This would allow for enabling/disabling items on the fly. That would have some major impact on the gui though, e.g. three options from object presentation can be removed and cell coordinates, column and row numbers could be disabled from this new list control. I think this shouldn't be a part of the initial implementation

... Probably more

CC @jcsteh @dkager @josephsl

Metadata

Metadata

Assignees

No one assigned

    Labels

    ADR-requiredArchitecture Design Request required for this issue: refer to proposingMajorChanges.mdcomponent/braillecomponent/speechfeaturep5https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#prioritytriagedHas been triaged, issue is waiting for implementation.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions