Closed Bug 1927108 Opened 1 year ago Closed 1 year ago

The information in the Why Paused panel is not read properly with NVDA on windows

Categories

(DevTools :: Debugger, defect)

defect

Tracking

(Accessibility Severity:s3, firefox134 fixed)

RESOLVED FIXED
134 Branch
Accessibility Severity s3
Tracking Status
firefox134 --- fixed

People

(Reporter: bomsy, Assigned: bomsy)

References

(Blocks 2 open bugs)

Details

(Keywords: access)

Attachments

(1 file)

In Bug 1843320 the WhyPaused is turned into a live region. During tests this works ok with Voice Over on Mac, but does not read properly on NVDA on Windows.
Some details of the issues from https://phabricator.services.mozilla.com/D223928#7808007

  1. It looks like the function name + file + line number get read out directly after "Paused while stepping" with no space in between. For instance, NVDA reads to me "Paused while steppinga.init - fxa.6cacc544775b.js:1:5819". It says "steppinga" not "stepping a" because there doesn't seem to be a space. This might be an NVDA quirk (maybe it ignores the \n?) but seems worth mentioning.
  2. When you step through a prettified version of a minified file, the output gets even more verbose. NVDA read me "Paused while steppinga.init - fxa.6cacc544775b.js:1:5819 a.init - fxa.6cacc544775b.js:formatted:289:2" for every line. That's a lot of information for advancing one line. Maybe we could trim it to just the formatted file?
No longer depends on: cm-debugger-next
Blocks: 1927115
Flags: needinfo?(nchevobbe)

Here's where we render the message https://searchfox.org/mozilla-release/rev/e0e05140777a65b4c719d51fbea8d31e7942857d/devtools/client/debugger/src/components/SecondaryPanes/WhyPaused.js#191-199

div(
  {
    className: "pause reason",
  },
  React.createElement(Localized, {
    id: reason,
  }),
  this.renderMessage(why)
)

this results in a markup that looks like this:

<div class="pause reason">
  Paused while stepping
  <div>script.js:10:0</div>
</div>

I tried adding a space after "Paused", but it didn't change anything in NVDA.
What worked was to wrap "Paused" into its own <div>

div(
  {
    className: "pause reason",
  },
  div(
    {}, 
    React.createElement(Localized, {
      id: reason,
    }),
  )
  this.renderMessage(why)
)

I think this change is going to impact snapshots, but I don't have node/npm installed on my windows machine, bomsy, do you think you can write this patch and update the tests ?

Flags: needinfo?(nchevobbe) → needinfo?(hmanilla)
Accessibility Severity: --- → s3

Sure Nicholas, i'll take a look.

Assignee: nobody → hmanilla
Status: NEW → ASSIGNED
Pushed by hmanilla@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/830aa3fdaf67 [devtools] - Fix WhyPaused dom structure to support NVDA screen reader on windows r=devtools-reviewers,nchevobbe
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 134 Branch
Flags: needinfo?(hmanilla)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: