Do not use visiblity to filter out elements for autofilling, but use visibility check to classify sections
Categories
(Toolkit :: Form Autofill, task, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox125 | --- | fixed |
People
(Reporter: dimi, Assigned: dimi)
References
(Blocks 1 open bug)
Details
(Whiteboard: [fxcm-addr-compatibility])
Attachments
(1 file, 1 obsolete file)
Assignee | ||
Comment 1•1 year ago
|
||
Assignee | ||
Updated•1 year ago
|
Updated•1 year ago
|
Assignee | ||
Comment 2•1 year ago
|
||
We introduced visibility/focusability check to filter out invisible or unfocusable elements
to address the following issues:
- Bug 1688209: The website's credit card form contains hidden credit card fields beneath the visible ones.
Example:
<input id="cc-number" autocomplete="cc-number">
<input id="hidden-cc-number" autocomplete="cc-number" hidden>.
<input id="cc-name" autocomplete="cc-name">
The issue occurs because when our heuristic encounters consecutive fields that should not appear multiple times in a row,
we divide them and treat them as separate sections. In this example, the
visible cc-number and visible cc-name are put in different sections so we don't autofill both of the fields at the same time.
- Bug 1822494: There is one hidden cc-exp-month field and one visible cc-exp field.
Example:
<input id="cc-exp" autocomplete="cc-exp">
<input id="hidden-cc-exp" autocomplete="cc-exp" hidden>.
When two cc-exp-* fields appear consecutively, our heuristic adjusts the first one to cc-exp-month and the second one to cc-exp-year.
However, in this bug, we should just honor the autocomplete attribute and do not change the field name
Bug 1753669: An invisible country field is located between tel-* fields.
Example:
<input id="country" autocomplete="country">
<input id="tel-area-code" autocomplete="tel-area-code">
<input id="hidden-country" autocomplete="country" hidden>
<input id="tel-local" autocomplete="tel-local">
When the heuristic sees the hidden country field, since it has already identified another country field previously,
our heuristic creates a new section upon encountering the invisible country field. This results that
we don't put tel-local field in the same section as the rest of the address fields.
However, introducing visibility and focusability checks also brings issues.
Some websites implement their own dropdowns for certain fields, like province, and include an invisible or unfocusable
field to store the value, as seen in Bug 1873202 and Bug 1836036.
We also see, in some cases, websites prefill certain address fields for users, and those fields are unfocusable.
For example, websites can use known-address data to determine the "state/province" field so users don't have to fill it.
But in these cases, we still want to identify this type of field so we can capture the data after users submit the form.
So, given the information collected so far, I think we should not filter out unfocusable or invisible elements before
running heuristics. Instead, we should adjust our heuristic to consider invisible elements in some cases. For example,
we should not create a new section upon encountering an invisible field, recognizing that it's common for websites to
place an invisible field near a visible field of the same type for various reasons.
Updated•1 year ago
|
Assignee | ||
Comment 5•1 year ago
|
||
Hi Ailea, Could you help verify Bug 1688209, Bug 1822494, and Bug 1753669 remain fixed after introducing this change? thank you!
Comment 6•1 year ago
|
||
Hi Dimi,
I just verified all 3 bugs mentioned in comment 5 and I can confirm that all 3 issues remained fixed.
Assignee | ||
Comment 7•1 year ago
|
||
(In reply to Alin Ilea, Desktop QA from comment #6)
Hi Dimi,
I just verified all 3 bugs mentioned in comment 5 and I can confirm that all 3 issues remained fixed.
Great, thank you!
Assignee | ||
Updated•1 year ago
|
Description
•