Closed Bug 1755033 Opened 3 years ago Closed 1 year ago

[meta] Make user agent autofill styles more important

Categories

(Toolkit :: Form Autofill, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
125 Branch
Accessibility Severity s4
Tracking Status
firefox125 --- fixed

People

(Reporter: tgiles, Assigned: dimi)

References

(Depends on 7 open bugs, Blocks 36 open bugs)

Details

(Keywords: access, meta, Whiteboard: [fxcm-quality-compat-form-autofill])

Attachments

(2 files)

Recently we've had an influx of bugs regarding autofill appearing to be broken on many sites. Most of these cases are due to websites implementing styles that overwrite the background-image of our yellow autofill highlight. We should consider making the user agent autofill styles more important to show when fields have been autofilled by the browser.

Blocks: 1740256
Blocks: 1740001
Blocks: 1755486
Blocks: 1755482
Blocks: 1755496
Blocks: 1755697
Blocks: 1755730
Blocks: 1755928
Blocks: 1755917

Emilio, what's your opinion on making our autofill styling !important in the user agent style sheet? We're seeing a lot of bugs due to autofill highlighting not working as expected on various websites. Not sure who else would need to be part of this conversation so feel free to add others as needed, especially since this feels like a philosophical question more than a simple implementation question.

Should we make our user agent styles for autofill more important so there's a visibly clear distinction between cases where the browser has filled data versus the website versus the user?

Should all of these linked bugs be marked as invalid since this kind of behavior (websites overriding autofill styles) is expected from the browser's point of view?

Flags: needinfo?(emilio)
No longer blocks: 1740264

I don't have a super-strong opinion. It feels a bit unfortunate for the page to lose the ability to style the autofill state, but it might be the case that most websites don't care / accidentally break this, and making it !important would be beneficial for most users...

Anyways, this feels like this could benefit from asking UX... Also, do you know what does Safari do here? Do they enforce their preview?

There's another concern here, which is that we'll ~always be stuck with one color (that, furthermore, will need to be close-ish or the same as Chrome's), and we won't be able to change it without causing issues, because even if pages can't change the text color of the field itself, they usually overlay stuff on top and they need to make sure the contrast is enough. But again, that might be worth it if the end result is better for users.

BTW, some of the blocked bugs like bug 1755917 don't seem related to this? That's about failing to auto-fill a state/region code, right?

Flags: needinfo?(emilio) → needinfo?(tgiles)

Anyways, this feels like this could benefit from asking UX

Who would be the best person to start this conversation with? Aaron Benson maybe?

Also, do you know what does Safari do here? Do they enforce their preview?

It doesn't look like Safari does a preview like Firefox or Chrome, you just select an option from the autocomplete menu and then that option's data is filled. It appears that Safari has !important on their user agent styles, causing the yellow highlight (seems to be the same yellow that we use) to appear as expected on Walmart.com.

There's another concern here, which is that we'll ~always be stuck with one color (that, furthermore, will need to be close-ish or the same as Chrome's), and we won't be able to change it without causing issues, because even if pages can't change the text color of the field itself, they usually overlay stuff on top and they need to make sure the contrast is enough. But again, that might be worth it if the end result is better for users.

It seems like Safari's autofill highlight is the same yellow that we currently use, so I guess there's only the Chrome blue highlight (which seems to be relatively new, I don't remember the blue highlight but I also don't trust my memory in this situation) or the yellow highlight that we and Safari use.

BTW, some of the blocked bugs like bug 1755917 don't seem related to this? That's about failing to auto-fill a state/region code, right?

Unfortunately it is related. While yes, the actual filling of data seems to not work as expected, we also don't highlight the previewed or filled fields correctly either due to Walmart having background styles that overwrite our background autofill styles. There's many issues in that bug you linked and potentially in the other linked bugs in this meta. I should probably go and separate these multiple issue bugs into "one issue per bug" but haven't had time yet.

Flags: needinfo?(tgiles) → needinfo?(emilio)

(In reply to Tim Giles [:tgiles] from comment #3)

Anyways, this feels like this could benefit from asking UX

Who would be the best person to start this conversation with? Aaron Benson maybe?

Huh, not sure, sorry :/

Flags: needinfo?(emilio)

Didn't realize we had a bug specifically for autofill highlight issue on Walmart, sorry about that emilio. thanks for making me double check.

No longer blocks: 1755917
Keywords: access
Whiteboard: [access-s4]
Blocks: 1687662
Whiteboard: [access-s4] → [access-s4] [fxcm-quality-compat-form-autofill]
Blocks: 1812658
Blocks: 1812624
Blocks: 1813031
Blocks: 1813039
Blocks: 1813524
Depends on: 1819590
Blocks: 1819575
No longer depends on: 1819575
Blocks: 1819590
No longer depends on: 1819590
No longer blocks: 1819694
Blocks: 1819901
No longer blocks: 1819901
Blocks: 1819913
Blocks: 1819971
Blocks: 1819973
Blocks: 1819983
Blocks: 1819986
Blocks: 1820085
Blocks: 1820087
Blocks: 1820100
Blocks: 1821984
Blocks: 1821987
Blocks: 1821991
Blocks: 1821998
Blocks: 1822002
Blocks: 1822015
Blocks: 1822039
Blocks: 1822051
Blocks: 1822059
No longer blocks: 1822366
Blocks: 1822468
Blocks: 1822472
Blocks: 1822511
Blocks: 1822538
Blocks: 1822583
Blocks: 1822757
Blocks: 1822766
Blocks: 1822767
Blocks: 1822768
Blocks: 1822785
Blocks: 1822788
Blocks: 1822790
Blocks: 1822797
Blocks: 1822806
Blocks: 1822858
Blocks: 1822879
No longer blocks: 1822015
No longer blocks: 1822039
No longer blocks: 1822059
No longer blocks: 1822468
No longer blocks: 1822511
Depends on: 1824921
Blocks: 1825252
Blocks: 1825263
Blocks: 1825354
Blocks: 1825371
Blocks: 1825528
Blocks: 1825698
Blocks: 1825701
Blocks: 1825724
Blocks: 1836444
Blocks: 1836446
Accessibility Severity: --- → s4
Whiteboard: [access-s4] [fxcm-quality-compat-form-autofill] → [fxcm-quality-compat-form-autofill]
Blocks: 1836967
Blocks: 1841529
Duplicate of this bug: 1840450
Depends on: 1880278
Assignee: nobody → dlee
Attachment #9381973 - Attachment description: WIP: Bug 1755033 - Make user agent autofill styles more important → Bug 1755033 - Make user agent autofill styles more important r=#credential-management-reviewers
Status: NEW → ASSIGNED
Depends on: 1882262
Pushed by dlee@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/40d985e1af4e Make user agent autofill styles more important r=credential-management-reviewers,emilio,issammani

Backed out for causing reftest failures in autofill.html

  • Backout link
  • Push with failures
  • Failure Log
  • Failure line: REFTEST TEST-UNEXPECTED-FAIL | layout/reftests/forms/input/text/autofill.html != layout/reftests/forms/input/text/autofill-preview.html | image comparison, max difference: 0, number of differing pixels: 0
Flags: needinfo?(dlee)
Attachment #9381973 - Attachment description: Bug 1755033 - Make user agent autofill styles more important r=#credential-management-reviewers → Bug 1755033 - P1. Make user agent autofill styles more important r=#credential-management-reviewers

UX suggests to use the same text color for autofill and autofill
preview.

Depends on D202410

Pushed by dlee@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5e26aac6ca16 P1. Make user agent autofill styles more important r=credential-management-reviewers,emilio,issammani https://hg.mozilla.org/integration/autoland/rev/4fde36e8266a P2. Use the same text color for `autofill` and `-moz-autofill-preview` r=credential-management-reviewers,emilio,sgalich

Backed out for causing mochitest failures in test_formautofill_preview_highlight.html

  • Backout link
  • Push with failures
  • Failure Log
  • Failure line: TEST-UNEXPECTED-FAIL | browser/extensions/formautofill/test/mochitest/test_formautofill_preview_highlight.html | Checking #organization preview style
Pushed by dlee@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5b36e2c1bc59 P1. Make user agent autofill styles more important r=credential-management-reviewers,emilio,issammani https://hg.mozilla.org/integration/autoland/rev/ab2f491c1f6a P2. Use the same text color for `autofill` and `-moz-autofill-preview` r=credential-management-reviewers,emilio,sgalich
Regressions: 1883117
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 125 Branch
Flags: needinfo?(dlee)
No longer blocks: 1883094
No longer blocks: 1882837
No longer blocks: 1882819
No longer blocks: 1882488
No longer blocks: 1821984
No longer blocks: 1822002
No longer blocks: 1822806
No longer blocks: 1825354
No longer blocks: 1825371
No longer blocks: 1822766
No longer blocks: 1822788
No longer blocks: 1825318
No longer blocks: 1822013
Regressions: 1893949
No longer blocks: 1754827
No longer blocks: 1754991
No longer blocks: 1883338
No longer blocks: 1956899
No longer blocks: 1956869
Blocks: 1814083
Blocks: 1740524
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: