Closed
Bug 582951
Opened 14 years ago
Closed 8 years ago
Visual indication of checkbox focus insufficient when in Windows High Contrast Mode
Categories
(Core :: Layout: Form Controls, defect)
Tracking
()
RESOLVED
FIXED
mozilla52
Tracking | Status | |
---|---|---|
firefox52 | --- | fixed |
People
(Reporter: davidb, Assigned: dao)
References
(Depends on 1 open bug, Blocks 1 open bug)
Details
(Keywords: access)
Attachments
(3 files, 1 obsolete file)
This was reported to me by IBM who now use Firefox internally and require it to be fully accessible.
STR:
1. Load a page with a regular html checkbox. E.g.
http://www.w3schools.com/html/tryit.asp?filename=tryhtml_checkbox
2. Windows High Contrast Mode (HCM) can be launched via:
[left alt] + [left shift] + [PrtScn]
3. Tab to and from the checkbox
expected: noticable visual indicator
actual: a few tiny dots down the right side and bottom of the box. Not really ideal for someone who uses HCM.
Note this key and flag would indicate High Contrast Mode:
[HKEY_CURRENT_USER\Control Panel\Accessibility\HighContrast]
"Flags"="127"
See related bug 575974.
Updated•10 years ago
|
Updated•10 years ago
|
Points: --- → 3
Flags: qe-verify?
Whiteboard: p=3
Assignee | ||
Updated•8 years ago
|
Points: 3 → ---
Component: General → Layout: Form Controls
Product: Firefox → Core
Assignee | ||
Comment 1•8 years ago
|
||
forms.css is using -moz-appearance: checkbox; and only sets border-style: groove; (which isn't used because of -moz-appearance) for :-moz-focusring. If native widget rendering is supposed to take care of the focused state, this would be a widget bug. This bug isn't limited to Windows or high-contrast mode though, so I think it's a forms.css bug.
Assignee | ||
Comment 2•8 years ago
|
||
This assumes this is not a cross-platform widget bug. I'm not sure this is right.
Assignee | ||
Comment 3•8 years ago
|
||
(In reply to Dão Gottwald [:dao] from comment #1)
> This bug isn't limited to Windows or high-contrast mode though, so I think it's a forms.css bug.
Then again not all OS themes are affected. Here's what I see:
- Win10 default theme: no focus indicator
- Win10 dark high-contrast themes: proper focus ring
- Win10 black-on-white high-contrast theme: broken focus ring (I think comment 0 describes this)
- Ubuntu 16.04 default theme: no focus indicator
Jim, can you shed some light on what's happening on the win32 widget side? Does it intentionally render a focus ring for high-contrast themes? Does it intentionally omit the focus ring for the default theme? What's going on with the black-on-white high-contrast theme?
Either way the inconsistency doesn't seem to make sense, so I'm moving this bug to Widget: Win32 for now. Might need to file another bug for Widget: Gtk.
Component: Layout: Form Controls → Widget: Win32
Flags: needinfo?(jmathies)
Comment 4•8 years ago
|
||
We draw a partial focus rect on win8 and up on top of the themed checkbox here [1].
[1] http://searchfox.org/mozilla-central/rev/8eb4fd2c7be150b0aa1b05c0f3707e82dc8f2dc8/widget/windows/nsNativeThemeWin.cpp#1907
Flags: needinfo?(jmathies)
Comment 5•8 years ago
|
||
Depending on the dpi of the system, the focus lines might be hard to spot. It seems like higher dpi displays trigger more dots, which make the focus lines hard to pick up.
Comment 6•8 years ago
|
||
Assignee | ||
Comment 7•8 years ago
|
||
(In reply to Jim Mathies [:jimm] from comment #4)
> We draw a partial focus rect on win8 and up on top of the themed checkbox
> here [1].
How about we stop doing that and use a CSS outline like in attachment 8789331 [details] [diff] [review]?
Flags: needinfo?(jmathies)
Comment 8•8 years ago
|
||
(In reply to Dão Gottwald [:dao] from comment #7)
> (In reply to Jim Mathies [:jimm] from comment #4)
> > We draw a partial focus rect on win8 and up on top of the themed checkbox
> > here [1].
>
> How about we stop doing that and use a CSS outline like in attachment
> 8789331 [details] [diff] [review]?
If it looks good, seems fine with me.
Flags: needinfo?(jmathies)
Assignee | ||
Comment 9•8 years ago
|
||
(In reply to Dão Gottwald [:dao] from comment #7)
> (In reply to Jim Mathies [:jimm] from comment #4)
> > We draw a partial focus rect on win8 and up on top of the themed checkbox
> > here [1].
>
> How about we stop doing that and use a CSS outline like in attachment
> 8789331 [details] [diff] [review]?
bz, do you know if there's a good reason why we avoided CSS outline here and have what looks like a hack in widget code?
Flags: needinfo?(bzbarsky)
Comment 10•8 years ago
|
||
> bz, do you know if there's a good reason why we avoided CSS outline here
No idea offhand.
As long as it interacts reasonably with the page doing its own outline styling, should be fine to use outline here, at first glance.
I'm really sorry about the lag; I was confusing this with another bug that had a needinfo from myself. :(
Flags: needinfo?(bzbarsky)
Assignee | ||
Comment 11•8 years ago
|
||
Assignee: nobody → dao+bmo
Attachment #8789331 -
Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #8798796 -
Flags: review?(jmathies)
Attachment #8798796 -
Flags: review?(dbaron)
Assignee | ||
Updated•8 years ago
|
Component: Widget: Win32 → Layout: Form Controls
How does this relate to how other browsers (particularly on Windows) do focus styling of checkboxes and radios? (And how does their default focus styling respond to CSS styling?)
Flags: needinfo?(dao+bmo)
Assignee | ||
Comment 13•8 years ago
|
||
(In reply to David Baron :dbaron: ⌚️UTC-7 from comment #12)
> How does this relate to how other browsers (particularly on Windows) do
> focus styling of checkboxes and radios? (And how does their default focus
> styling respond to CSS styling?)
I've tested this on Windows 10. Both Chrome and Edge seem to use some kind of outline that can be overridden by authors with CSS outline.
Flags: needinfo?(dao+bmo)
Comment 14•8 years ago
|
||
Comment on attachment 8798796 [details] [diff] [review]
patch
http://www.mathies.com/mozilla/forms.html
Visually an improvement over what we currently have.
One noticed behavior change though - on win7 my checkboxes don't get focus rects at all. With this patch they do now. I consider this an improvement.
r+ for the code changes in widget and on the overall affect
Attachment #8798796 -
Flags: review?(jmathies) → review+
Comment on attachment 8798796 [details] [diff] [review]
patch
So on Linux, *my* native theme takes care of this, but I suppose we can't guarantee that all do. I guess I'm ok with this as is, so r=dbaron.
We perhaps need a way of saying that a native theme overrides outline, though, so that Linux and Mac native themes can (when present) say that they override the outline. We can probably do that in a followup. (The issue also came up in something else I was reviewing recently, but it doesn't seem to be bug 140562 unless it was a comment I wrote and then deleted...)
Attachment #8798796 -
Flags: review?(dbaron) → review+
Comment 16•8 years ago
|
||
Pushed by dgottwald@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/ad249ce81497
Use CSS outline for checkbox and radio button focus indicator. r=dbaron,jimm
Comment 17•8 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox52:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
You need to log in
before you can comment on or make changes to this bug.
Description
•