Cannot display title tooltip using keyboard to obtain focus
Categories
(Core :: DOM: Navigation, defect, P3)
Tracking
()
| Accessibility Severity | s3 |
People
(Reporter: charles.belov, Unassigned)
References
Details
(Keywords: access)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:94.0) Gecko/20100101 Firefox/94.0
Steps to reproduce:
- I used the following bookmarklet to make all images on a page focusable and copy alt attributes to title attributes when present and add title attributes otherwise:
javascript:(function()%20{var%20imgs%20=%20document.getElementsByTagName('img');for%20(i=0;i<imgs.length;i++){if%20(imgs.item(i).hasAttribute('alt')){imgs.item(i).setAttribute('tabIndex','0');if%20(imgs.item(i).getAttribute('alt')==''){imgs.item(i).setAttribute('title','%20empty%20alt%20attribute%20');imgs.item(i).style.border='2px%20dotted%20black';}else%20if(imgs.item(i).getAttribute('alt')=='%20'){imgs.item(i).setAttribute('title','%20space%20alt%20attribute%20');imgs.item(i).style.border='2px%20dotted%20orange';}else{imgs.item(i).setAttribute('title',imgs.item(i).getAttribute('alt'));imgs.item(i).style.border='2px%20dashed%20green';}}else{imgs.item(i).setAttribute('title','%20no%20alt%20attribute%20');imgs.item(i).style.border='2px%20solid%20red';}}/released%20under%20GPL%203.0/})%20();
- I tabbed to each image
Actual results:
- I received a focus outline on the image; no tooltip appeared
Expected results:
- I received a focus outline on the image and a tooltip appeared
I would not expect to only be able to obtain a tooltip on hover because that would require mouse usage.
Comment 1•4 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::DOM: UI Events & Focus Handling' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.
| Reporter | ||
Comment 2•4 years ago
|
||
This issue is a WCAG 2.0 violation. Please see 2.1.1 Keyboard: All functionality of the content is operable through a keyboard interface without requiring specific timings for individual keystrokes, except where the underlying function requires input that depends on the path of the user's movement and not just the endpoints. (Level A)
Corresponding Chrome issue is Issue 829352: Make the title attribute visible on keyboard focus https://bugs.chromium.org/p/chromium/issues/detail?id=829352
Comment 4•4 years ago
|
||
I'm not sure. It belongs wherever display of title tooltips for mouse hover is implemented. Although it's an issue with a11y impact, it still belongs in the component where the fix needs to be applied. I probably would have chosen "DOM: UI Events & Focus Handling" too, but based on your question, I'm guessing this component doesn't deal with native HTML UI. Maybe somewhere in toolkit or layout?
Comment 5•4 years ago
|
||
I'm surprised at that tooltip is managed by docshell...
https://searchfox.org/mozilla-central/rev/3407e72ceb5039da514c03ae61bd279b1725c3b2/docshell/base/nsDocShellTreeOwner.cpp#1229
Comment 6•4 years ago
|
||
I'm not sure who is familiar with the tooltip manager.
Updated•4 years ago
|
Comment 7•4 years ago
|
||
(In reply to Masayuki Nakano [:masayuki] (he/him)(JST, +0900) from comment #6)
I'm not sure who is familiar with the tooltip manager.
I am not sure but Gijs is the name I got from the log.
Comment 8•4 years ago
|
||
I wouldn't say "familiar" but maybe "least unfamiliar" at this point... docshell manages showing and hiding tooltips with a mouse listener, and would have to add a focus listener or similar if it wanted to do the same for keyboard access.
There's no logic for this in the frontend (which only gets told via BrowserChild when to show/hide tooltips).
Was there a specific question you were hoping I could answer?
Comment 9•4 years ago
|
||
Thank you Gijs. I just wanted to redirect handling this bug to somebody who is familiar with here. Perhaps, this bug is not urgent one so that we should put this to the backlog of the DOM team.
Comment 10•4 years ago
|
||
Isn't this bug 97223?
Comment 11•4 years ago
|
||
Updated•3 years ago
|
Description
•