Closed Bug 1868412 Opened 10 months ago Closed 10 months ago

Introduce red tokens for error states (descriptive error text and focus outline)

Categories

(Toolkit :: Themes, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
122 Branch
Tracking Status
firefox121 --- fixed
firefox122 --- fixed

People

(Reporter: jules, Assigned: jules)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Upon providing support for bug 1866291 and discussing between theme engineers, we decided we need some red color values that will look good on the chrome for the error state of an input, for both the descriptive error text below it and the focus outline.

Note that while I guaranteed these shades have enough contrast in our default themes and several lightweight themes, that we are aware users may have red themes installed, and the red shades we are using will have contrast against certain red shades, but will most likely not have good contrast against all. This is our best solution for now.

We already have a red shade that will work well for light mode, but we need a new red token for dark mode, and then to finally add tokens for descriptive text and focus outline error colors in light and dark. Here are the colors I generated that will work for this and are part of a red scale I have been working on as part of this work.

I'm thinking:

Light

--focus-outline-color-error: var(--color-red-50)
--text-color-error: var(--color-red-50)

Dark

--color-red-20: #FAA0A0;
--focus-outline-color-error: var(--color-red-20)
--text-color-error: var(--color-red-20)
Assignee: nobody → jules
Status: NEW → ASSIGNED
Attachment #9367111 - Attachment description: Bug 1868412 - Introduce red tokens for form input error state (descriptive error text and focus outline) r?#reusable-components-reviewers,#desktop-theme-reviewers → Bug 1868412 - Introduce red tokens for form input error state (descriptive error text and focus outline) r?#reusable-components-reviewers,#desktop-theme-reviewers,morgan

A note I've learned we have an existing dark mode red shade that's really close to the shade I'm proposing and is accessible for text usage, so I will be using it instead.

Pushed by twisniewski@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/aa3e301b7be3
Introduce red tokens for form input error state (descriptive error text and focus outline) r=reusable-components-reviewers,desktop-theme-reviewers,accessibility-frontend-reviewers,morgan,hjones,dao

Comment on attachment 9367111 [details]
Bug 1868412 - Introduce red tokens for form input error state (descriptive error text and focus outline) r?#reusable-components-reviewers,#desktop-theme-reviewers,morgan

CSS-only change needed for bug 1866291, approved for 121.0b9.

Attachment #9367111 - Flags: approval-mozilla-beta+
Status: ASSIGNED → RESOLVED
Closed: 10 months ago
Resolution: --- → FIXED
Target Milestone: --- → 122 Branch
Blocks: 1491614
Blocks: 1869596
Summary: Introduce red tokens for form input error state (descriptive error text and focus outline) → Introduce red tokens for error states (descriptive error text and focus outline)

Updating title since we’re starting to use the error text color beyond just forms 👍

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: