Open Bug 2082528 Opened 1 month ago Updated 43 minutes ago

Edge states for the certificate details sub-page

Categories

(Firefox for Android :: Settings, task)

All
Android
task

Tracking

()

ASSIGNED

People

(Reporter: lmccracken, Assigned: lmccracken)

References

(Blocks 1 open bug)

Details

(Whiteboard: [fxdroid][android-activation-trust])

Attachments

(2 external files)

Summary
Define and implement certificate details sub-page behaviour for HTTP, invalid or expired certificates, and missing certificate fields

Description
The Figma designs only show the happy path: an HTTPS site with a valid certificate and every field present. Real browsing includes many cases that don’t fit that, and the sub-page needs defined behaviour for each so users never see a blank card, a misleading “Secure connection” label or a crash.

This ticket covers three groups of edge cases, plus the design work they depend on:

HTTP pages, which have no certificate at all, and other pages with no certificate (internal pages, about: pages, local files).
Invalid or expired certificates, such as expired, not yet valid, wrong hostname, untrusted issuer and self-signed. Some of these are normally blocked by a certificate error page, but the user can sometimes proceed after an override.
Missing or unusual certificate fields, such as no organization, locality or country (common for DV certificates), or no issuer organization.

Several earlier tickets built interim behaviour and pointed here for the final decision. This ticket replaces those interim behaviours with the agreed design.

Part A: Get edge-state designs from UX

Ask UX for designs covering every case in Parts B to D, in light and dark themes.
Provide UX with a list of cases to design (see below) so nothing is discovered late.
Get decisions on wording, iconography and colour for non-secure and error states, and make sure they are consistent with the existing Trust Panel and with desktop Firefox where there is a precedent.
Get any new strings in time for L10n and string freeze for Fx 162.
Record the final designs and decisions in this ticket.

Cases to cover in the designs:

HTTP page
Internal or about: page, and local file
Expired certificate
Not-yet-valid certificate
Hostname mismatch
Self-signed or untrusted issuer
Certificate chained to a user-installed or enterprise root
User has overridden a certificate error and proceeded
Mixed content (HTTPS page with insecure subresources), if the Trust Panel already distinguishes this
Missing organization, locality, country, or issuer name, individually and all together
Very long field values

Part B: Handle HTTP and pages with no certificate

Define what the “Secure connection” row shows on HTTP pages, for example a “Connection not secure” label with no navigation affordance.
Define whether the row is tappable, disabled or hidden when there is no certificate to show. The sub-page should not be reachable with nothing in it, unless UX designs an empty state.
Make sure no QWAC elements appear.
Make the same decision for internal pages, about: pages and local files, which may differ from HTTP.
Update row behaviour to match.

Part C: Handle invalid or expired certificates

Decide whether the sub-page can be opened at all for a certificate with an error. If yes, show the certificate details together with a clear warning. If no, treat the page as having no certificate.
Define the status line and visual treatment for each error type, per UX.
Make sure a certificate with an error never shows “Secure connection” or the QWAC statement and EU trust mark, even if it would otherwise be a QWAC. Showing “qualified” on an invalid certificate would be misleading.
Handle the case where the user overrides an error and proceeds, so the Trust Panel and sub-page reflect that honestly.
Confirm what error and certificate information the engine exposes in these cases, and file an engine-side bug if something needed is not available.

Part D: Handle missing certificate fields

Define behaviour for each missing field in the issued-to card and the “Verified by” line. The options are to hide the row, hide the whole card, show a placeholder, or fall back to another field such as common name.
Define the behaviour when all subject fields are missing, as with many DV certificates. The card should not render as an empty box.
Define the behaviour when the issuer name is missing entirely.
Make sure labels never appear with no value, and values never appear with no label.
Make sure TalkBack output matches what is visible, with no announcements for hidden rows.
Treat empty strings and whitespace-only values as missing, not just null.

In scope

UX designs and decisions for all cases above
Implementing the agreed behaviour for HTTP, no-certificate pages, invalid or expired certificates and missing fields
Updating the interim behaviour to the final behaviour
Any new strings, with translator comments and string freeze awareness
Accessibility for every state (labels, reading order, announcements)
Light and dark themes, large fonts and RTL for every new state
Unit tests for the state and visibility logic, and UI or screenshot tests for each state

Out of scope

The happy-path layout and content
Data plumbing, except filing engine-side bugs for any missing error data
QWAC signal determination
Pref gating
Changing the existing certificate error pages (the interstitial shown before the user reaches the site)
Focus

Acceptance criteria

UX designs exist for every case in the list, in light and dark themes, and are linked in the ticket.
On HTTP and no-certificate pages, the Trust Panel shows the agreed non-secure state, and the sub-page cannot be reached with nothing to show.
For invalid, expired and untrusted certificates, the Trust Panel and sub-page behave as designed, and never present the connection as secure.
A certificate with an error never shows the QWAC statement or EU trust mark.
A missing or empty subject or issuer field never produces a blank label, an empty card, a dangling row or a crash.
Empty and whitespace-only values are treated as missing.
Interim behaviour from earlier tickets has been replaced, and those tickets are updated or closed accordingly.
Every state is readable with TalkBack, in logical order, with no announcements for hidden elements.
Every state works with large fonts, in RTL and on tablet widths.
Tests cover each state: HTTP, no certificate, each supported error type, error override, all fields missing, some fields missing, and issuer missing.
Any engine-side gap has a linked bug.

Whiteboard: [fxdroid][android-activation-trust]

The certificate details sub-page is offered only for secure pages with a certificate
that has a subject or issuer to show, so it never opens to an empty card. Pages
without a certificate and pages whose certificate has an error, even after the user
chose to proceed, keep the connection security row, and a page that is not secure is
never shown as presenting a QWAC. Missing fields stay hidden, as on desktop for
domain validated certificates.

Assignee: nobody → lmccracken
Status: NEW → ASSIGNED

Focus uses the same rule as Fenix: the "Secure connection" link and certificate
details page are only offered for secure connections with a certificate that has a
subject or issuer to show.

Pushed by lmccracken@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/a953aa5a50ca https://hg.mozilla.org/integration/autoland/rev/ddc014c8d413 Part 1: Only offer the certificate details when there is something to show, and never show an insecure page as qualified. r=android-reviewers,twhite
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: