Skip to content

report busy indicator#13428

Merged
feerrenrut merged 18 commits into
masterfrom
indeterminateProgressBar
Mar 11, 2022
Merged

report busy indicator#13428
feerrenrut merged 18 commits into
masterfrom
indeterminateProgressBar

Conversation

@feerrenrut

@feerrenrut feerrenrut commented Mar 4, 2022

Copy link
Copy Markdown
Contributor

Link to issue number:

fixes #10644

Summary of the issue:

On the web, widgets with role="progressbar" and no aria-valuenow are reported by NVDA as "progress bar half checked zero".
These widgets are exposed by the browser with:

  • IAccessible accRole ROLE_SYSTEM_PROGRESSBAR
  • IAccessible accState STATE_SYSTEM_MIXED, STATE_SYSTEM_INDETERMINATE.

In chrome the value is always "0" in this case.
Note, in firefox, if aria-valuetext is provided, STATE_SYSTEM_INDETERMINATE is not set and accValue has the aria-valuetext.

Test cases on code pen editor, full

Description of how this pull request fixes the issue:

An 'indeterminate' progress bar has no value attribute, it can not convey progress, only activity.
Rather than reporting as a progress bar it is given a new NVDA role of "busy indicator" and its value ("zero") is no longer reported.

Technical details.

  • Code to convert decode the bit flags (integer) supplied by IA / IA2 into a set of NVDA States was repeated, this has been extracted to a fucntion, centralized in IAccessibleHandler, and optimised.
    Commits:
    • Extract states calculations
    • Optimise / simplify state calculations
  • The initial approach was to report "progress bar indeterminate", see commit: Report as 'progress bar indeterminate'

Value was exposed as the text node in the virtual buffer, in this case space is now used.

Testing strategy:

Test cases on code pen editor, full

  • Tested chrome and firefox, speech and braille
  • Focus mode (navigate with tab)
  • Browse mode (navigate with tab)
  • Browse mode (navigate with down arrow)

Known issues with pull request:

None

Change log entries:

New features
Changes

