Closed Bug 1870062 Opened 1 year ago Closed 3 months ago

Breakpoint isn't a button while it can be clicked

Categories

(DevTools :: Debugger, defect, P3)

defect

Tracking

(Accessibility Severity:s2, firefox133 fixed)

RESOLVED FIXED
133 Branch
Accessibility Severity s2
Tracking Status
firefox133 --- fixed

People

(Reporter: ochameau, Assigned: bomsy, NeedInfo)

References

(Depends on 1 open bug, Blocks 2 open bugs, Regressed 1 open bug)

Details

(Keywords: access)

Attachments

(1 file)

Bug 1834729 expanded the coverage of browser_dbg-editor-select.js, but trigerred an a11y warning on Breakpoint Element:
https://searchfox.org/mozilla-central/rev/4d6a5b97428760d15bfcad13f8fc81439370a7ec/devtools/client/debugger/src/components/SecondaryPanes/Breakpoints/Breakpoint.js#134-187
which is using a div while it can be clicked.

Hi Alexandre, it seems that the breakpoint element could be made accessible with role="button" added.

It may not need to be keyboard focusable with tab key, depending on the keyboard navigation on the page (if it's included in the focus order with arrow keys as the tabpanels do, for instance, then you may need to AccessibilityUtils.setEnv({focusabeRule: false}) right before the click on it and then AccessibilityUtils.resetEnv() after the click in the test file), but adding a role would at least allow this element to be usable with voice control software and to be discoverable in the list of controls of a screen reader.

LMK if I can help.

Flags: needinfo?(poirot.alex)
Accessibility Severity: --- → s2
Keywords: access
Blocks: 1870610
See Also: → 1732635
Blocks: 1773246
Type: enhancement → defect
Flags: needinfo?(poirot.alex)
Severity: -- → S3
Priority: -- → P3

The severity field for this bug is set to S3. However, the accessibility severity is higher, .
:bomsy, could you consider increasing the severity?

For more information, please visit BugBot documentation.

Flags: needinfo?(hmanilla)

We don't usually align a11y severity with the devtools ui bug severity.

Flags: needinfo?(hmanilla)

(In reply to Anna Yeddi [:ayeddi] from comment #1)

Hi Alexandre, it seems that the breakpoint element could be made accessible with role="button" added.

It may not need to be keyboard focusable with tab key, depending on the keyboard navigation on the page (if it's included in the focus order with arrow keys as the tabpanels do, for instance, then you may need to AccessibilityUtils.setEnv({focusabeRule: false}) right before the click on it and then AccessibilityUtils.resetEnv() after the click in the test file), but adding a role would at least allow this element to be usable with voice control software and to be discoverable in the list of controls of a screen reader.

LMK if I can help.

Hello Anna, we were discussing how to make adding/removing a breakpoint keyboard accessible with the team.

Breakpoint can be set/removed on a line by navigating to said line in the document (or use Ctrl+G to go to specific line), and then hit Ctrl+B (Cmd+B on Mac) to toggle the breakpoint. And once you set a breakpoint, you can disable it/remove it from the breakpoints panel.
Is this enough to consider breakpoints management keyboard accessible, or not?
Those shortcuts are displayed in our shortcut panel, but they're pretty hidden as you need to hit Ctrl+/ (Cmd+/ on Mac)

Having the gutter element as buttons doesn't feel super straightforward, especially if you need to add a breakpoint on a line at the very bottom.
I remember reading about how making something accessible is sometimes not about making the UI elements accessible, but simply having a way to perform the operation, even if it's through some other way. But maybe in this case this doesn't apply?

Flags: needinfo?(ayeddi)

(In reply to Nicolas Chevobbe [:nchevobbe] from comment #4)

(In reply to Anna Yeddi [:ayeddi] from comment #1)

Hi Alexandre, it seems that the breakpoint element could be made accessible with role="button" added.

It may not need to be keyboard focusable with tab key, depending on the keyboard navigation on the page (if it's included in the focus order with arrow keys as the tabpanels do, for instance, then you may need to AccessibilityUtils.setEnv({focusabeRule: false}) right before the click on it and then AccessibilityUtils.resetEnv() after the click in the test file), but adding a role would at least allow this element to be usable with voice control software and to be discoverable in the list of controls of a screen reader.

LMK if I can help.

Hello Anna, we were discussing how to make adding/removing a breakpoint keyboard accessible with the team.

Breakpoint can be set/removed on a line by navigating to said line in the document (or use Ctrl+G to go to specific line), and then hit Ctrl+B (Cmd+B on Mac) to toggle the breakpoint. And once you set a breakpoint, you can disable it/remove it from the breakpoints panel.
Is this enough to consider breakpoints management keyboard accessible, or not?
Those shortcuts are displayed in our shortcut panel, but they're pretty hidden as you need to hit Ctrl+/ (Cmd+/ on Mac)

Having the gutter element as buttons doesn't feel super straightforward, especially if you need to add a breakpoint on a line at the very bottom.
I remember reading about how making something accessible is sometimes not about making the UI elements accessible, but simply having a way to perform the operation, even if it's through some other way. But maybe in this case this doesn't apply?

Thank you for the context, Nicolas! Thank you for continuing working on the dev tools a11y.

Maybe we could make the added breakpoints as role=button and use a list navigation (aka "inside component navigation or arrow navigation) between them? Then, when someone used a shortcut to set up a breakpoint, they could still find and activate it to remove it from the code.

CCing Jamie in case there are other options to improve the adding/removing breakpoints for keyboard users.

Flags: needinfo?(ayeddi) → needinfo?(jteh)

(In reply to Anna Yeddi [:ayeddi] from comment #5)

Maybe we could make the added breakpoints as role=button and use a list navigation (aka "inside component navigation or arrow navigation) between them? Then, when someone used a shortcut to set up a breakpoint, they could still find and activate it to remove it from the code.

Thanks a lot for the reply Anna, I'll have a look into that.

Let's only do this for CodeMirror 6, as cm5 might require a very different solution

No longer blocks: 1773246
Depends on: 1904488
Assignee: nobody → hmanilla
Pushed by hmanilla@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/a157c48ede88 [devtools] Make the breakpoint items in the breakpoints panel accessible r=devtools-reviewers,nchevobbe
Regressions: 1926743
Status: NEW → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → 133 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: