Closed Bug 1322621 Opened 8 years ago Closed 6 years ago

Removing aria-activedescendant while element is focused doesn't adjust accessible focus

Categories

(Core :: Disability Access APIs, defect, P3)

defect

Tracking

()

VERIFIED FIXED
mozilla63
Tracking Status
firefox63 --- verified

People

(Reporter: Jamie, Assigned: Jamie, Mentored)

References

(Blocks 2 open bugs)

Details

(Whiteboard: [mentor=:surkov])

Attachments

(3 files)

Attached file Test case.
STR:
1. Open the attached test case.
2. Tab to the list. The item will get focus.
3. Press escape.
Expected: A focus event should be fired on the list and the list should get the focused state.
Actual: No focus event is fired. The list item keeps the focused state.

This breaks the autocomplete in the Javascript console. For example, when the autocomplete appears, pressing escape doesn't return accessible focus to the input box.
This used to work, so this seems to be a regression. I have no idea when it regressed yet, though.
Keywords: regression
Alex, any ideas?
Blocks: aria
Flags: needinfo?(surkov.alexander)
It looks like DocAccessible::ARIAActiveDescendantChanged should call FocusManager::ActiveItemChanged in this case too. Now we call ActiveItemChanged only if active item is not null.

If this is a regression, then it must be pretty old one.
Flags: needinfo?(surkov.alexander)
Whiteboard: [mentor=:surkov]
Bug 977267 (landed August 2014) relies on this working. I'm not sure when it broke after this, but I feel like it was only some time this year. I'll try to narrow it down at some point.
Sorry. It seems I was wrong: this isn't a regression after all. I think the reason this seemed to work previously for bug 977267 is that the autocomplete items previously got removed when the autocomplete was dismissed. Now, they don't; they're still present, even though they're not shown visually. So, this is still a bug that needs to be fixed, but it isn't a core a11y regression.
Keywords: regression
Probably best to file a new bug in the right component (and DUPE this one to it). Morphing this one would add confusion/noise to the problem.
Flags: needinfo?(mzehe)
Flags: needinfo?(jamie)
On the contrary, this bug as described is definitely a bug in core a11y. It isn't a regression, but it's still broken. The JavaScript Console autocomplete regressed due to a change in the implementation, but at the end of the day, if this core a11y bug didn't exist, it would still work as expected. To put it another way, if I file a bug to fix the JS Console, they'd basically just be hacking around a core a11y bug.
Flags: needinfo?(jamie)
I definitely agree with Jamie here.
Flags: needinfo?(mzehe)
This is something we should triage and fix but isn't among our most urgent bugs.(Contributions welcome as always!)
Priority: -- → P3
Mentor: surkov.alexander
Assignee: nobody → jteh
Comment on attachment 9005534 [details]
Bug 1322621: If aria-activedescendant is removed or changed to an invalid id while an element is focused, move accessible focus to the element itself.

alexander :surkov (:asurkov) has approved the revision.
Attachment #9005534 - Flags: review+
Pushed by jteh@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/eac4056f176a
If aria-activedescendant is removed or changed to an invalid id while an element is focused, move accessible focus to the element itself. r=surkov
https://hg.mozilla.org/mozilla-central/rev/eac4056f176a
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
Flags: qe-verify+
Attached file New test case.html
I managed to reproduce this issue on Firefox 55.0a1 (2017-04-25), under Windows 10x64, using this new Test Case received from James Teh, since the one from Comment 0 is outdated.
The issue was verified on Firefox 63.0b6 and on Firefox 64.0a1 (2018-09-13) under Windows 10x64.
Note that I was not able to verify the issue on Mac OS and on Ubuntu OS, since the screen reader app is not reading from browsers.
James, please let me know if do you think that there is something else that we should cover for this issue.
Flags: needinfo?(jteh)
(In reply to Mihai Boldan, QA [:mboldan] from comment #14)
> Note that I was not able to verify the issue on Mac OS and on Ubuntu OS,
> since the screen reader app is not reading from browsers.

This should work correctly in Ubuntu with Orca (the screen reader). However, I don't know *exactly* what the screen reader should say in this case. Still, I'm happy with this testing; there shouldn't be any reason this would behave differently on other platforms, barring more general bugs on those platforms.
Flags: needinfo?(jteh)
Based on Comment 16, I'm marking the issue Verified Fixed.
Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: