Audacity Bug Summary
••• Introduction •••
••• Keywords •••
    Audacity 3.0.3 development began 19th April 2021

Audacity Bugzilla



Bug 1361 - Analyze Contrast should not allow typing selection times
Analyze Contrast should not allow typing selection times
Status: RESOLVED QUICKFIXED
Product: Audacity
Classification: Unclassified
Component: Built-in FX
unspecified
Per OS All
: P3 Repeatable
Assigned To: Steve Daulton
:
Depends on:
Blocks: 1362
  Show dependency treegraph
 
Reported: 2016-03-24 05:42 UTC by Steve Daulton
Modified: 2018-08-20 11:51 UTC (History)
7 users (show)

See Also:
Steps To Reproduce:
Release Note:
First Git SHA:
Group: ---
Workaround:
Closed: 2018-08-20 00:00:00
stevethefiddle: Accessibility+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Daulton 2016-03-24 05:42:32 UTC
In Audacity 1.3.7 there were two buttons for "foreground" and two for "background". In both cases the first button was labelled "Measure" and the second "Use Selection".

"Measure" button:
Disabled until times are entered into the effect time controls.
When enabled and clicked, the time region defined by the time controls is measured.
This uses the function: OnGetForegroundDB or OnGetBackgroundDB

"Use Selection" button:
Always enabled.
When clicked, the audio that is selected in the track (defined in the Selection toolbar) is measured.
This uses the function: OnUseSelectionF or OnUseSelectionB

The GUI for "Analyze Contrast" in 1.3.7 was modal, which explains why it was necessary to provide time selection within the effect GUI.

Sometime between 1.3.7 and 2.0.0, the GUI became modeless and the "Measure" buttons were removed. The "Use Selection" buttons were renamed "Measure Selection", and this button called the function OnUseSelectionF or OnUseSelectionB

The "modern" version of the effect is documented in the E-Ramp documentation:
http://www.eramp.com/WCAG_2_audio_contrast_tool_help.htm

Since the Contrast window became modeless, typing numbers into the time controls in the Contrast GUI does nothing (nothing implemented), so should be disabled.

Initially marked P3 but no release note added as I intend to Quick-Fix.
Comment 1 Steve Daulton 2016-03-24 10:40:48 UTC
Reading through 'all' of the instructions on http://www.eramp.com/WCAG_2_audio_contrast_tool_help.htm
in the "Directions for non-mouse, keyboard users" section:

"* Tab to the Foreground Start time box
* Enter the "Start" time of the foreground
(arrow keys will move from number to number in the time box)
* Tab to the "End" time of the Foreground and enter that."

However, I can't find any version of Analyze Contrast where that works.

Even in the Audacity 1.3.7 modal version (with two buttons for foreground and two for background), setting times in the Contrast GUI does NOT change the audio selection (as shown in the audio track and the the Selection Toolbar).

As the buttons in the current version are labelled "Measure Selection", and as these buttons have measured the audio selection (as shown in the Selection Toolbar), and as this has been the case for many years, I am strongly inclined to keep this behaviour and disable editing of the time controls.

Our manual is a bit vague about this: http://manual.audacityteam.org/man/Contrast
It begins:
"To use Contrast Analysis, select in either a single mono speech track, or in the left or right channel only of a stereo speech track."

"select in" links to the manual page about selecting audio, but there is no mention of whether the time controls are input controls or information only.
Do we actually need these time "controls" at all, given that they do nothing and have done nothing for years?
Comment 2 David Bailes 2016-03-25 08:56:43 UTC
(In reply to Steve Daulton from comment #1)
> Reading through 'all' of the instructions on
> http://www.eramp.com/WCAG_2_audio_contrast_tool_help.htm
> in the "Directions for non-mouse, keyboard users" section:
> 
> "* Tab to the Foreground Start time box
> * Enter the "Start" time of the foreground
> (arrow keys will move from number to number in the time box)
> * Tab to the "End" time of the Foreground and enter that."
> 
> However, I can't find any version of Analyze Contrast where that works.
> 
> Even in the Audacity 1.3.7 modal version (with two buttons for foreground
> and two for background), setting times in the Contrast GUI does NOT change
> the audio selection (as shown in the audio track and the the Selection
> Toolbar).
> 
> As the buttons in the current version are labelled "Measure Selection", and
> as these buttons have measured the audio selection (as shown in the
> Selection Toolbar), and as this has been the case for many years, I am
> strongly inclined to keep this behaviour and disable editing of the time
> controls.
> 
> Our manual is a bit vague about this:
> http://manual.audacityteam.org/man/Contrast
> It begins:
> "To use Contrast Analysis, select in either a single mono speech track, or
> in the left or right channel only of a stereo speech track."
> 
> "select in" links to the manual page about selecting audio, but there is no
> mention of whether the time controls are input controls or information only.
> Do we actually need these time "controls" at all, given that they do nothing
> and have done nothing for years?

The start and end times of the foreground and background are shown in the exported results, so having them displayed in the dialog may be desireable. However they don't need to be editable, and could be presented using read only text boxes, or some other alternative.

Martyn Shaw and David MacDonald may have useful input, if they're still interested in this.
Comment 3 Steve Daulton 2016-06-15 14:34:54 UTC
Fixed in https://github.com/audacity/audacity/commit/141e6cb4
Comment 4 Gale Andrews 2016-06-16 14:13:35 UTC
The Contrast Result "Please enter valid times." has a FIXME in the code that it occurs too often. I see it occurs after selecting a few samples then OK'ing a message that tells you to "Please select a section of track". 

Now that we can't "enter valid times" here (if we ever could). I suggest changing that message if we need it at all  - perhaps "Please measure two selections"?
Comment 5 Steve Daulton 2016-06-16 15:25:09 UTC
(In reply to Gale Andrews from comment #4)
That's not really relevant to bug 1361, but yes I'm working on it ;-)
Comment 6 Gale Andrews 2016-06-17 21:53:40 UTC
(In reply to Steve Daulton from comment #5)
I think the comment about the *enter* word being incorrect in "Please enter valid times" is relevant.

I confirm on El Capitan that I can't edit the text boxes with the keyboard.  

I think an uneditable text box that said "Edit Read Only" then read the value "would" be clearer but that might be thought of as overkill for the extra work. 

So David, can you RESOLVE this QUICKFIXED if you are happy that screen readers (at least NVDA and Orca) will still read out a number that is typed in the Contrast TimeText controls (after reading out the displayed time). With this commit, screen readers no longer read the number of the unit resulting after typing, and they no longer respond to UP or DOWN arrow in the TimeText Controls.
Comment 7 Gale Andrews 2016-06-21 20:06:39 UTC
(In reply to Gale Andrews from comment #6)
> I think the comment about the *enter* word being incorrect in "Please 
> enter valid times" is relevant.
Steve seems to have corrected that in his update for Contrast. Thanks for that.

> I think an uneditable text box that said "Edit Read Only" then read the value 
> "would" be clearer but that might be thought of as overkill for the extra work. 
>
> So David, can you RESOLVE this QUICKFIXED if you are happy that screen readers 
>(at least NVDA and Orca) will still read out a number that is typed in the 
> Contrast TimeText controls (after reading out the displayed time). With this 
> commit, screen readers no longer read the number of the unit resulting after 
> typing, and they no longer respond to UP or DOWN arrow in the TimeText Controls.

I've gone ahead and RESOLVED it as David has not replied here yet. 

David is welcome to reopen it if he is unsatisfied.
Comment 8 David Bailes 2016-06-22 04:33:09 UTC
(In reply to Gale Andrews from comment #6)
> (In reply to Steve Daulton from comment #5)
> I think the comment about the *enter* word being incorrect in "Please enter
> valid times" is relevant.
> 
> I confirm on El Capitan that I can't edit the text boxes with the keyboard.  
> 
> I think an uneditable text box that said "Edit Read Only" then read the
> value "would" be clearer but that might be thought of as overkill for the
> extra work.

Screen readers don't announce these controls as read only, and indeed for sighted users, there is also no indication that they are read only.

Ideally, read only text boxes should be used, as for example is done for the "save project as" and "export project as" text boxes in the Audacity Timer Record dialog.

However, this is a minor accessibility issue compared to over existing accessibility issues in Audacity, so probably isn't worth fixing at the moment.

> 
> So David, can you RESOLVE this QUICKFIXED if you are happy that screen
> readers (at least NVDA and Orca) will still read out a number that is typed
> in the Contrast TimeText controls (after reading out the displayed time).
> With this commit, screen readers no longer read the number of the unit
> resulting after typing, and they no longer respond to UP or DOWN arrow in
> the TimeText Controls.
Comment 9 Steve Daulton 2016-06-22 05:20:00 UTC
(In reply to David Bailes from comment #8)
> Ideally, read only text boxes should be used, as for example is done for
> the "save project as" and "export project as" text boxes in the Audacity
> Timer Record dialog.

FWIW, on my machine (Debian XFCE) there is no indication that read-only text boxes are read-only (other than not being able to write into it). On clicking in a read only text box, the box gains a bolder edge and an "I" cursor, giving a very convincing illusion that it should be possible to type into the text box.

For screen readers, would it be worth adding "(read only)" to the control label? If you think that would work and be useful David, please go ahead and do it.