- Added new role for "busy indicator" controls. (#10644)

Code Review Checklist:

  • Pull Request description:
    • description is up to date
    • change log entries
  • Testing:
    • Unit tests
    • System (end to end) tests
    • Manual testing
  • API is compatible with existing add-ons.
  • Documentation:
    • User Documentation
    • Developer / Technical Documentation
    • Context sensitive help for GUI changes
  • UX of all users considered:
    • Speech
    • Braille
    • Low Vision
    • Different web browsers
    • Localization in other languages / culture than English

Rather than test all 32 bits, just check the values NVDA maps from.
Reduces IA states calculation to 18 comparisons
Reduces IA2 states calculation to 10 comparisons
A fallback option if 'busy indicator' isn't accepted.
Edge
Focus mode: 'loading  busy indicator  zero'
Browse mode: 'loading  busy indicator  zero`

Firefox
Focus mode: 'loading  busy indicator  50"
Browse mode: 'loading  busy indicator  50"
@feerrenrut feerrenrut requested review from a team as code owners March 4, 2022 08:58
@AppVeyorBot

This comment was marked as outdated.

@CyrilleB79

Copy link
Copy Markdown
Contributor

I am afraid this new role can create confusion. Is there a busy indicator object in one of the various interface specifications (IAccessible, UIA, etc.)
More generally, if I speak of a busy indicator, does someone (sighted or not) know what it is?

From a user point of view, busy indicator may let think to the unrelated following concepts:

  • The browser indicates "busy" when the page is loading
  • "busy" may also refer to a mouse pointer shape (e.g. hourglass, clock, etc.) indicating that the computer is busy.

And overall, we lose the information that the "busy indicator" is actually a progress bar. In case of collaboration with a sighted person, this creates communication difficulties.

I have not followed all the discussion but could the following solutions be implemented instead?
Give the progress bar with undetermined stat a state or value of "running", "working", etc.? I agree that it's not so easy to find a correct wording for it. But creating a new role instead seems more confusing to me.

@Qchristensen Qchristensen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

bsyind for Braille looks good.

@seanbudd seanbudd left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hi @feerrenrut,

I've added a couple of minor notes but otherwise LGTM.
Would you like a secondary review for the c++ code? It's a fairly straightforward change in my opinion.

Also, in case you missed it - a unit test needs fixing: https://ci.appveyor.com/project/NVAccess/nvda/builds/42786502/tests
This test exists to ensure each state/role has a display string, but I see that this is unnecessary for State.INDETERMINATE?

Comment thread source/speech/speech.py
Comment thread source/IAccessibleHandler/__init__.py Outdated
Comment thread source/IAccessibleHandler/__init__.py Outdated
Comment thread source/IAccessibleHandler/__init__.py Outdated
@feerrenrut

Copy link
Copy Markdown
Contributor Author

@CyrilleB79 These kinds of progress bars do not convey progress visually and they can be presented in lots of different ways.

From a user point of view, busy indicator may let think to the unrelated following concepts:

The browser indicates "busy" when the page is loading
"busy" may also refer to a mouse pointer shape (e.g. hourglass, clock, etc.) indicating that the computer is busy.

These are related concepts. The main intent of an indeterminate progress bar is to reassure the user that something is happening, even though the amount of work / time remaining is unknown.

Give the progress bar with undetermined stat a state or value of "running", "working", etc.? I agree that it's not so easy to find a correct wording for it. But creating a new role instead seems more confusing to me.

The main argument against is an indeterminate progress bar widgets do not convey progress, they have no 'value' attribute, so they can't. Announcing "progress bar working" is longer than it needs to be, the role is misleading and the state is redundant. Essentially, an indeterminate progress bar is a mono-state control.

@CyrilleB79

Copy link
Copy Markdown
Contributor

@CyrilleB79 These kinds of progress bars do not convey progress visually and they can be presented in lots of different ways.

OK Thanks. Since you mention a great variety of presentations, the busy indicator makes sense.

My last remaining concern is the situation where a progress bar transitions from half-checked (undeterminate) state to (determinate) value = 100%. That is, when a task is in progress without any estimation of the advancement and then is completed.
I have no real situation where this occurs.

  • Can this situation occur? If yes, is it common?
  • In such case, would NVDA report the role change?

Should this situation be common, I think that the role change may be misleading from a user point of view.
If it is not (what is more likely), there is no need to change the design for such a corner case.

@feerrenrut

Copy link
Copy Markdown
Contributor Author

Can this situation occur?

Yes, it could. This, would be author intent though, there may be valid reasons to want to do this.
I have updated the sample with this case.

If yes, is it common?

I doubt it. It's certainly an edge case.

In such case, would NVDA report the role change?

Currently, NVDA will report the final beep and "100%" (depending on the user's setting for presentation, progress bar output).
With my current test case approach, Chrome seems to swap the IAccessible object when changing from indeterminate to complete determinate. This is a real corner case (author wants to swap from indeterminate to determinate, user wants to monitor the widget for completion), that I suspect there are work arounds for. If it came to it, we could probably resolve the issues (perhaps requiring changes in chrome) but certainly it shouldn't block this initial implementation.

@AppVeyorBot

This comment was marked as outdated.

Use in:
- calculateNvdaStates
- calculateNvdaRole

Also correct IA2States -> IAStates.
Add an exclusion for states and roles that don't have display strings
These are checked to ensure they don't have labels.
@AppVeyorBot

This comment was marked as outdated.

@feerrenrut feerrenrut requested a review from seanbudd March 10, 2022 09:01
Comment thread source/IAccessibleHandler/__init__.py Outdated

@seanbudd seanbudd left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @feerrenrut

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Indeterminate Progress bars reported as "half-checked"

7 participants