Open Bug 1592047 Opened 6 years ago Updated 3 years ago

Add visibility info to Autofill elements

Categories

(GeckoView :: General, enhancement, P3)

Unspecified
All
enhancement

Tracking

(firefox71 wontfix, firefox72 affected)

Tracking Status
firefox71 --- wontfix
firefox72 --- affected

People

(Reporter: jhugman, Unassigned)

References

Details

Attachments

(1 file)

Currently, the auth0.com has an AssistStructure for the auth.mozilla.auth0.com represented by Fenix, in a XML representation generated by Lockwise:

<form webDomain="auth.mozilla.auth0.com" visibility="0" data-decorator="init-auth handle-submit" action="/" method="post" lock-state="loading" id="nlx-form">
    <fieldset webDomain="auth.mozilla.auth0.com" visibility="0" data-decorator="decide-screen" class=""/>
    <input webDomain="auth.mozilla.auth0.com" autofillHints="emailAddress" inputType="21" visibility="0" data-decorator="watch-contents" autocomplete="email" id="field-email" name="username" type="email" autofocus=""/>
    <input webDomain="auth.mozilla.auth0.com" visibility="0" id="enter-initial" type="submit" class="button button--full-width"/>
    <button webDomain="auth.mozilla.auth0.com" visibility="0" data-handler="authorise-firefoxaccounts" type="button" class="button button--full-width button--social button--secondary"/>
    <button webDomain="auth.mozilla.auth0.com" visibility="0" data-handler="authorise-github" type="button" class="button button--github button--full-width button--social button--secondary"/>
    <button webDomain="auth.mozilla.auth0.com" visibility="0" data-handler="authorise-google" type="button" class="button button--full-width button--social button--secondary"/>
    <input webDomain="auth.mozilla.auth0.com" visibility="0" data-decorator="set-autologin-preference" id="use-autologin" type="checkbox" checked=""/>
    <input webDomain="auth.mozilla.auth0.com" autofillHints="emailAddress" inputType="21" visibility="0" data-decorator="watch-contents" autocomplete="email" id="field-email-signup" name="username" type="email"/>
    <input webDomain="auth.mozilla.auth0.com" visibility="0" id="enter-initial-signup" type="submit" class="button button--full-width"/>
    <button webDomain="auth.mozilla.auth0.com" visibility="0" data-handler="authorise-firefoxaccounts" type="button" class="button button--full-width button--social button--secondary"/>
    <button webDomain="auth.mozilla.auth0.com" visibility="0" data-handler="authorise-github" type="button" class="button button--github button--full-width button--social button--secondary"/>
    <button webDomain="auth.mozilla.auth0.com" visibility="0" data-handler="authorise-google" type="button" class="button button--full-width button--social button--secondary"/>
    <input webDomain="auth.mozilla.auth0.com" visibility="0" data-decorator="set-autologin-preference" id="use-autologin-2" type="checkbox" checked=""/>
    <input webDomain="auth.mozilla.auth0.com" autofillHints="password" inputType="e1" visibility="0" data-decorator="submit-with-enter watch-contents" autocomplete="current-password" data-continue-with="authorise-ldap-credentials" id="field-password" name="password" type="password"/>
    <input webDomain="auth.mozilla.auth0.com" visibility="0" id="authorise-ldap-credentials" type="submit" class="button button--full-width"/>
    <button webDomain="auth.mozilla.auth0.com" visibility="0" data-handler="go-to-initial-page" type="button" class="button button--text-only card__back button--unpadded"/>
    <button webDomain="auth.mozilla.auth0.com" visibility="0" data-handler="send-passwordless-link" type="button" class="button button--full-width button--secondary"/>
    <button webDomain="auth.mozilla.auth0.com" visibility="0" data-handler="authorise-firefoxaccounts" type="button" class="button button--full-width button--social button--secondary"/>
    <button webDomain="auth.mozilla.auth0.com" visibility="0" data-handler="authorise-github" type="button" class="button button--github button--full-width button--social button--secondary"/>
    <button webDomain="auth.mozilla.auth0.com" visibility="0" data-handler="authorise-google" type="button" class="button button--full-width button--social button--secondary"/>
    <button webDomain="auth.mozilla.auth0.com" visibility="0" data-handler="go-to-initial-page" type="button" class="button button--text-only card__back button--unpadded"/>
    <button webDomain="auth.mozilla.auth0.com" visibility="0" data-handler="go-to-initial-page" id="back" type="button" class="button button--text-only card__back  button--unpadded"/>
    <input webDomain="auth.mozilla.auth0.com" autofillHints="password" inputType="e1" visibility="0" data-decorator="submit-with-enter watch-contents" autocomplete="current-password" data-continue-with="authorise-ldap-credentials" id="field-password-try-2" name="password" type="password"/>
    <input webDomain="auth.mozilla.auth0.com" visibility="0" id="authorise-ldap-credentials-try-2" type="submit" class="button button--full-width"/>
    <button webDomain="auth.mozilla.auth0.com" visibility="0" data-handler="go-to-initial-page" type="button" class="button button--text-only card__back button--unpadded"/>
    <button webDomain="auth.mozilla.auth0.com" visibility="0" data-handler="go-to-initial-page" type="button" class="button button--text-only card__back  button--unpadded"/>
    <button webDomain="auth.mozilla.auth0.com" visibility="0" data-handler="go-to-initial-page" type="button" class="button button--text-only card__back button--unpadded"/>
    <button webDomain="auth.mozilla.auth0.com" visibility="0" data-handler="go-to-initial-page" type="button" class="button button--text-only card__back button--unpadded"/>
    <input webDomain="auth.mozilla.auth0.com" visibility="0" data-decorator="set-autologin-preference" id="use-autologin-2" type="checkbox" checked=""/>
    <input webDomain="auth.mozilla.auth0.com" visibility="0" data-decorator="set-autologin-preference" id="use-autologin-3" type="checkbox" checked=""/>
    <input webDomain="auth.mozilla.auth0.com" autofillHints="password" inputType="e1" visibility="0" autocomplete="current-password" id="hidden-lastpass-password" name="hidden-lastpass-password" type="password" aria-hidden=""/>
</form>

Attached is the corresponding screenshot.

The visibility attribute is derived from ViewNode.getVisibility() which returns View.VISIBLE (0), View.INVISIBLE (4) or View.GONE (8).

Note only the first input field is actually visible.

<input webDomain="auth.mozilla.auth0.com" autofillHints="emailAddress" inputType="21" visibility="0" data-decorator="watch-contents" autocomplete="email" id="field-email" name="username" type="email" autofocus=""/>

This bug is a request either to annotate the fields with visibility or to filter out the fields that are not visible. NB. This is not filtering of type=hidden fields.

Rank: 5
Priority: -- → P2

Adding to GV's November sprint.

Feature requests from Lockwise to help autofill identify password fields on a page. Eugen thinks we can support these with the new autofill refactoring bug 1591462.

Assignee: nobody → esawin
Depends on: 1591462
Priority: P2 → P1
Whiteboard: [geckoview:m1911]
See Also: → 1591737

Can you please verify whether the changes landed in bug 1591462 satisfy your requirements.

We set ViewStructure.setVisibility based on Autofill.Node.getVisible. An Autofill.Node is considered visible, when it is contained in a "focused branch" as determined by the following conditions:

  1. the node is focused, or
  2. the node is a sibling of a focused node, or
  3. the node is a parent of a focused node, or
  4. the node is the Autofill.Session root node
Flags: needinfo?(jhugman)

This does not satisfy requirements.

In the above tree, there are three password fields, and two username fields, simplified below.

In this example, looking at the screenshot, only the first emailAddress field is visible.

<form webDomain="auth.mozilla.auth0.com" visibility="0" data-decorator="init-auth handle-submit" action="/" method="post" lock-state="loading" id="nlx-form">
    <input webDomain="auth.mozilla.auth0.com" autofillHints="emailAddress" inputType="21" visibility="0" data-decorator="watch-contents" autocomplete="email" id="field-email" name="username" type="email" autofocus=""/>
    <input webDomain="auth.mozilla.auth0.com" autofillHints="emailAddress" inputType="21" visibility="0" data-decorator="watch-contents" autocomplete="email" id="field-email-signup" name="username" type="email"/>
    <input webDomain="auth.mozilla.auth0.com" autofillHints="password" inputType="e1" visibility="0" data-decorator="submit-with-enter watch-contents" autocomplete="current-password" data-continue-with="authorise-ldap-credentials" id="field-password" name="password" type="password"/>
    <input webDomain="auth.mozilla.auth0.com" autofillHints="password" inputType="e1" visibility="0" data-decorator="submit-with-enter watch-contents" autocomplete="current-password" data-continue-with="authorise-ldap-credentials" id="field-password-try-2" name="password" type="password"/>
    <input webDomain="auth.mozilla.auth0.com" autofillHints="password" inputType="e1" visibility="0" autocomplete="current-password" id="hidden-lastpass-password" name="hidden-lastpass-password" type="password" aria-hidden=""/>
</form>
Flags: needinfo?(jhugman)
Priority: P1 → P2
Whiteboard: [geckoview:m1911] → [geckoview:m1911][geckoview:m75]
Whiteboard: [geckoview:m1911][geckoview:m75]
Whiteboard: [geckoview:m77]
Whiteboard: [geckoview:m77]
Assignee: esawin → nobody
Priority: P2 → P3
Severity: normal → S3
Rank: 5 → 333

Tasks and enhancements should have severity N/A.

Severity: S3 → N/A
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: