[go: nahoru, domu]

Closed Bug 1884970 Opened 5 months ago Closed 13 days ago

Close current tab button is missing an accessible name and role

Categories

(Firefox :: Tabbed Browser, defect, P1)

defect

Tracking

()

RESOLVED FIXED
131 Branch
Accessibility Severity s2
Tracking Status
firefox131 --- fixed

People

(Reporter: ayeddi, Assigned: ayeddi)

References

(Blocks 1 open bug)

Details

(Keywords: access)

Attachments

(3 files)

The tab-close-button is not labeled and is missing an interactive role of button, while it is functioning as one.

Note: we do not want this control to be keyboard focusable, because keyboard-only user could close the tab via the context menu and we don't want to create an additional tab stop for the navigation as well, but making sure the control is marked up as a button with an accessible name would allow it to be actionable with speech-to-text software, with touch devices, with switch controls in scan mode, and for screen readers via their navigation shortcuts as well.

The tab-close-button is not labeled and is missing an interactive role of button, while it is functioning as one.

Note: we do not want this control to be keyboard focusable, because keyboard-only user could close the tab via the context menu and we don't want to create an additional tab stop for the navigation as well, but making sure the control is marked up as a button with an accessible name would allow it to be actionable with speech-to-text software, with touch devices, with switch controls in scan mode, and for screen readers via their navigation shortcuts as well.

Assignee: nobody → ayeddi
Status: NEW → ASSIGNED
Component: General → Tabbed Browser
See Also: → 1885143
Severity: -- → S2
Priority: -- → P1
Blocks: 1628396
Pushed by ayeddi@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/87d3cf2b45b2
Close current tab button is missing an accessible name and role. r=tabbrowser-reviewers,fluent-reviewers,dao,bolsson,flod

Backed out for causing bc failures in browser_multiselect_tabs_close.js

  • Backout link
  • Push with failures
  • Failure Log
  • Failure line: TEST-UNEXPECTED-FAIL | browser/components/tabbrowser/test/browser/tabs/browser_multiselect_tabs_close.js | Close tab button has an expected accessible name with 1 tabs (multi) selected. - {"args":{"tabCount":1},"id":"tabbrowser-close-tabs-button"} deepEqual {"id":"tabbrowser-close-tabs-tooltip","args":{"tabCount":1}} -
Flags: needinfo?(ayeddi)

Thank you, Cristian! Pushed the fixed test now.

Flags: needinfo?(ayeddi)
Pushed by ayeddi@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6ac47dbd939c
Close current tab button is missing an accessible name and role. r=tabbrowser-reviewers,fluent-reviewers,dao,bolsson,flod

Backed out for causing bc failures in browser_tab_tooltips.js

Flags: needinfo?(ayeddi)

Oh, sure. I’ll fix it today: thank you for the investigation

removing the hanging NI since there is one of test failures that I do not know yet how to explain and will need a help from someone in Layout team, I think.

Flags: needinfo?(ayeddi)
Duplicate of this bug: 1628396

So browser_tab_tooltips.js expects that the tooltip element with the id tabbrowser-tab-tooltip will be used for the close button, but that won't be the case anymore with this patch. Instead an anonymous tooltip node will be used. You can get that node like this:

document.addEventListener("popupshowing", event => {
  // event.target is the root node, event.originalTarget is the anonymous tooltip node
});

Does this help?

Flags: needinfo?(ayeddi)
No longer blocks: 1628396

Here's how I thought browser_tab_tooltips.js should be modified to deal with your changes. So far I've only run it without your changes though (and it passed).

Pushed by dgottwald@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/98f09025ffa6
Close current tab button is missing an accessible name and role. r=tabbrowser-reviewers,fluent-reviewers,dao,bolsson,flod
Status: ASSIGNED → RESOLVED
Closed: 13 days ago
Resolution: --- → FIXED
Target Milestone: --- → 131 Branch
Flags: needinfo?(ayeddi)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: